summaryrefslogtreecommitdiff
path: root/plugins/CommonLibs
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CommonLibs')
-rw-r--r--plugins/CommonLibs/GroupCheckbox.cpp10
-rw-r--r--plugins/CommonLibs/ThemedImageCheckbox.cpp10
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/CommonLibs/GroupCheckbox.cpp b/plugins/CommonLibs/GroupCheckbox.cpp
index 20276fcbf3..b69211e330 100644
--- a/plugins/CommonLibs/GroupCheckbox.cpp
+++ b/plugins/CommonLibs/GroupCheckbox.cpp
@@ -60,7 +60,7 @@ public:
static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- CCheckboxData *dat = (CCheckboxData*)GetWindowLong(hWnd, GWL_USERDATA);
+ CCheckboxData *dat = (CCheckboxData*)GetWindowLong(hWnd, GWLP_USERDATA);
if (!dat)
{
return 0;
@@ -381,7 +381,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
{
DeleteObject(dat->hFont);
}
- SetWindowLong(hWnd, GWL_USERDATA, NULL);
+ SetWindowLong(hWnd, GWLP_USERDATA, NULL);
CallWindowProc(dat->OldWndProc, hWnd, Msg, wParam, lParam);
delete dat;
return 0;
@@ -393,7 +393,7 @@ 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, GWL_WNDPROC);
+ dat->OldWndProc = (WNDPROC)GetWindowLong(hWndCheckbox, GWLP_WNDPROC);
dat->State = SendMessage(hWndCheckbox, BM_GETSTATE, 0, 0);
long Style = GetWindowLong(hWndCheckbox, GWL_STYLE);
dat->Style = Style & (BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
@@ -401,8 +401,8 @@ int MakeGroupCheckbox(HWND hWndCheckbox)
Style &= ~(BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
Style |= BS_OWNERDRAW;
SetWindowLong(hWndCheckbox, GWL_STYLE, Style);
- SetWindowLong(hWndCheckbox, GWL_USERDATA, (LONG)dat);
- SetWindowLong(hWndCheckbox, GWL_WNDPROC, (LONG)CheckboxWndProc);
+ SetWindowLong(hWndCheckbox, GWLP_USERDATA, (LONG)dat);
+ SetWindowLong(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
SendMessage(hWndCheckbox, UM_INITCHECKBOX, 0, 0);
return 0;
}
diff --git a/plugins/CommonLibs/ThemedImageCheckbox.cpp b/plugins/CommonLibs/ThemedImageCheckbox.cpp
index ea0fbcea0a..ae239369b7 100644
--- a/plugins/CommonLibs/ThemedImageCheckbox.cpp
+++ b/plugins/CommonLibs/ThemedImageCheckbox.cpp
@@ -59,7 +59,7 @@ public:
static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
- CCheckboxData *dat = (CCheckboxData*)GetWindowLong(hWnd, GWL_USERDATA);
+ CCheckboxData *dat = (CCheckboxData*)GetWindowLong(hWnd, GWLP_USERDATA);
if (!dat)
{
return 0;
@@ -355,7 +355,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
} break;
case WM_DESTROY:
{
- SetWindowLong(hWnd, GWL_USERDATA, NULL);
+ SetWindowLong(hWnd, GWLP_USERDATA, NULL);
CallWindowProc(dat->OldWndProc, hWnd, Msg, wParam, lParam);
delete dat;
return 0;
@@ -367,7 +367,7 @@ static int CALLBACK CheckboxWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM l
int MakeThemedImageCheckbox(HWND hWndCheckbox)
{ // workaround to make checkbox with BS_ICON or BS_BITMAP work with windows themes enabled
CCheckboxData *dat = new CCheckboxData();
- dat->OldWndProc = (WNDPROC)GetWindowLong(hWndCheckbox, GWL_WNDPROC);
+ dat->OldWndProc = (WNDPROC)GetWindowLong(hWndCheckbox, GWLP_WNDPROC);
dat->State = SendMessage(hWndCheckbox, BM_GETSTATE, 0, 0);
long Style = GetWindowLong(hWndCheckbox, GWL_STYLE);
_ASSERT(Style & BS_ICON || Style & BS_BITMAP);
@@ -376,7 +376,7 @@ int MakeThemedImageCheckbox(HWND hWndCheckbox)
Style &= ~(BS_CHECKBOX | BS_AUTOCHECKBOX | BS_3STATE | BS_AUTO3STATE);
Style |= BS_OWNERDRAW;
SetWindowLong(hWndCheckbox, GWL_STYLE, Style);
- SetWindowLong(hWndCheckbox, GWL_USERDATA, (LONG)dat);
- SetWindowLong(hWndCheckbox, GWL_WNDPROC, (LONG)CheckboxWndProc);
+ SetWindowLong(hWndCheckbox, GWLP_USERDATA, (LONG)dat);
+ SetWindowLong(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
return 0;
}