Add a test for window's hinstance.

This commit is contained in:
Dmitry Timoshkov 2004-05-21 20:50:55 +00:00 committed by Alexandre Julliard
parent c3b8ce939b
commit e4dfaab29e
1 changed files with 6 additions and 3 deletions

View File

@ -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);
}