user32: UpdateWindow doesn't accept a NULL hwnd.
This commit is contained in:
parent
1f93a47667
commit
6e4e8fb07f
|
@ -1202,6 +1202,12 @@ BOOL WINAPI RedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI UpdateWindow( HWND hwnd )
|
BOOL WINAPI UpdateWindow( HWND hwnd )
|
||||||
{
|
{
|
||||||
|
if (!hwnd)
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_INVALID_WINDOW_HANDLE );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return RedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
|
return RedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6161,6 +6161,16 @@ static void test_paint_messages(void)
|
||||||
flush_events();
|
flush_events();
|
||||||
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
|
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
|
||||||
|
|
||||||
|
trace("testing UpdateWindow(NULL)\n");
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
ok(!UpdateWindow(NULL), "UpdateWindow(NULL) should fail\n");
|
||||||
|
ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE ||
|
||||||
|
broken( GetLastError() == 0xdeadbeef ) /* win9x */,
|
||||||
|
"wrong error code %d\n", GetLastError());
|
||||||
|
check_update_rgn( hwnd, 0 );
|
||||||
|
flush_events();
|
||||||
|
ok_sequence( WmEmptySeq, "WmEmptySeq", FALSE );
|
||||||
|
|
||||||
/* now with frame */
|
/* now with frame */
|
||||||
SetRectRgn( hrgn, -5, -5, 20, 20 );
|
SetRectRgn( hrgn, -5, -5, 20, 20 );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue