[REACTOS] Fix a number of Get/SetWindowsLong*Ptr* issues and use GWLP_* instead of GWL_* where appropriate.

This commit is contained in:
Timo Kreuzer 2018-02-05 02:42:14 +01:00
parent 173971d947
commit d281d14fd1
25 changed files with 118 additions and 118 deletions

View file

@ -101,7 +101,7 @@ static void OnSize(ChildWnd* pChildWnd, WPARAM wParam, LPARAM lParam)
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static int last_split;
ChildWnd* pChildWnd = (ChildWnd*)GetWindowLong(hWnd, GWL_USERDATA);
ChildWnd* pChildWnd = (ChildWnd*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
ASSERT(pChildWnd);
switch(message) {
@ -121,7 +121,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
return 0;
case WM_NCDESTROY:
// SetWindowLong(hWnd, GWL_USERDATA, 0);
// SetWindowLongPtr(hWnd, GWLP_USERDATA, 0);
break;
case WM_SETCURSOR:

View file

@ -95,7 +95,7 @@ LRESULT CALLBACK CBTProc(int code, WPARAM wParam, LPARAM lParam)
ChildWnd* pChildWnd = newchild;
newchild = NULL;
pChildWnd->hWnd = (HWND)wParam;
SetWindowLong(pChildWnd->hWnd, GWL_USERDATA, (LPARAM)pChildWnd);
SetWindowLongPtr(pChildWnd->hWnd, GWLP_USERDATA, (LPARAM)pChildWnd);
}
return CallNextHookEx(hcbthook, code, wParam, lParam);
}

View file

@ -82,7 +82,7 @@ static void OnPaint(HWND hWnd, ChildWnd* pChildWnd)
LRESULT CALLBACK PanelWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
// Pane* pane;
// ChildWnd* pChildWnd = (ChildWnd*)GetWindowLong(hWnd, GWL_USERDATA);
// ChildWnd* pChildWnd = (ChildWnd*)GetWindowLongPtr(hWnd, GWLP_USERDATA);
// ChildWnd* new_child;
// ASSERT(pChildWnd);