Use Get/SetWindowLongPtr instead of Get/SetWindowLong where
appropriate.
This commit is contained in:
parent
4c34d9386c
commit
e4b2a0bbbc
|
@ -234,7 +234,7 @@ static void test_subclass(void)
|
||||||
ok_sequence(Sub_AfterDeletedTest, "After Deleted");
|
ok_sequence(Sub_AfterDeletedTest, "After Deleted");
|
||||||
|
|
||||||
pSetWindowSubclass(hwnd, WndProcSub, 2, 0);
|
pSetWindowSubclass(hwnd, WndProcSub, 2, 0);
|
||||||
origProc3 = (WNDPROC)SetWindowLong(hwnd, GWL_WNDPROC, (LONG)WndProc3);
|
origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG)WndProc3);
|
||||||
SendMessage(hwnd, WM_USER, 1, 0);
|
SendMessage(hwnd, WM_USER, 1, 0);
|
||||||
SendMessage(hwnd, WM_USER, 2, 0);
|
SendMessage(hwnd, WM_USER, 2, 0);
|
||||||
ok_sequence(Sub_OldAfterNewTest, "Old after New");
|
ok_sequence(Sub_OldAfterNewTest, "Old after New");
|
||||||
|
|
|
@ -451,7 +451,7 @@ START_TEST(bitmap)
|
||||||
10, 10, 300, 300,
|
10, 10, 300, 300,
|
||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
assert(hWnd);
|
assert(hWnd);
|
||||||
is_win9x = GetWindowLongW(hWnd, GWL_WNDPROC) == 0;
|
is_win9x = GetWindowLongPtrW(hWnd, GWLP_WNDPROC) == 0;
|
||||||
DestroyWindow(hWnd);
|
DestroyWindow(hWnd);
|
||||||
|
|
||||||
test_createdibitmap();
|
test_createdibitmap();
|
||||||
|
|
|
@ -251,9 +251,9 @@ static void check_instance( const char *name, HINSTANCE inst, HINSTANCE info_ins
|
||||||
ok( (HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ) == gcl_inst,
|
ok( (HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ) == gcl_inst,
|
||||||
"Wrong GCL instance %p/%p for class %s\n",
|
"Wrong GCL instance %p/%p for class %s\n",
|
||||||
(HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ), gcl_inst, name );
|
(HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ), gcl_inst, name );
|
||||||
ok( (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ) == inst,
|
ok( (HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ) == inst,
|
||||||
"Wrong GWL instance %p/%p for window %s\n",
|
"Wrong GWL instance %p/%p for window %s\n",
|
||||||
(HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), inst, name );
|
(HINSTANCE)GetWindowLongPtrA( hwnd, GWLP_HINSTANCE ), inst, name );
|
||||||
ok(!UnregisterClassA(name, inst), "UnregisterClassA should fail while exists a class window\n");
|
ok(!UnregisterClassA(name, inst), "UnregisterClassA should fail while exists a class window\n");
|
||||||
ok(GetLastError() == ERROR_CLASS_HAS_WINDOWS, "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %ld\n", GetLastError());
|
ok(GetLastError() == ERROR_CLASS_HAS_WINDOWS, "GetLastError() should be set to ERROR_CLASS_HAS_WINDOWS not %ld\n", GetLastError());
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
|
|
|
@ -172,7 +172,7 @@ static void test_menu_ownerdraw(void)
|
||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
|
ok(hwnd != NULL, "CreateWindowEx failed with error %ld\n", GetLastError());
|
||||||
if( !hwnd) return;
|
if( !hwnd) return;
|
||||||
SetWindowLong( hwnd, GWL_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
|
SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
|
||||||
hmenu = CreatePopupMenu();
|
hmenu = CreatePopupMenu();
|
||||||
ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
|
ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
|
||||||
if( !hmenu) { DestroyWindow(hwnd);return;}
|
if( !hmenu) { DestroyWindow(hwnd);return;}
|
||||||
|
|
|
@ -4468,7 +4468,7 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
|
||||||
{
|
{
|
||||||
DWORD style = GetWindowLongA(hwnd, GWL_STYLE);
|
DWORD style = GetWindowLongA(hwnd, GWL_STYLE);
|
||||||
if (style & WS_CHILD)
|
if (style & WS_CHILD)
|
||||||
lParam = GetWindowLongA(hwnd, GWL_ID);
|
lParam = GetWindowLongPtrA(hwnd, GWLP_ID);
|
||||||
else if (style & WS_POPUP)
|
else if (style & WS_POPUP)
|
||||||
lParam = WND_POPUP_ID;
|
lParam = WND_POPUP_ID;
|
||||||
else
|
else
|
||||||
|
@ -4497,7 +4497,7 @@ static LRESULT WINAPI MsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam, LPAR
|
||||||
{
|
{
|
||||||
DWORD style = GetWindowLongA(hwnd, GWL_STYLE);
|
DWORD style = GetWindowLongA(hwnd, GWL_STYLE);
|
||||||
if (style & WS_CHILD)
|
if (style & WS_CHILD)
|
||||||
lParam = GetWindowLongA(hwnd, GWL_ID);
|
lParam = GetWindowLongPtrA(hwnd, GWLP_ID);
|
||||||
else if (style & WS_POPUP)
|
else if (style & WS_POPUP)
|
||||||
lParam = WND_POPUP_ID;
|
lParam = WND_POPUP_ID;
|
||||||
else
|
else
|
||||||
|
@ -4788,7 +4788,7 @@ static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
DWORD style = GetWindowLongA((HWND)wParam, GWL_STYLE);
|
DWORD style = GetWindowLongA((HWND)wParam, GWL_STYLE);
|
||||||
if (style & WS_CHILD)
|
if (style & WS_CHILD)
|
||||||
lParam = GetWindowLongA((HWND)wParam, GWL_ID);
|
lParam = GetWindowLongPtrA((HWND)wParam, GWLP_ID);
|
||||||
else if (style & WS_POPUP)
|
else if (style & WS_POPUP)
|
||||||
lParam = WND_POPUP_ID;
|
lParam = WND_POPUP_ID;
|
||||||
else
|
else
|
||||||
|
@ -5743,7 +5743,7 @@ static void test_DispatchMessage(void)
|
||||||
UpdateWindow( hwnd );
|
UpdateWindow( hwnd );
|
||||||
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
|
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
|
||||||
flush_sequence();
|
flush_sequence();
|
||||||
SetWindowLongPtrA( hwnd, GWL_WNDPROC, (LONG_PTR)DispatchMessageCheckProc );
|
SetWindowLongPtrA( hwnd, GWLP_WNDPROC, (LONG_PTR)DispatchMessageCheckProc );
|
||||||
|
|
||||||
SetRect( &rect, -5, -5, 5, 5 );
|
SetRect( &rect, -5, -5, 5, 5 );
|
||||||
RedrawWindow( hwnd, &rect, 0, RDW_INVALIDATE|RDW_ERASE|RDW_FRAME );
|
RedrawWindow( hwnd, &rect, 0, RDW_INVALIDATE|RDW_ERASE|RDW_FRAME );
|
||||||
|
|
|
@ -71,7 +71,7 @@ static void check_parents( HWND hwnd, HWND ga_parent, HWND gwl_parent, HWND get_
|
||||||
res = pGetAncestor( hwnd, GA_PARENT );
|
res = pGetAncestor( hwnd, GA_PARENT );
|
||||||
ok( res == ga_parent, "Wrong result for GA_PARENT %p expected %p\n", res, ga_parent );
|
ok( res == ga_parent, "Wrong result for GA_PARENT %p expected %p\n", res, ga_parent );
|
||||||
}
|
}
|
||||||
res = (HWND)GetWindowLongA( hwnd, GWL_HWNDPARENT );
|
res = (HWND)GetWindowLongPtrA( hwnd, GWLP_HWNDPARENT );
|
||||||
ok( res == gwl_parent, "Wrong result for GWL_HWNDPARENT %p expected %p\n", res, gwl_parent );
|
ok( res == gwl_parent, "Wrong result for GWL_HWNDPARENT %p expected %p\n", res, gwl_parent );
|
||||||
res = GetParent( hwnd );
|
res = GetParent( hwnd );
|
||||||
ok( res == get_parent, "Wrong result for GetParent %p expected %p\n", res, get_parent );
|
ok( res == get_parent, "Wrong result for GetParent %p expected %p\n", res, get_parent );
|
||||||
|
@ -300,24 +300,24 @@ static void test_parent_owner(void)
|
||||||
test = create_tool_window( WS_CHILD, hwndMain );
|
test = create_tool_window( WS_CHILD, hwndMain );
|
||||||
trace( "created child %p\n", test );
|
trace( "created child %p\n", test );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)hwndMain2 );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)hwndMain2 );
|
||||||
ok( ret == hwndMain, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain );
|
ok( ret == hwndMain, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain );
|
||||||
check_parents( test, hwndMain2, hwndMain2, hwndMain2, 0, hwndMain2, hwndMain2 );
|
check_parents( test, hwndMain2, hwndMain2, hwndMain2, 0, hwndMain2, hwndMain2 );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child );
|
||||||
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
|
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
|
||||||
check_parents( test, child, child, child, 0, hwndMain, hwndMain );
|
check_parents( test, child, child, child, 0, hwndMain, hwndMain );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)desktop );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)desktop );
|
||||||
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
||||||
check_parents( test, desktop, 0, desktop, 0, test, desktop );
|
check_parents( test, desktop, 0, desktop, 0, test, desktop );
|
||||||
|
|
||||||
/* window is now child of desktop so GWL_HWNDPARENT changes owner from now on */
|
/* window is now child of desktop so GWLP_HWNDPARENT changes owner from now on */
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child );
|
||||||
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
||||||
check_parents( test, desktop, child, desktop, child, test, desktop );
|
check_parents( test, desktop, child, desktop, child, test, desktop );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, 0 );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, 0 );
|
||||||
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
||||||
check_parents( test, desktop, 0, desktop, 0, test, desktop );
|
check_parents( test, desktop, 0, desktop, 0, test, desktop );
|
||||||
DestroyWindow( test );
|
DestroyWindow( test );
|
||||||
|
@ -326,15 +326,15 @@ static void test_parent_owner(void)
|
||||||
test = create_tool_window( 0, 0 );
|
test = create_tool_window( 0, 0 );
|
||||||
trace( "created top-level %p\n", test );
|
trace( "created top-level %p\n", test );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)hwndMain2 );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)hwndMain2 );
|
||||||
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
||||||
check_parents( test, desktop, hwndMain2, 0, hwndMain2, test, test );
|
check_parents( test, desktop, hwndMain2, 0, hwndMain2, test, test );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child );
|
||||||
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
|
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
|
||||||
check_parents( test, desktop, child, 0, child, test, test );
|
check_parents( test, desktop, child, 0, child, test, test );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, 0 );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, 0 );
|
||||||
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
||||||
check_parents( test, desktop, 0, 0, 0, test, test );
|
check_parents( test, desktop, 0, 0, 0, test, test );
|
||||||
DestroyWindow( test );
|
DestroyWindow( test );
|
||||||
|
@ -343,15 +343,15 @@ static void test_parent_owner(void)
|
||||||
test = create_tool_window( WS_POPUP, 0 );
|
test = create_tool_window( WS_POPUP, 0 );
|
||||||
trace( "created popup %p\n", test );
|
trace( "created popup %p\n", test );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)hwndMain2 );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)hwndMain2 );
|
||||||
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
||||||
check_parents( test, desktop, hwndMain2, hwndMain2, hwndMain2, test, hwndMain2 );
|
check_parents( test, desktop, hwndMain2, hwndMain2, hwndMain2, test, hwndMain2 );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (LONG_PTR)child );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (LONG_PTR)child );
|
||||||
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
|
ok( ret == hwndMain2, "GWL_HWNDPARENT return value %p expected %p\n", ret, hwndMain2 );
|
||||||
check_parents( test, desktop, child, child, child, test, hwndMain );
|
check_parents( test, desktop, child, child, child, test, hwndMain );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, 0 );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, 0 );
|
||||||
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
||||||
check_parents( test, desktop, 0, 0, 0, test, test );
|
check_parents( test, desktop, 0, 0, 0, test, test );
|
||||||
DestroyWindow( test );
|
DestroyWindow( test );
|
||||||
|
@ -390,7 +390,7 @@ static void test_parent_owner(void)
|
||||||
ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop );
|
ok( ret == desktop, "SetParent return value %p expected %p\n", ret, desktop );
|
||||||
check_parents( test, child, child, hwndMain2, hwndMain2, hwndMain, hwndMain2 );
|
check_parents( test, child, child, hwndMain2, hwndMain2, hwndMain, hwndMain2 );
|
||||||
|
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (ULONG_PTR)hwndMain );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (ULONG_PTR)hwndMain );
|
||||||
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
ok( ret == child, "GWL_HWNDPARENT return value %p expected %p\n", ret, child );
|
||||||
check_parents( test, hwndMain, hwndMain, hwndMain2, hwndMain2, hwndMain, hwndMain2 );
|
check_parents( test, hwndMain, hwndMain, hwndMain2, hwndMain2, hwndMain, hwndMain2 );
|
||||||
DestroyWindow( test );
|
DestroyWindow( test );
|
||||||
|
@ -426,7 +426,7 @@ static void test_parent_owner(void)
|
||||||
owner = create_tool_window( WS_CHILD, hwndMain2 );
|
owner = create_tool_window( WS_CHILD, hwndMain2 );
|
||||||
test = create_tool_window( WS_POPUP, 0 );
|
test = create_tool_window( WS_POPUP, 0 );
|
||||||
trace( "created owner %p and popup %p\n", owner, test );
|
trace( "created owner %p and popup %p\n", owner, test );
|
||||||
ret = (HWND)SetWindowLongA( test, GWL_HWNDPARENT, (ULONG_PTR)owner );
|
ret = (HWND)SetWindowLongPtrA( test, GWLP_HWNDPARENT, (ULONG_PTR)owner );
|
||||||
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
ok( ret == 0, "GWL_HWNDPARENT return value %p expected 0\n", ret );
|
||||||
check_parents( test, desktop, owner, owner, owner, test, hwndMain2 );
|
check_parents( test, desktop, owner, owner, owner, test, hwndMain2 );
|
||||||
DestroyWindow( owner );
|
DestroyWindow( owner );
|
||||||
|
@ -459,7 +459,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
|
||||||
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
|
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
|
||||||
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
|
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
|
||||||
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
|
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
|
||||||
SetWindowLongA(hwnd, GWL_USERDATA, 0x20031021);
|
SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0x20031021);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WM_WINDOWPOSCHANGING:
|
case WM_WINDOWPOSCHANGING:
|
||||||
|
@ -516,7 +516,7 @@ static LRESULT WINAPI main_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
|
||||||
}
|
}
|
||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
{
|
{
|
||||||
BOOL got_getminmaxinfo = GetWindowLongA(hwnd, GWL_USERDATA) == 0x20031021;
|
BOOL got_getminmaxinfo = GetWindowLongPtrA(hwnd, GWLP_USERDATA) == 0x20031021;
|
||||||
CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam;
|
CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam;
|
||||||
|
|
||||||
trace("WM_NCCREATE: hwnd %p, parent %p, style %08lx\n", hwnd, cs->hwndParent, cs->style);
|
trace("WM_NCCREATE: hwnd %p, parent %p, style %08lx\n", hwnd, cs->hwndParent, cs->style);
|
||||||
|
@ -554,12 +554,12 @@ static LRESULT WINAPI tool_window_procA(HWND hwnd, UINT msg, WPARAM wparam, LPAR
|
||||||
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
|
minmax->ptMaxPosition.x, minmax->ptMaxPosition.y,
|
||||||
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
|
minmax->ptMinTrackSize.x, minmax->ptMinTrackSize.y,
|
||||||
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
|
minmax->ptMaxTrackSize.x, minmax->ptMaxTrackSize.y);
|
||||||
SetWindowLongA(hwnd, GWL_USERDATA, 0x20031021);
|
SetWindowLongPtrA(hwnd, GWLP_USERDATA, 0x20031021);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WM_NCCREATE:
|
case WM_NCCREATE:
|
||||||
{
|
{
|
||||||
BOOL got_getminmaxinfo = GetWindowLongA(hwnd, GWL_USERDATA) == 0x20031021;
|
BOOL got_getminmaxinfo = GetWindowLongPtrA(hwnd, GWLP_USERDATA) == 0x20031021;
|
||||||
CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam;
|
CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam;
|
||||||
|
|
||||||
trace("WM_NCCREATE: hwnd %p, parent %p, style %08lx\n", hwnd, cs->hwndParent, cs->style);
|
trace("WM_NCCREATE: hwnd %p, parent %p, style %08lx\n", hwnd, cs->hwndParent, cs->style);
|
||||||
|
@ -670,7 +670,7 @@ static void test_nonclient_area(HWND hwnd)
|
||||||
DWORD style, exstyle;
|
DWORD style, exstyle;
|
||||||
RECT rc_window, rc_client, rc;
|
RECT rc_window, rc_client, rc;
|
||||||
BOOL menu;
|
BOOL menu;
|
||||||
BOOL is_win9x = GetWindowLongW(hwnd, GWL_WNDPROC) == 0;
|
BOOL is_win9x = GetWindowLongPtrW(hwnd, GWLP_WNDPROC) == 0;
|
||||||
|
|
||||||
style = GetWindowLongA(hwnd, GWL_STYLE);
|
style = GetWindowLongA(hwnd, GWL_STYLE);
|
||||||
exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
|
exstyle = GetWindowLongA(hwnd, GWL_EXSTYLE);
|
||||||
|
@ -973,14 +973,14 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_cs.lParam = (LPARAM)mdi_lParam_test_message;
|
mdi_cs.lParam = (LPARAM)mdi_lParam_test_message;
|
||||||
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
|
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
|
|
||||||
mdi_cs.style = 0x7fffffff; /* without WS_POPUP */
|
mdi_cs.style = 0x7fffffff; /* without WS_POPUP */
|
||||||
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
|
mdi_child = (HWND)SendMessageA(mdi_client, WM_MDICREATE, 0, (LPARAM)&mdi_cs);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
|
|
||||||
|
@ -993,7 +993,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
}
|
}
|
||||||
|
@ -1014,7 +1014,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
}
|
}
|
||||||
|
@ -1026,7 +1026,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, GetModuleHandle(0),
|
mdi_client, GetModuleHandle(0),
|
||||||
(LPARAM)mdi_lParam_test_message);
|
(LPARAM)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
|
|
||||||
|
@ -1037,7 +1037,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, GetModuleHandle(0),
|
mdi_client, GetModuleHandle(0),
|
||||||
(LPARAM)mdi_lParam_test_message);
|
(LPARAM)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
|
|
||||||
|
@ -1054,7 +1054,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
}
|
}
|
||||||
|
@ -1076,7 +1076,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
}
|
}
|
||||||
|
@ -1088,7 +1088,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, 0, GetModuleHandle(0),
|
mdi_client, 0, GetModuleHandle(0),
|
||||||
(LPVOID)mdi_lParam_test_message);
|
(LPVOID)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
|
|
||||||
|
@ -1099,7 +1099,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, 0, GetModuleHandle(0),
|
mdi_client, 0, GetModuleHandle(0),
|
||||||
(LPVOID)mdi_lParam_test_message);
|
(LPVOID)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
|
|
||||||
|
@ -1116,7 +1116,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
}
|
}
|
||||||
|
@ -1138,7 +1138,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == first_id, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == first_id, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
SendMessageA(mdi_client, WM_MDIDESTROY, (WPARAM)mdi_child, 0);
|
||||||
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
ok(!IsWindow(mdi_child), "WM_MDIDESTROY failed\n");
|
||||||
}
|
}
|
||||||
|
@ -1162,7 +1162,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, 0, GetModuleHandle(0),
|
mdi_client, 0, GetModuleHandle(0),
|
||||||
(LPVOID)mdi_lParam_test_message);
|
(LPVOID)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == 0, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
DestroyWindow(mdi_child);
|
DestroyWindow(mdi_child);
|
||||||
|
|
||||||
mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child",
|
mdi_child = CreateWindowExA(0, "MDI_child_Class_2", "MDI child",
|
||||||
|
@ -1172,7 +1172,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, 0, GetModuleHandle(0),
|
mdi_client, 0, GetModuleHandle(0),
|
||||||
(LPVOID)mdi_lParam_test_message);
|
(LPVOID)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == 0, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
DestroyWindow(mdi_child);
|
DestroyWindow(mdi_child);
|
||||||
|
|
||||||
/* maximized child */
|
/* maximized child */
|
||||||
|
@ -1183,7 +1183,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, 0, GetModuleHandle(0),
|
mdi_client, 0, GetModuleHandle(0),
|
||||||
(LPVOID)mdi_lParam_test_message);
|
(LPVOID)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == 0, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
DestroyWindow(mdi_child);
|
DestroyWindow(mdi_child);
|
||||||
|
|
||||||
trace("Creating maximized child with a caption\n");
|
trace("Creating maximized child with a caption\n");
|
||||||
|
@ -1194,7 +1194,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, 0, GetModuleHandle(0),
|
mdi_client, 0, GetModuleHandle(0),
|
||||||
(LPVOID)mdi_lParam_test_message);
|
(LPVOID)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == 0, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
DestroyWindow(mdi_child);
|
DestroyWindow(mdi_child);
|
||||||
|
|
||||||
trace("Creating maximized child with a caption and a thick frame\n");
|
trace("Creating maximized child with a caption and a thick frame\n");
|
||||||
|
@ -1205,7 +1205,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT first_id)
|
||||||
mdi_client, 0, GetModuleHandle(0),
|
mdi_client, 0, GetModuleHandle(0),
|
||||||
(LPVOID)mdi_lParam_test_message);
|
(LPVOID)mdi_lParam_test_message);
|
||||||
ok(mdi_child != 0, "MDI child creation failed\n");
|
ok(mdi_child != 0, "MDI child creation failed\n");
|
||||||
ok(GetWindowLongA(mdi_child, GWL_ID) == 0, "wrong child id %ld\n", GetWindowLongA(mdi_child, GWL_ID));
|
ok(GetWindowLongPtrA(mdi_child, GWLP_ID) == 0, "wrong child id %ld\n", GetWindowLongPtrA(mdi_child, GWLP_ID));
|
||||||
DestroyWindow(mdi_child);
|
DestroyWindow(mdi_child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3017,7 +3017,7 @@ static LRESULT WINAPI parentdc_window_procA(HWND hwnd, UINT msg, WPARAM wparam,
|
||||||
RECT rc;
|
RECT rc;
|
||||||
PAINTSTRUCT ps;
|
PAINTSTRUCT ps;
|
||||||
|
|
||||||
struct parentdc_stat *t = (struct parentdc_stat *)GetWindowLongPtrA(hwnd, GWL_USERDATA);
|
struct parentdc_stat *t = (struct parentdc_stat *)GetWindowLongPtrA(hwnd, GWLP_USERDATA);
|
||||||
|
|
||||||
switch (msg)
|
switch (msg)
|
||||||
{
|
{
|
||||||
|
@ -3175,13 +3175,13 @@ static void test_csparentdc(void)
|
||||||
AdjustWindowRectEx(&rc, WS_OVERLAPPEDWINDOW, FALSE, 0);
|
AdjustWindowRectEx(&rc, WS_OVERLAPPEDWINDOW, FALSE, 0);
|
||||||
hwndMain = CreateWindowA("ParentDcMainWindowClass", "Main Window", WS_OVERLAPPEDWINDOW,
|
hwndMain = CreateWindowA("ParentDcMainWindowClass", "Main Window", WS_OVERLAPPEDWINDOW,
|
||||||
CW_USEDEFAULT, 0, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, 0, NULL);
|
CW_USEDEFAULT, 0, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, 0, NULL);
|
||||||
SetWindowLongPtrA(hwndMain, GWL_USERDATA, (DWORD_PTR)&test_answer.main);
|
SetWindowLongPtrA(hwndMain, GWLP_USERDATA, (DWORD_PTR)&test_answer.main);
|
||||||
hwnd1 = CreateWindowA("ParentDcWindowClass", "Child Window 1", WS_CHILD,
|
hwnd1 = CreateWindowA("ParentDcWindowClass", "Child Window 1", WS_CHILD,
|
||||||
20, 20, 40, 40, hwndMain, NULL, 0, NULL);
|
20, 20, 40, 40, hwndMain, NULL, 0, NULL);
|
||||||
SetWindowLongPtrA(hwnd1, GWL_USERDATA, (DWORD_PTR)&test_answer.child1);
|
SetWindowLongPtrA(hwnd1, GWLP_USERDATA, (DWORD_PTR)&test_answer.child1);
|
||||||
hwnd2 = CreateWindowA("ParentDcWindowClass", "Child Window 2", WS_CHILD,
|
hwnd2 = CreateWindowA("ParentDcWindowClass", "Child Window 2", WS_CHILD,
|
||||||
40, 40, 40, 40, hwndMain, NULL, 0, NULL);
|
40, 40, 40, 40, hwndMain, NULL, 0, NULL);
|
||||||
SetWindowLongPtrA(hwnd2, GWL_USERDATA, (DWORD_PTR)&test_answer.child2);
|
SetWindowLongPtrA(hwnd2, GWLP_USERDATA, (DWORD_PTR)&test_answer.child2);
|
||||||
ShowWindow(hwndMain, SW_SHOW);
|
ShowWindow(hwndMain, SW_SHOW);
|
||||||
ShowWindow(hwnd1, SW_SHOW);
|
ShowWindow(hwnd1, SW_SHOW);
|
||||||
ShowWindow(hwnd2, SW_SHOW);
|
ShowWindow(hwnd2, SW_SHOW);
|
||||||
|
|
|
@ -115,7 +115,7 @@ LRESULT CALLBACK Graph_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP
|
||||||
|
|
||||||
hdc = BeginPaint(hWnd, &ps);
|
hdc = BeginPaint(hWnd, &ps);
|
||||||
|
|
||||||
WindowId = GetWindowLong(hWnd, GWL_ID);
|
WindowId = GetWindowLongPtr(hWnd, GWLP_ID);
|
||||||
|
|
||||||
switch (WindowId)
|
switch (WindowId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -196,10 +196,10 @@ LRESULT CALLBACK PerformancePageWndProc(HWND hDlg, UINT message, WPARAM wParam,
|
||||||
/*
|
/*
|
||||||
* Subclass graph buttons
|
* Subclass graph buttons
|
||||||
*/
|
*/
|
||||||
OldGraphWndProc = SetWindowLong(hPerformancePageCpuUsageGraph, GWL_WNDPROC, (LONG)Graph_WndProc);
|
OldGraphWndProc = SetWindowLongPtr(hPerformancePageCpuUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc);
|
||||||
SetWindowLong(hPerformancePageMemUsageGraph, GWL_WNDPROC, (LONG)Graph_WndProc);
|
SetWindowLongPtr(hPerformancePageMemUsageGraph, GWLP_WNDPROC, (LONG_PTR)Graph_WndProc);
|
||||||
OldGraphCtrlWndProc = SetWindowLong(hPerformancePageMemUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc);
|
OldGraphCtrlWndProc = SetWindowLongPtr(hPerformancePageMemUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc);
|
||||||
SetWindowLong(hPerformancePageCpuUsageHistoryGraph, GWL_WNDPROC, (LONG)GraphCtrl_WndProc);
|
SetWindowLongPtr(hPerformancePageCpuUsageHistoryGraph, GWLP_WNDPROC, (LONG_PTR)GraphCtrl_WndProc);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
|
|
@ -91,7 +91,7 @@ LRESULT CALLBACK ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPAR
|
||||||
/*
|
/*
|
||||||
* Subclass the process list control so we can intercept WM_ERASEBKGND
|
* Subclass the process list control so we can intercept WM_ERASEBKGND
|
||||||
*/
|
*/
|
||||||
OldProcessListWndProc = SetWindowLong(hProcessPageListCtrl, GWL_WNDPROC, (LONG)ProcessListWndProc);
|
OldProcessListWndProc = SetWindowLongPtr(hProcessPageListCtrl, GWLP_WNDPROC, (LONG_PTR)ProcessListWndProc);
|
||||||
|
|
||||||
/* Start our refresh thread */
|
/* Start our refresh thread */
|
||||||
CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL);
|
CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, NULL);
|
||||||
|
|
|
@ -65,7 +65,7 @@ static BOOL WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
|
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
|
||||||
di->hDlg = hDlg;
|
di->hDlg = hDlg;
|
||||||
SetWindowLong(hDlg, DWL_USER, (DWORD)di);
|
SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)di);
|
||||||
|
|
||||||
if (di->config.cursor_size <= 25) idc = IDC_OPT_CURSOR_SMALL;
|
if (di->config.cursor_size <= 25) idc = IDC_OPT_CURSOR_SMALL;
|
||||||
else if (di->config.cursor_size <= 50) idc = IDC_OPT_CURSOR_MEDIUM;
|
else if (di->config.cursor_size <= 50) idc = IDC_OPT_CURSOR_MEDIUM;
|
||||||
|
@ -89,7 +89,7 @@ static BOOL WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
DWORD val;
|
DWORD val;
|
||||||
BOOL done;
|
BOOL done;
|
||||||
|
|
||||||
di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
|
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER);
|
||||||
|
|
||||||
switch (nmhdr->code)
|
switch (nmhdr->code)
|
||||||
{
|
{
|
||||||
|
@ -176,7 +176,7 @@ static LRESULT WINAPI WCUSER_FontPreviewProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||||
struct dialog_info* di;
|
struct dialog_info* di;
|
||||||
HFONT hFont, hOldFont;
|
HFONT hFont, hOldFont;
|
||||||
|
|
||||||
di = (struct dialog_info*)GetWindowLong(GetParent(hWnd), DWL_USER);
|
di = (struct dialog_info*)GetWindowLongPtr(GetParent(hWnd), DWLP_USER);
|
||||||
BeginPaint(hWnd, &ps);
|
BeginPaint(hWnd, &ps);
|
||||||
|
|
||||||
font_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L);
|
font_idx = SendDlgItemMessage(di->hDlg, IDC_FNT_LIST_FONT, LB_GETCURSEL, 0L, 0L);
|
||||||
|
@ -520,7 +520,7 @@ static BOOL WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
|
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
|
||||||
di->hDlg = hDlg;
|
di->hDlg = hDlg;
|
||||||
SetWindowLong(hDlg, DWL_USER, (DWORD)di);
|
SetWindowLongPtr(hDlg, DWLP_USER, (DWORD_PTR)di);
|
||||||
/* remove dialog from this control, font will be reset when listboxes are filled */
|
/* remove dialog from this control, font will be reset when listboxes are filled */
|
||||||
SendDlgItemMessage(hDlg, IDC_FNT_PREVIEW, WM_SETFONT, 0L, 0L);
|
SendDlgItemMessage(hDlg, IDC_FNT_PREVIEW, WM_SETFONT, 0L, 0L);
|
||||||
fill_list_font(di);
|
fill_list_font(di);
|
||||||
|
@ -528,7 +528,7 @@ static BOOL WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
|
||||||
SetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0, di->config.def_attr & 0x0F);
|
SetWindowLong(GetDlgItem(hDlg, IDC_FNT_COLOR_FG), 0, di->config.def_attr & 0x0F);
|
||||||
break;
|
break;
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
|
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER);
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_FNT_LIST_FONT:
|
case IDC_FNT_LIST_FONT:
|
||||||
|
@ -550,7 +550,7 @@ static BOOL WINAPI WCUSER_FontDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
|
||||||
NMHDR* nmhdr = (NMHDR*)lParam;
|
NMHDR* nmhdr = (NMHDR*)lParam;
|
||||||
DWORD val;
|
DWORD val;
|
||||||
|
|
||||||
di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
|
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER);
|
||||||
switch (nmhdr->code)
|
switch (nmhdr->code)
|
||||||
{
|
{
|
||||||
case PSN_SETACTIVE:
|
case PSN_SETACTIVE:
|
||||||
|
@ -600,7 +600,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
|
di = (struct dialog_info*)((PROPSHEETPAGEA*)lParam)->lParam;
|
||||||
di->hDlg = hDlg;
|
di->hDlg = hDlg;
|
||||||
SetWindowLong(hDlg, DWL_USER, (DWORD)di);
|
SetWindowLongPtr(hDlg, DWLP_USER, (DWORD_PTR)di);
|
||||||
SetDlgItemInt(hDlg, IDC_CNF_SB_WIDTH, di->config.sb_width, FALSE);
|
SetDlgItemInt(hDlg, IDC_CNF_SB_WIDTH, di->config.sb_width, FALSE);
|
||||||
SetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, di->config.sb_height, FALSE);
|
SetDlgItemInt(hDlg, IDC_CNF_SB_HEIGHT, di->config.sb_height, FALSE);
|
||||||
SetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, di->config.win_width, FALSE);
|
SetDlgItemInt(hDlg, IDC_CNF_WIN_WIDTH, di->config.win_width, FALSE);
|
||||||
|
@ -621,7 +621,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
|
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER);
|
||||||
switch (LOWORD(wParam))
|
switch (LOWORD(wParam))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,7 @@ static BOOL WINAPI WCUSER_ConfigDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPAR
|
||||||
int win_w, win_h, sb_w, sb_h;
|
int win_w, win_h, sb_w, sb_h;
|
||||||
BOOL st1, st2;
|
BOOL st1, st2;
|
||||||
|
|
||||||
di = (struct dialog_info*)GetWindowLong(hDlg, DWL_USER);
|
di = (struct dialog_info*)GetWindowLongPtr(hDlg, DWLP_USER);
|
||||||
switch (nmhdr->code)
|
switch (nmhdr->code)
|
||||||
{
|
{
|
||||||
case PSN_SETACTIVE:
|
case PSN_SETACTIVE:
|
||||||
|
|
|
@ -1417,7 +1417,7 @@ static void packet_query_monitor_wnd_helper(struct gdb_context* gdbctx, HWND hWn
|
||||||
"%*s%04x%*s%-17.17s %08lx %08lx %.14s\n",
|
"%*s%04x%*s%-17.17s %08lx %08lx %.14s\n",
|
||||||
indent, "", (UINT)hWnd, 13 - indent, "",
|
indent, "", (UINT)hWnd, 13 - indent, "",
|
||||||
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
||||||
GetWindowLong(hWnd, GWL_WNDPROC), wndName);
|
GetWindowLongPtr(hWnd, GWLP_WNDPROC), wndName);
|
||||||
packet_reply_hex_to_str(gdbctx, buffer);
|
packet_reply_hex_to_str(gdbctx, buffer);
|
||||||
packet_reply_close(gdbctx);
|
packet_reply_close(gdbctx);
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ static void class_walker(HWND hWnd, struct class_walker* cw)
|
||||||
void info_win32_class(HWND hWnd, const char* name)
|
void info_win32_class(HWND hWnd, const char* name)
|
||||||
{
|
{
|
||||||
WNDCLASSEXA wca;
|
WNDCLASSEXA wca;
|
||||||
HINSTANCE hInst = hWnd ? (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE) : 0;
|
HINSTANCE hInst = hWnd ? (HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE) : 0;
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
{
|
{
|
||||||
|
@ -369,7 +369,7 @@ static void info_window(HWND hWnd, int indent)
|
||||||
dbg_printf("%*s%08x%*s %-17.17s %08lx %08lx %08lx %.14s\n",
|
dbg_printf("%*s%08x%*s %-17.17s %08lx %08lx %08lx %.14s\n",
|
||||||
indent, "", (UINT)hWnd, 12 - indent, "",
|
indent, "", (UINT)hWnd, 12 - indent, "",
|
||||||
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
clsName, GetWindowLong(hWnd, GWL_STYLE),
|
||||||
GetWindowLong(hWnd, GWL_WNDPROC),
|
GetWindowLongPtr(hWnd, GWLP_WNDPROC),
|
||||||
GetWindowThreadProcessId(hWnd, NULL), wndName);
|
GetWindowThreadProcessId(hWnd, NULL), wndName);
|
||||||
|
|
||||||
if ((child = GetWindow(hWnd, GW_CHILD)) != 0)
|
if ((child = GetWindow(hWnd, GW_CHILD)) != 0)
|
||||||
|
@ -416,12 +416,12 @@ void info_win32_window(HWND hWnd, BOOL detailed)
|
||||||
GetParent(hWnd),
|
GetParent(hWnd),
|
||||||
GetWindow(hWnd, GW_OWNER),
|
GetWindow(hWnd, GW_OWNER),
|
||||||
clsName,
|
clsName,
|
||||||
(HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE),
|
(HINSTANCE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE),
|
||||||
GetLastActivePopup(hWnd),
|
GetLastActivePopup(hWnd),
|
||||||
GetWindowLong(hWnd, GWL_ID),
|
GetWindowLongPtr(hWnd, GWLP_ID),
|
||||||
GetWindowLong(hWnd, GWL_STYLE),
|
GetWindowLong(hWnd, GWL_STYLE),
|
||||||
GetWindowLong(hWnd, GWL_EXSTYLE),
|
GetWindowLong(hWnd, GWL_EXSTYLE),
|
||||||
GetWindowLong(hWnd, GWL_WNDPROC),
|
GetWindowLongPtr(hWnd, GWLP_WNDPROC),
|
||||||
wndName,
|
wndName,
|
||||||
clientRect.left, clientRect.top, clientRect.right, clientRect.bottom,
|
clientRect.left, clientRect.top, clientRect.right, clientRect.bottom,
|
||||||
windowRect.left, windowRect.top, windowRect.right, windowRect.bottom,
|
windowRect.left, windowRect.top, windowRect.right, windowRect.bottom,
|
||||||
|
|
|
@ -1616,7 +1616,7 @@ static LRESULT CALLBACK CBTProc(int code, WPARAM wparam, LPARAM lparam)
|
||||||
newchild = NULL;
|
newchild = NULL;
|
||||||
|
|
||||||
child->hwnd = (HWND) wparam;
|
child->hwnd = (HWND) wparam;
|
||||||
SetWindowLong(child->hwnd, GWL_USERDATA, (LPARAM)child);
|
SetWindowLongPtr(child->hwnd, GWLP_USERDATA, (LPARAM)child);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CallNextHookEx(hcbthook, code, wparam, lparam);
|
return CallNextHookEx(hcbthook, code, wparam, lparam);
|
||||||
|
@ -1696,7 +1696,7 @@ static INT_PTR CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
|
||||||
|
|
||||||
switch(nmsg) {
|
switch(nmsg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
SetWindowLong(hwnd, GWL_USERDATA, lparam);
|
SetWindowLongPtr(hwnd, GWLP_USERDATA, lparam);
|
||||||
SetWindowText(GetDlgItem(hwnd, 201), (LPCTSTR)lparam);
|
SetWindowText(GetDlgItem(hwnd, 201), (LPCTSTR)lparam);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -1705,7 +1705,7 @@ static INT_PTR CALLBACK DestinationDlgProc(HWND hwnd, UINT nmsg, WPARAM wparam,
|
||||||
|
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case IDOK: {
|
case IDOK: {
|
||||||
LPTSTR dest = (LPTSTR) GetWindowLong(hwnd, GWL_USERDATA);
|
LPTSTR dest = (LPTSTR) GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||||
GetWindowText(GetDlgItem(hwnd, 201), dest, MAX_PATH);
|
GetWindowText(GetDlgItem(hwnd, 201), dest, MAX_PATH);
|
||||||
EndDialog(hwnd, id);
|
EndDialog(hwnd, id);
|
||||||
break;}
|
break;}
|
||||||
|
@ -2083,7 +2083,7 @@ static BOOL activate_drive_window(LPCTSTR path)
|
||||||
|
|
||||||
/* search for a already open window for the same drive */
|
/* search for a already open window for the same drive */
|
||||||
for(child_wnd=GetNextWindow(Globals.hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) {
|
for(child_wnd=GetNextWindow(Globals.hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) {
|
||||||
ChildWnd* child = (ChildWnd*) GetWindowLong(child_wnd, GWL_USERDATA);
|
ChildWnd* child = (ChildWnd*) GetWindowLongPtr(child_wnd, GWLP_USERDATA);
|
||||||
|
|
||||||
if (child) {
|
if (child) {
|
||||||
_tsplitpath(child->root.path, drv2, 0, 0, 0);
|
_tsplitpath(child->root.path, drv2, 0, 0, 0);
|
||||||
|
@ -2108,7 +2108,7 @@ static BOOL activate_fs_window(LPCTSTR filesys)
|
||||||
|
|
||||||
/* search for a already open window of the given file system name */
|
/* search for a already open window of the given file system name */
|
||||||
for(child_wnd=GetNextWindow(Globals.hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) {
|
for(child_wnd=GetNextWindow(Globals.hmdiclient,GW_CHILD); child_wnd; child_wnd=GetNextWindow(child_wnd, GW_HWNDNEXT)) {
|
||||||
ChildWnd* child = (ChildWnd*) GetWindowLong(child_wnd, GWL_USERDATA);
|
ChildWnd* child = (ChildWnd*) GetWindowLongPtr(child_wnd, GWLP_USERDATA);
|
||||||
|
|
||||||
if (child) {
|
if (child) {
|
||||||
if (!lstrcmpi(child->root.fs, filesys)) {
|
if (!lstrcmpi(child->root.fs, filesys)) {
|
||||||
|
@ -2253,7 +2253,7 @@ static LRESULT CALLBACK FrameWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
|
||||||
|
|
||||||
/* change font in all open child windows */
|
/* change font in all open child windows */
|
||||||
for(childWnd=GetWindow(Globals.hmdiclient,GW_CHILD); childWnd; childWnd=GetNextWindow(childWnd,GW_HWNDNEXT)) {
|
for(childWnd=GetWindow(Globals.hmdiclient,GW_CHILD); childWnd; childWnd=GetNextWindow(childWnd,GW_HWNDNEXT)) {
|
||||||
ChildWnd* child = (ChildWnd*) GetWindowLong(childWnd, GWL_USERDATA);
|
ChildWnd* child = (ChildWnd*) GetWindowLongPtr(childWnd, GWLP_USERDATA);
|
||||||
SetWindowFont(child->left.hwnd, Globals.hfont, TRUE);
|
SetWindowFont(child->left.hwnd, Globals.hfont, TRUE);
|
||||||
SetWindowFont(child->right.hwnd, Globals.hfont, TRUE);
|
SetWindowFont(child->right.hwnd, Globals.hfont, TRUE);
|
||||||
ListBox_SetItemHeight(child->left.hwnd, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3));
|
ListBox_SetItemHeight(child->left.hwnd, 1, max(Globals.spaceSize.cy,IMAGE_HEIGHT+3));
|
||||||
|
@ -2860,7 +2860,7 @@ static void create_tree_window(HWND parent, Pane* pane, int id, int id_header, L
|
||||||
LBS_DISABLENOSCROLL|LBS_NOINTEGRALHEIGHT|LBS_OWNERDRAWFIXED|LBS_NOTIFY,
|
LBS_DISABLENOSCROLL|LBS_NOINTEGRALHEIGHT|LBS_OWNERDRAWFIXED|LBS_NOTIFY,
|
||||||
0, 0, 0, 0, parent, (HMENU)id, Globals.hInstance, 0);
|
0, 0, 0, 0, parent, (HMENU)id, Globals.hInstance, 0);
|
||||||
|
|
||||||
SetWindowLong(pane->hwnd, GWL_USERDATA, (LPARAM)pane);
|
SetWindowLongPtr(pane->hwnd, GWLP_USERDATA, (LPARAM)pane);
|
||||||
g_orgTreeWndProc = SubclassWindow(pane->hwnd, TreeWndProc);
|
g_orgTreeWndProc = SubclassWindow(pane->hwnd, TreeWndProc);
|
||||||
|
|
||||||
SetWindowFont(pane->hwnd, Globals.hfont, FALSE);
|
SetWindowFont(pane->hwnd, Globals.hfont, FALSE);
|
||||||
|
@ -4142,7 +4142,7 @@ static HRESULT ShellFolderContextMenu(IShellFolder* shell_folder, HWND hwndParen
|
||||||
|
|
||||||
static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
|
static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
ChildWnd* child = (ChildWnd*) GetWindowLong(hwnd, GWL_USERDATA);
|
ChildWnd* child = (ChildWnd*) GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||||
ASSERT(child);
|
ASSERT(child);
|
||||||
|
|
||||||
switch(nmsg) {
|
switch(nmsg) {
|
||||||
|
@ -4165,7 +4165,7 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
|
||||||
|
|
||||||
case WM_NCDESTROY:
|
case WM_NCDESTROY:
|
||||||
free_child_window(child);
|
free_child_window(child);
|
||||||
SetWindowLong(hwnd, GWL_USERDATA, 0);
|
SetWindowLongPtr(hwnd, GWLP_USERDATA, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_PAINT: {
|
case WM_PAINT: {
|
||||||
|
@ -4524,8 +4524,8 @@ static LRESULT CALLBACK ChildWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM
|
||||||
|
|
||||||
static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
|
static LRESULT CALLBACK TreeWndProc(HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||||
{
|
{
|
||||||
ChildWnd* child = (ChildWnd*) GetWindowLong(GetParent(hwnd), GWL_USERDATA);
|
ChildWnd* child = (ChildWnd*) GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA);
|
||||||
Pane* pane = (Pane*) GetWindowLong(hwnd, GWL_USERDATA);
|
Pane* pane = (Pane*) GetWindowLongPtr(hwnd, GWLP_USERDATA);
|
||||||
ASSERT(child);
|
ASSERT(child);
|
||||||
|
|
||||||
switch(nmsg) {
|
switch(nmsg) {
|
||||||
|
|
|
@ -763,8 +763,8 @@ static LRESULT CALLBACK WINHELP_ButtonBoxWndProc(HWND hWnd, UINT msg, WPARAM wPa
|
||||||
Globals.hInstance, 0);
|
Globals.hInstance, 0);
|
||||||
if (button->hWnd) {
|
if (button->hWnd) {
|
||||||
if (Globals.button_proc == NULL)
|
if (Globals.button_proc == NULL)
|
||||||
Globals.button_proc = (WNDPROC) GetWindowLong(button->hWnd, GWL_WNDPROC);
|
Globals.button_proc = (WNDPROC) GetWindowLongPtr(button->hWnd, GWLP_WNDPROC);
|
||||||
SetWindowLong(button->hWnd, GWL_WNDPROC, (LONG) WINHELP_ButtonWndProc);
|
SetWindowLongPtr(button->hWnd, GWLP_WNDPROC, (LONG_PTR) WINHELP_ButtonWndProc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hDc = GetDC(button->hWnd);
|
hDc = GetDC(button->hWnd);
|
||||||
|
|
Loading…
Reference in New Issue