summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/TSButton.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-08-12 16:21:37 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-08-12 16:21:37 +0000
commit58ff50e5bf8dbb6b28d54370423232dc0221cd53 (patch)
treeb71113e7574217421cb622e584f643df490e708a /plugins/TabSRMM/src/TSButton.cpp
parentc2cb7db85cbd67c5b95c2735d9b917eb0ac1d234 (diff)
mir_alloc/calloc/free instead of simple malloc/calloc/free
git-svn-id: http://svn.miranda-ng.org/main/trunk@5660 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/TSButton.cpp')
-rw-r--r--plugins/TabSRMM/src/TSButton.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp
index 06c3ff0d70..da368c2fd7 100644
--- a/plugins/TabSRMM/src/TSButton.cpp
+++ b/plugins/TabSRMM/src/TSButton.cpp
@@ -107,16 +107,16 @@ static void TSAPI LoadTheme(MButtonCtrl *ctl)
int TSAPI TBStateConvert2Flat(int state)
{
switch (state) {
- case PBS_NORMAL:
- return TS_NORMAL;
- case PBS_HOT:
- return TS_HOT;
- case PBS_PRESSED:
- return TS_PRESSED;
- case PBS_DISABLED:
- return TS_DISABLED;
- case PBS_DEFAULTED:
- return TS_NORMAL;
+ case PBS_NORMAL:
+ return TS_NORMAL;
+ case PBS_HOT:
+ return TS_HOT;
+ case PBS_PRESSED:
+ return TS_PRESSED;
+ case PBS_DISABLED:
+ return TS_DISABLED;
+ case PBS_DEFAULTED:
+ return TS_NORMAL;
}
return TS_NORMAL;
}
@@ -375,12 +375,12 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
switch (msg) {
case WM_NCCREATE:
SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE) | BS_OWNERDRAW);
- bct = (MButtonCtrl*)malloc(sizeof(MButtonCtrl));
+ bct = (MButtonCtrl*)mir_alloc(sizeof(MButtonCtrl));
if (bct == NULL)
return FALSE;
{
char *p = (char*)bct ;
- _DebugTraceA("SESSION_INFO allocated: crashes at %lp", p + offsetof(MButtonCtrl, cHot));
+ _DebugTraceA("MButtonCtrl allocated: crashes at %lp", p + offsetof(MButtonCtrl, cHot));
}
ZeroMemory(bct, sizeof(MButtonCtrl));
bct->hwnd = hwndDlg;
@@ -415,7 +415,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
break; // DONT! fall thru
case WM_NCDESTROY:
- free(bct);
+ mir_free(bct);
SetWindowLongPtr(hwndDlg, 0, (LONG_PTR)NULL);
break;