mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
user32/static: Allow setting NULL text.
This commit is contained in:
parent
6e638d824b
commit
c5dda71cd4
@ -464,15 +464,12 @@ LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||
case WM_SETTEXT:
|
||||
if (hasTextStyle( full_style ))
|
||||
{
|
||||
if (HIWORD(lParam))
|
||||
{
|
||||
if(unicode)
|
||||
lResult = DefWindowProcW( hwnd, uMsg, wParam, lParam );
|
||||
else
|
||||
lResult = DefWindowProcA( hwnd, uMsg, wParam, lParam );
|
||||
STATIC_TryPaintFcn( hwnd, full_style );
|
||||
}
|
||||
}
|
||||
if (unicode)
|
||||
lResult = DefWindowProcW( hwnd, uMsg, wParam, lParam );
|
||||
else
|
||||
lResult = DefWindowProcA( hwnd, uMsg, wParam, lParam );
|
||||
STATIC_TryPaintFcn( hwnd, full_style );
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SETFONT:
|
||||
|
@ -117,6 +117,21 @@ static void test_updates(int style, int flags)
|
||||
DestroyWindow(hStatic);
|
||||
}
|
||||
|
||||
static void test_set_text(void)
|
||||
{
|
||||
HWND hStatic = build_static(SS_SIMPLE);
|
||||
char buffA[10];
|
||||
|
||||
GetWindowTextA(hStatic, buffA, sizeof(buffA));
|
||||
ok(!strcmp(buffA, "Test"), "got wrong text %s\n", buffA);
|
||||
|
||||
SetWindowTextA(hStatic, NULL);
|
||||
GetWindowTextA(hStatic, buffA, sizeof(buffA));
|
||||
ok(buffA[0] == 0, "got wrong text %s\n", buffA);
|
||||
|
||||
DestroyWindow(hStatic);
|
||||
}
|
||||
|
||||
START_TEST(static)
|
||||
{
|
||||
static const char szClassName[] = "testclass";
|
||||
@ -148,6 +163,7 @@ START_TEST(static)
|
||||
test_updates(SS_WHITERECT, TODO_COUNT);
|
||||
test_updates(SS_ETCHEDHORZ, TODO_COUNT);
|
||||
test_updates(SS_ETCHEDVERT, TODO_COUNT);
|
||||
test_set_text();
|
||||
|
||||
DestroyWindow(hMainWnd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user