summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-22 13:35:56 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-22 13:35:56 +0000
commite6cae8802ef970ad272cabc7737af8f2edd8155d (patch)
tree6d5b6aaafc7aa7e48a2efa0f676b423f08b91390 /plugins/NewAwaySysMod/src/GroupCheckbox.cpp
parentefc80c9ad8c886334664bf9247e6b7a0803bb854 (diff)
64-bit compatibility
git-svn-id: http://svn.miranda-ng.org/main/trunk@8215 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewAwaySysMod/src/GroupCheckbox.cpp')
-rw-r--r--plugins/NewAwaySysMod/src/GroupCheckbox.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
index 3753f62999..9586122006 100644
--- a/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
+++ b/plugins/NewAwaySysMod/src/GroupCheckbox.cpp
@@ -61,7 +61,7 @@ public:
static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- CCheckboxData *dat = (CCheckboxData*)GetWindowLong(hWnd, GWLP_USERDATA);
+ CCheckboxData *dat = (CCheckboxData*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
if (!dat)
return 0;
@@ -318,7 +318,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
if (dat->hFont)
DeleteObject(dat->hFont);
- SetWindowLong(hWnd, GWLP_USERDATA, NULL);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, NULL);
CallWindowProc(dat->OldWndProc, hWnd, Msg, wParam, lParam);
delete dat;
return 0;
@@ -329,16 +329,16 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
int MakeGroupCheckbox(HWND hWndCheckbox)
{ // workaround to make SetTextColor work in WM_CTLCOLORSTATIC with windows themes enabled
CCheckboxData *dat = new CCheckboxData();
- dat->OldWndProc = (WNDPROC)GetWindowLong(hWndCheckbox, GWLP_WNDPROC);
+ dat->OldWndProc = (WNDPROC)GetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC);
dat->State = SendMessage(hWndCheckbox, BM_GETSTATE, 0, 0);
- long Style = GetWindowLong(hWndCheckbox, GWL_STYLE);
+ long Style = GetWindowLongPtr(hWndCheckbox, GWL_STYLE);
dat->Style = Style & (BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
_ASSERT(dat->Style == BS_CHECKBOX || dat->Style == BS_AUTOCHECKBOX || dat->Style == BS_3STATE || dat->Style == BS_AUTO3STATE);
Style &= ~(BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
Style |= BS_OWNERDRAW;
- SetWindowLong(hWndCheckbox, GWL_STYLE, Style);
- SetWindowLong(hWndCheckbox, GWLP_USERDATA, (LONG)dat);
- SetWindowLong(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
+ SetWindowLongPtr(hWndCheckbox, GWL_STYLE, Style);
+ SetWindowLongPtr(hWndCheckbox, GWLP_USERDATA, (LONG_PTR)dat);
+ SetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC, (LONG_PTR)CheckboxWndProc);
SendMessage(hWndCheckbox, UM_INITCHECKBOX, 0, 0);
return 0;
}