user32: Add a test showing a problem in GetClassNameA.

This commit is contained in:
Mike McCormack 2006-10-23 20:41:33 +09:00 committed by Alexandre Julliard
parent f6c7ae6a0c
commit 48a63f2979
1 changed files with 6 additions and 0 deletions

View File

@ -300,6 +300,8 @@ static void test_instances(void)
HINSTANCE kernel32 = GetModuleHandleA("kernel32");
HINSTANCE user32 = GetModuleHandleA("user32");
HINSTANCE main_module = GetModuleHandleA(NULL);
DWORD r;
char buffer[0x10];
memset( &cls, 0, sizeof(cls) );
cls.style = CS_HREDRAW | CS_VREDRAW;
@ -411,6 +413,10 @@ static void test_instances(void)
"Didn't get kernel32 class for null instance\n" );
DestroyWindow( hwnd2 );
r = GetClassName( hwnd, buffer, 4 );
todo_wine ok( r == 3, "return wrong\n");
ok( !strcmp( buffer, "__t"), "name wrong\n");
ok( UnregisterClassA( name, kernel32 ), "Unregister failed for kernel32\n" );
hwnd2 = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, NULL, 0 );