Commit e4dfaab2 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Add a test for window's hinstance.

parent c3b8ce93
......@@ -240,7 +240,7 @@ static void check_class(HINSTANCE inst, const char *name, const char *menu_name)
static void check_instance( const char *name, HINSTANCE inst, HINSTANCE info_inst, HINSTANCE gcl_inst )
{
WNDCLASS wc;
WNDCLASSA wc;
HWND hwnd;
ok( GetClassInfo( inst, name, &wc ), "Couldn't find class %s inst %p\n", name, inst );
......@@ -248,9 +248,12 @@ static void check_instance( const char *name, HINSTANCE inst, HINSTANCE info_ins
wc.hInstance, info_inst, name );
hwnd = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, inst, 0 );
ok( hwnd != NULL, "Couldn't create window for class %s inst %p\n", name, inst );
ok( (HINSTANCE)GetClassLong( hwnd, GCL_HMODULE ) == gcl_inst,
ok( (HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ) == gcl_inst,
"Wrong GCL instance %p/%p for class %s\n",
(HINSTANCE)GetClassLong( hwnd, GCL_HMODULE ), gcl_inst, name );
(HINSTANCE)GetClassLongA( hwnd, GCL_HMODULE ), gcl_inst, name );
ok( (HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ) == inst,
"Wrong GWL instance %p/%p for window %s\n",
(HINSTANCE)GetWindowLongA( hwnd, GWL_HINSTANCE ), inst, name );
DestroyWindow(hwnd);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment