user32/tests: Remove superfluous pointer casts.

The (MENUITEMINFO)->dwTypeData is really a string ... the joys of the
Hungarian notation.
This commit is contained in:
Michael Stefaniuc 2009-02-05 09:53:39 +01:00 committed by Alexandre Julliard
parent 15229de500
commit e89386a59e
6 changed files with 60 additions and 66 deletions

View File

@ -279,7 +279,7 @@ struct class_info
static DWORD WINAPI thread_proc(void *param)
{
struct class_info *class_info = (struct class_info *)param;
struct class_info *class_info = param;
check_instance(class_info->name, class_info->inst, class_info->info_inst, class_info->gcl_inst);
@ -415,7 +415,7 @@ static void test_instances(void)
cls.style = 3;
ok( RegisterClassA( &cls ), "Failed to register local class for deadbeef\n" );
hwnd2 = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, NULL, 0 );
ok( (HINSTANCE)GetClassLongPtrA( hwnd2, GCLP_HMODULE ) == (HINSTANCE)0xdeadbeef,
ok( GetClassLongPtrA( hwnd2, GCLP_HMODULE ) == 0xdeadbeef,
"Didn't get deadbeef class for null instance\n" );
DestroyWindow( hwnd2 );
ok( UnregisterClassA( name, (HINSTANCE)0xdeadbeef ), "Unregister failed for deadbeef\n" );
@ -592,8 +592,8 @@ static void test_builtinproc(void)
HWND hwnd;
int i;
pDefWindowProcA = (void *)GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcA");
pDefWindowProcW = (void *)GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcW");
pDefWindowProcA = GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcA");
pDefWindowProcW = GetProcAddress(GetModuleHandle("user32.dll"), "DefWindowProcW");
for (i = 0; i < 4; i++)
{
@ -800,10 +800,8 @@ static BOOL RegisterTestDialog(HINSTANCE hInstance)
wcx.hbrBackground = GetStockObject(WHITE_BRUSH);
wcx.lpszClassName = "TestDialog";
wcx.lpszMenuName = "TestDialog";
wcx.hIconSm = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(5),
IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON),
GetSystemMetrics(SM_CYSMICON),
wcx.hIconSm = LoadImage(hInstance, MAKEINTRESOURCE(5), IMAGE_ICON,
GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
LR_DEFAULTCOLOR);
atom = RegisterClassEx(&wcx);

View File

@ -736,7 +736,7 @@ static HDDEDATA CALLBACK server_ddeml_callback(UINT uType, UINT uFmt, HCONV hcon
{
ok(!lstrcmpA(ptr, "[BadCommand(Var)]"), "Expected '[BadCommand(Var)]', got %s\n", ptr);
ok(size == 18, "Expected 18, got %d\n", size);
ret = (HDDEDATA)DDE_FNOTPROCESSED;
ret = DDE_FNOTPROCESSED;
}
DdeUnaccessData(hdata);

View File

@ -59,10 +59,10 @@ create_listbox (DWORD add_style, HWND parent)
parent, (HMENU)ctl_id, NULL, 0);
assert (handle);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[0]);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[1]);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[2]);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) (LPCTSTR) strings[3]);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[0]);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[1]);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[2]);
SendMessage (handle, LB_ADDSTRING, 0, (LPARAM) strings[3]);
#ifdef VISIBLE
ShowWindow (handle, SW_SHOW);

View File

