diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-08 21:02:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-08 21:02:06 +0000 |
commit | 2840393bf5378c012577c4764dc4cbd162f85d4e (patch) | |
tree | 257a83be6f650415d8b47bb982b0bc700e6c9f8c /plugins/CommonLibs | |
parent | d0ffabed30e05f6dc56e2e5231637f333bc16003 (diff) |
GetWindowLong -> GetWindowLongPtr
git-svn-id: http://svn.miranda-ng.org/main/trunk@364 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CommonLibs')
-rw-r--r-- | plugins/CommonLibs/GroupCheckbox.cpp | 14 | ||||
-rw-r--r-- | plugins/CommonLibs/Options.cpp | 6 | ||||
-rw-r--r-- | plugins/CommonLibs/ThemedImageCheckbox.cpp | 14 |
3 files changed, 17 insertions, 17 deletions
diff --git a/plugins/CommonLibs/GroupCheckbox.cpp b/plugins/CommonLibs/GroupCheckbox.cpp index b69211e330..8834014452 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, GWLP_USERDATA);
+ CCheckboxData *dat = (CCheckboxData*)GetWindowLongPtr(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, GWLP_USERDATA, NULL);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, NULL);
CallWindowProc(dat->OldWndProc, hWnd, Msg, wParam, lParam);
delete dat;
return 0;
@@ -393,16 +393,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)dat);
+ SetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
SendMessage(hWndCheckbox, UM_INITCHECKBOX, 0, 0);
return 0;
}
diff --git a/plugins/CommonLibs/Options.cpp b/plugins/CommonLibs/Options.cpp index 7e7f9a23e1..4583cae0b5 100644 --- a/plugins/CommonLibs/Options.cpp +++ b/plugins/CommonLibs/Options.cpp @@ -480,9 +480,9 @@ void COptItem_TreeCtrl::MemToWnd(HWND hWnd) HWND hTreeView = GetDlgItem(hWnd, DlgItemID);
if (TreeFlags & TREECTRL_FLAG_HAS_CHECKBOXES)
{ // have to set this in run-time as it's specified in MSDN
- LONG Style = GetWindowLong(hTreeView, GWL_STYLE);
- SetWindowLong(hTreeView, GWL_STYLE, Style & ~TVS_CHECKBOXES);
- SetWindowLong(hTreeView, GWL_STYLE, Style | TVS_CHECKBOXES);
+ LONG Style = GetWindowLongPtr(hTreeView, GWL_STYLE);
+ SetWindowLongPtr(hTreeView, GWL_STYLE, Style & ~TVS_CHECKBOXES);
+ SetWindowLongPtr(hTreeView, GWL_STYLE, Style | TVS_CHECKBOXES);
}
TVINSERTSTRUCT tvIn = {0};
int ScrollPos = GetScrollPos(hTreeView, SB_VERT);
diff --git a/plugins/CommonLibs/ThemedImageCheckbox.cpp b/plugins/CommonLibs/ThemedImageCheckbox.cpp index ae239369b7..082e8accf8 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, GWLP_USERDATA);
+ CCheckboxData *dat = (CCheckboxData*)GetWindowLongPtr(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, GWLP_USERDATA, NULL);
+ SetWindowLongPtr(hWnd, GWLP_USERDATA, NULL);
CallWindowProc(dat->OldWndProc, hWnd, Msg, wParam, lParam);
delete dat;
return 0;
@@ -367,16 +367,16 @@ 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, 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);
_ASSERT(Style & BS_ICON || Style & BS_BITMAP);
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)dat);
+ SetWindowLongPtr(hWndCheckbox, GWLP_WNDPROC, (LONG)CheckboxWndProc);
return 0;
}
|