@ -169,8 +169,8 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
RECT rc;
GetMenuItemRect( hwnd, (HMENU)pdis->hwndItem, pdis->itemData ,&rc);
trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %d,%d-%d,%d itemrc: %d,%d-%d,%d\n",
hwnd, (HMENU)pdis->hwndItem, pdis->itemData,
pdis->itemID, pdis->rcItem.left, pdis->rcItem.top,
hwnd, pdis->hwndItem, pdis->itemData, pdis->itemID,
pdis->rcItem.left, pdis->rcItem.top,
pdis->rcItem.right,pdis->rcItem.bottom,
rc.left,rc.top,rc.right,rc.bottom);
oldpen=SelectObject( pdis->hDC, GetStockObject(
@ -633,7 +633,7 @@ static void test_menu_add_string( void )
ok (!strcmp( strback, "Dummy string" ), "Menu text from Ansi version incorrect\n");
SetLastError(0xdeadbeef);
ret = GetMenuStringW( hmenu, 0, (WCHAR *)strbackW, 99, MF_BYPOSITION);
ret = GetMenuStringW( hmenu, 0, strbackW, 99, MF_BYPOSITION );
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
skip("GetMenuStringW is not implemented\n");
else
@ -827,7 +827,7 @@ static void modify_menu( int line, HMENU hmenu, BOOL ansi, UINT flags, UINT_PTR
SetLastError( 0xdeadbeef );
if (ansi) ret = ModifyMenuA( hmenu, 0, flags, id, data );
else ret = ModifyMenuW( hmenu, 0, flags, id, (WCHAR *)data );
else ret = ModifyMenuW( hmenu, 0, flags, id, data );
ok_(__FILE__,line)( ret, "ModifyMenuA failed, err %u\n", GetLastError());
}
@ -864,8 +864,8 @@ static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UIN
#define TMII_INSMI( c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,eret1 )\
hmenu = CreateMenu();\
submenu = CreateMenu();\
if(ansi)strcpy( string, init);\
else strcpyW( (WCHAR*)string, (WCHAR*)init);\
if(ansi)strcpy( string, init );\
else strcpyW( string, init );\
insert_menu_item( __LINE__, hmenu, ansi, c1, d1, e1, f1, g1, h1, i1, j1, k1, l1, m1, eret1 )
/* GetMenuItemInfo + GetMenuString */
@ -2248,7 +2248,7 @@ static void test_menu_resource_layout(void)
"%u: expected wID %04x, got %04x\n", i, menu_data[i].id, mii.wID);
ok(mii.cch == strlen(menu_data[i].str),
"%u: expected cch %u, got %u\n", i, (UINT)strlen(menu_data[i].str), mii.cch);
ok(!strcmp((LPCSTR)mii.dwTypeData, menu_data[i].str),
ok(!strcmp(mii.dwTypeData, menu_data[i].str),
"%u: expected dwTypeData %s, got %s\n", i, menu_data[i].str, (LPCSTR)mii.dwTypeData);
}
@ -2320,7 +2320,7 @@ static void compare_menu_data(HMENU hmenu, const struct menu_data *item, INT ite
{
ok(mii.cch == strlen(item[i].str),
"%u: expected cch %u, got %u\n", i, (UINT)strlen(item[i].str), mii.cch);
ok(!strcmp((LPCSTR)mii.dwTypeData, item[i].str),
ok(!strcmp(mii.dwTypeData, item[i].str),
"%u: expected dwTypeData %s, got %s\n", i, item[i].str, (LPCSTR)mii.dwTypeData);
}
}

View File

@ -6240,7 +6240,7 @@ struct wnd_event
static DWORD WINAPI thread_proc(void *param)
{
MSG msg;
struct wnd_event *wnd_event = (struct wnd_event *)param;
struct wnd_event *wnd_event = param;
wnd_event->hwnd = CreateWindowExA(0, "TestWindowClass", "window caption text", WS_OVERLAPPEDWINDOW,
100, 100, 200, 200, 0, 0, 0, NULL);
@ -7877,7 +7877,7 @@ static void test_winevents(void)
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
hwnd2 = (HWND)hevent;
hwnd2 = hevent;
hthread = CreateThread(NULL, 0, cbt_global_hook_thread_proc, &hwnd2, 0, &tid);
ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
@ -7930,7 +7930,7 @@ static void test_winevents(void)
ok_sequence(WmWinEventsSeq, "notify winevents", FALSE);
/****** start of event filtering test *************/
hhook = (HWINEVENTHOOK)pSetWinEventHook(
hhook = pSetWinEventHook(
EVENT_OBJECT_SHOW, /* 0x8002 */
EVENT_OBJECT_LOCATIONCHANGE, /* 0x800B */
GetModuleHandleA(0), win_event_global_hook_proc,
@ -7940,7 +7940,7 @@ static void test_winevents(void)
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
hwnd2 = (HWND)hevent;
hwnd2 = hevent;
hthread = CreateThread(NULL, 0, win_event_global_thread_proc, &hwnd2, 0, &tid);
ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
@ -7969,16 +7969,14 @@ static void test_winevents(void)
/****** end of event filtering test *************/
/****** start of out of context event test *************/
hhook = (HWINEVENTHOOK)pSetWinEventHook(
EVENT_MIN, EVENT_MAX,
0, win_event_global_hook_proc,
GetCurrentProcessId(), 0,
hhook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0,
win_event_global_hook_proc, GetCurrentProcessId(), 0,
WINEVENT_OUTOFCONTEXT);
ok(hhook != 0, "SetWinEventHook error %d\n", GetLastError());
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
hwnd2 = (HWND)hevent;
hwnd2 = hevent;
flush_sequence();
@ -8025,7 +8023,7 @@ static void test_winevents(void)
hevent = CreateEventA(NULL, 0, 0, NULL);
assert(hevent);
hwnd2 = (HWND)hevent;
hwnd2 = hevent;
hthread = CreateThread(NULL, 0, mouse_ll_global_thread_proc, &hwnd2, 0, &tid);
ok(hthread != NULL, "CreateThread failed, error %d\n", GetLastError());
@ -8092,8 +8090,8 @@ static void test_set_hook(void)
/* even process local incontext hooks require hmodule */
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(EVENT_MIN, EVENT_MAX,
0, win_event_proc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);
hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc,
GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);
ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n");
ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
@ -8101,8 +8099,8 @@ static void test_set_hook(void)
/* even thread local incontext hooks require hmodule */
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(EVENT_MIN, EVENT_MAX,
0, win_event_proc, GetCurrentProcessId(), GetCurrentThreadId(), WINEVENT_INCONTEXT);
hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc,
GetCurrentProcessId(), GetCurrentThreadId(), WINEVENT_INCONTEXT);
ok(!hwinevent_hook, "WINEVENT_INCONTEXT requires hModule != 0\n");
ok(GetLastError() == ERROR_HOOK_NEEDS_HMOD || /* Win2k */
GetLastError() == 0xdeadbeef, /* Win9x */
@ -8112,27 +8110,27 @@ static void test_set_hook(void)
{
/* these 3 tests don't pass under Win9x */
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(1, 0,
0, win_event_proc, GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
hwinevent_hook = pSetWinEventHook(1, 0, 0, win_event_proc,
GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
ok(!hwinevent_hook, "SetWinEventHook with invalid event range should fail\n");
ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %d\n", GetLastError());
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(-1, 1,
0, win_event_proc, GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
hwinevent_hook = pSetWinEventHook(-1, 1, 0, win_event_proc,
GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
ok(!hwinevent_hook, "SetWinEventHook with invalid event range should fail\n");
ok(GetLastError() == ERROR_INVALID_HOOK_FILTER, "unexpected error %d\n", GetLastError());
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(EVENT_MIN, EVENT_MAX,
0, win_event_proc, 0, 0xdeadbeef, WINEVENT_OUTOFCONTEXT);
hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc,
0, 0xdeadbeef, WINEVENT_OUTOFCONTEXT);
ok(!hwinevent_hook, "SetWinEventHook with invalid tid should fail\n");
ok(GetLastError() == ERROR_INVALID_THREAD_ID, "unexpected error %d\n", GetLastError());
}
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(0, 0,
0, win_event_proc, GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
hwinevent_hook = pSetWinEventHook(0, 0, 0, win_event_proc,
GetCurrentProcessId(), 0, WINEVENT_OUTOFCONTEXT);
ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
ret = pUnhookWinEvent(hwinevent_hook);
@ -8142,8 +8140,8 @@ todo_wine {
/* This call succeeds under win2k SP4, but fails under Wine.
Does win2k test/use passed process id? */
SetLastError(0xdeadbeef);
hwinevent_hook = (HWINEVENTHOOK)pSetWinEventHook(EVENT_MIN, EVENT_MAX,
0, win_event_proc, 0xdeadbeef, 0, WINEVENT_OUTOFCONTEXT);
hwinevent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX, 0, win_event_proc,
0xdeadbeef, 0, WINEVENT_OUTOFCONTEXT);
ok(hwinevent_hook != 0, "SetWinEventHook error %d\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "unexpected error %d\n", GetLastError());
ret = pUnhookWinEvent(hwinevent_hook);
@ -11336,12 +11334,10 @@ START_TEST(msg)
if (pSetWinEventHook)
{
hEvent_hook = (HWINEVENTHOOK)pSetWinEventHook(EVENT_MIN, EVENT_MAX,
GetModuleHandleA(0),
win_event_proc,
0,
GetCurrentThreadId(),
WINEVENT_INCONTEXT);
hEvent_hook = pSetWinEventHook(EVENT_MIN, EVENT_MAX,
GetModuleHandleA(0), win_event_proc,
0, GetCurrentThreadId(),
WINEVENT_INCONTEXT);
assert(hEvent_hook);
if (pIsWinEventHookInstalled)

View File

@ -1228,7 +1228,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
ok(id == first_id, "wrong child id %ld\n", id);
@ -1240,7 +1240,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
ok(id == first_id, "wrong child id %ld\n", id);
@ -1252,7 +1252,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
if (GetWindowLongA(mdi_client, GWL_STYLE) & MDIS_ALLCHILDSTYLES)
{
ok(!mdi_child, "MDI child with WS_POPUP and with MDIS_ALLCHILDSTYLES should fail\n");
@ -1273,7 +1273,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
if (!mdi_child)
{
if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
@ -1297,7 +1297,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
parent, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(!mdi_child, "WS_EX_MDICHILD with a not MDIClient parent should fail\n");
}
@ -1306,7 +1306,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
ok(id == 0, "wrong child id %ld\n", id);
@ -1317,7 +1317,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
ok(id == 0, "wrong child id %ld\n", id);
@ -1329,7 +1329,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
ok(id == 0, "wrong child id %ld\n", id);
@ -1341,7 +1341,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
ok(id == 0, "wrong child id %ld\n", id);
@ -1353,7 +1353,7 @@ static void test_MDI_create(HWND parent, HWND mdi_client, INT_PTR first_id)
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
mdi_client, 0, GetModuleHandle(0),
(LPVOID)mdi_lParam_test_message);
mdi_lParam_test_message);
ok(mdi_child != 0, "MDI child creation failed\n");
id = GetWindowLongPtrA(mdi_child, GWLP_ID);
ok(id == 0, "wrong child id %ld\n", id);
@ -1394,7 +1394,7 @@ static LRESULT WINAPI mdi_child_wnd_proc_1(HWND hwnd, UINT msg, WPARAM wparam, L
case WM_CREATE:
{
CREATESTRUCTA *cs = (CREATESTRUCTA *)lparam;
MDICREATESTRUCTA *mdi_cs = (MDICREATESTRUCTA *)cs->lpCreateParams;
MDICREATESTRUCTA *mdi_cs = cs->lpCreateParams;
ok(cs->dwExStyle & WS_EX_MDICHILD, "WS_EX_MDICHILD should be set\n");
ok(mdi_cs->lParam == (LPARAM)mdi_lParam_test_message, "wrong mdi_cs->lParam\n");
@ -1625,7 +1625,7 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
/* tests depend on a not zero MDIClient size */
0, 0, rc.right, rc.bottom,
hwnd, 0, GetModuleHandle(0),
(LPVOID)&client_cs);
&client_cs);
assert(mdi_client);
test_MDI_create(hwnd, mdi_client, client_cs.idFirstChild);
DestroyWindow(mdi_client);
@ -1637,7 +1637,7 @@ static LRESULT WINAPI mdi_main_wnd_procA(HWND hwnd, UINT msg, WPARAM wparam, LPA
/* tests depend on a not zero MDIClient size */
0, 0, rc.right, rc.bottom,
hwnd, 0, GetModuleHandle(0),
(LPVOID)&client_cs);
&client_cs);
assert(mdi_client);
test_MDI_create(hwnd, mdi_client, client_cs.idFirstChild);
DestroyWindow(mdi_client);
@ -3066,7 +3066,7 @@ static LRESULT WINAPI StyleCheckProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM
case WM_NCCREATE:
case WM_CREATE:
lpcs = (LPCREATESTRUCT)lparam;
lpss = (LPSTYLESTRUCT)lpcs->lpCreateParams;
lpss = lpcs->lpCreateParams;
if (lpss)
{
if ((lpcs->dwExStyle & WS_EX_DLGMODALFRAME) ||
@ -5395,7 +5395,7 @@ static void test_thick_child_size(HWND parentWindow)
cls.cbWndExtra = 0;
cls.hInstance = GetModuleHandleA(0);
cls.hIcon = 0;
cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
cls.hCursor = LoadCursorA(0, IDC_ARROW);
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
cls.lpszMenuName = NULL;
cls.lpszClassName = className;