user32/tests: Use wine_dbgstr_rect() to print RECTs.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
82fa7dea2a
commit
7f5adb69cd
|
@ -201,7 +201,7 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
ReleaseDC( hwnd_cache, hdc );
|
||||
ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" );
|
||||
|
@ -215,7 +215,7 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
ReleaseDC( hwnd_cache, hdc );
|
||||
ok( GetRgnBox( hrgn, &rect ) == ERROR, "region must no longer be valid\n" );
|
||||
|
@ -223,7 +223,7 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
|
||||
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box should have been reset %s\n", wine_dbgstr_rect( &rect ));
|
||||
ReleaseDC( hwnd_cache, hdc );
|
||||
|
||||
/* window DC */
|
||||
|
@ -235,19 +235,19 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
ReleaseDC( hwnd_owndc, hdc );
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
hdc = GetDCEx( hwnd_owndc, 0, DCX_USESTYLE );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
ReleaseDC( hwnd_owndc, hdc );
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
|
@ -260,7 +260,7 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
|
||||
ReleaseDC( hwnd_owndc, hdc );
|
||||
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
|
||||
|
@ -269,7 +269,7 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30),
|
||||
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box should have been reset %s\n", wine_dbgstr_rect( &rect ));
|
||||
ReleaseDC( hwnd_owndc, hdc );
|
||||
|
||||
/* class DC */
|
||||
|
@ -281,20 +281,20 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
ReleaseDC( hwnd_classdc, hdc );
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
hdc = GetDCEx( hwnd_classdc, 0, DCX_USESTYLE );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
ReleaseDC( hwnd_classdc, hdc );
|
||||
ok( GetRgnBox( hrgn, &rect ) != ERROR, "region must still be valid\n" );
|
||||
|
@ -307,7 +307,7 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
|
||||
|
||||
old_hdc = hdc;
|
||||
|
@ -317,13 +317,13 @@ static void test_dc_visrgn(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30),
|
||||
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box should have been reset %s\n", wine_dbgstr_rect( &rect ));
|
||||
ReleaseDC( hwnd_classdc2, hdc );
|
||||
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
|
||||
hdc = GetDCEx( hwnd_classdc2, 0, DCX_EXCLUDERGN | DCX_USESTYLE );
|
||||
ok( GetRgnBox( hrgn2, &rect ) != ERROR, "region2 must still be valid\n" );
|
||||
ok( !(rect.left >= 20 && rect.top >= 20 && rect.right <= 30 && rect.bottom <= 30),
|
||||
"clip box must have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box must have been reset %s\n", wine_dbgstr_rect( &rect ));
|
||||
ReleaseDC( hwnd_classdc2, hdc );
|
||||
|
||||
/* parent DC */
|
||||
|
@ -360,7 +360,7 @@ static void test_begin_paint(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
EndPaint( hwnd_cache, &ps );
|
||||
|
||||
/* window DC */
|
||||
|
@ -372,22 +372,22 @@ static void test_begin_paint(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ReleaseDC( hwnd_owndc, hdc );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
ok( GetDC( hwnd_owndc ) == hdc, "got different hdc\n" );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
EndPaint( hwnd_owndc, &ps );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
|
||||
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box should have been reset %s\n", wine_dbgstr_rect( &rect ));
|
||||
RedrawWindow( hwnd_owndc, NULL, 0, RDW_VALIDATE|RDW_NOFRAME|RDW_NOERASE );
|
||||
SetRect( &rect, 10, 10, 20, 20 );
|
||||
RedrawWindow( hwnd_owndc, &rect, 0, RDW_INVALIDATE|RDW_ERASE );
|
||||
|
@ -395,12 +395,12 @@ static void test_begin_paint(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
|
||||
"clip box should be the whole window %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box should be the whole window %s\n", wine_dbgstr_rect( &rect ));
|
||||
RedrawWindow( hwnd_owndc, NULL, 0, RDW_ERASENOW );
|
||||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
|
||||
"clip box should still be the whole window %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box should still be the whole window %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
/* class DC */
|
||||
|
||||
|
@ -411,7 +411,7 @@ static void test_begin_paint(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
old_hdc = hdc;
|
||||
hdc = GetDC( hwnd_classdc2 );
|
||||
|
@ -419,7 +419,7 @@ static void test_begin_paint(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( !(rect.left >= 10 && rect.top >= 10 && rect.right <= 20 && rect.bottom <= 20),
|
||||
"clip box should have been reset %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"clip box should have been reset %s\n", wine_dbgstr_rect( &rect ));
|
||||
ReleaseDC( hwnd_classdc2, hdc );
|
||||
EndPaint( hwnd_classdc, &ps );
|
||||
|
||||
|
@ -459,7 +459,7 @@ static void test_scroll_window(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 25 && rect.top >= 25 && rect.right <= 50 && rect.bottom <= 50,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
EndPaint( hwnd_owndc, &ps );
|
||||
|
||||
SetViewportExtEx( hdc, 2, 3, NULL );
|
||||
|
@ -470,7 +470,7 @@ static void test_scroll_window(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 25 && rect.top >= 25 && rect.right <= 50 && rect.bottom <= 50,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
EndPaint( hwnd_owndc, &ps );
|
||||
|
||||
ScrollWindowEx( hwnd_owndc, -5, -10, NULL, &clip, 0, NULL, SW_INVALIDATE | SW_ERASE );
|
||||
|
@ -478,7 +478,7 @@ static void test_scroll_window(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= -5 && rect.top >= 5 && rect.right <= 20 && rect.bottom <= 30,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
EndPaint( hwnd_owndc, &ps );
|
||||
|
||||
SetViewportExtEx( hdc, 1, 1, NULL );
|
||||
|
@ -489,7 +489,7 @@ static void test_scroll_window(void)
|
|||
SetRectEmpty( &rect );
|
||||
GetClipBox( hdc, &rect );
|
||||
ok( rect.left >= 25 && rect.top >= 25 && rect.right <= 50 && rect.bottom <= 50,
|
||||
"invalid clip box %d,%d-%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"invalid clip box %s\n", wine_dbgstr_rect( &rect ));
|
||||
EndPaint( hwnd_owndc, &ps );
|
||||
}
|
||||
|
||||
|
|
|
@ -1284,8 +1284,7 @@ static void test_edit_control_5(void)
|
|||
assert(hWnd);
|
||||
GetClientRect( hWnd, &rc);
|
||||
ok( rc.right == rc1.right - rc1.left && rc.bottom == rc1.bottom - rc1.top,
|
||||
"Client rectangle not the expected size (%d,%d,%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom);
|
||||
"Client rectangle not the expected size %s\n", wine_dbgstr_rect( &rc ));
|
||||
len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0);
|
||||
ok(lstrlenA(str) == len, "text shouldn't have been truncated\n");
|
||||
DestroyWindow(hWnd);
|
||||
|
@ -1299,8 +1298,7 @@ static void test_edit_control_5(void)
|
|||
assert(hWnd);
|
||||
GetClientRect( hWnd, &rc);
|
||||
ok( rc.right == rc1.right - rc1.left && rc.bottom == rc1.bottom - rc1.top,
|
||||
"Client rectangle not the expected size (%d,%d,%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom);
|
||||
"Client rectangle not the expected size %s\n", wine_dbgstr_rect( &rc ));
|
||||
len = SendMessageA(hWnd, WM_GETTEXTLENGTH, 0, 0);
|
||||
ok(lstrlenA(str) == len, "text shouldn't have been truncated\n");
|
||||
DestroyWindow(hWnd);
|
||||
|
@ -1502,7 +1500,7 @@ static void test_margins(void)
|
|||
hwEdit = CreateWindowExA(0, "Edit", "A", WS_POPUP, 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL, NULL);
|
||||
ok(hwEdit != NULL, "got %p\n", hwEdit);
|
||||
GetClientRect(hwEdit, &old_rect);
|
||||
ok(IsRectEmpty(&old_rect), "got rect %d,%d-%d,%d\n", old_rect.left, old_rect.top, old_rect.right, old_rect.bottom);
|
||||
ok(IsRectEmpty(&old_rect), "got rect %s\n", wine_dbgstr_rect(&old_rect));
|
||||
|
||||
old_margins = SendMessageA(hwEdit, EM_GETMARGINS, 0, 0);
|
||||
ok(old_margins == 0, "got %x\n", old_margins);
|
||||
|
@ -1517,7 +1515,7 @@ static void test_margins(void)
|
|||
hwEdit = CreateWindowExA(0, "Edit", "A", WS_POPUP, 0, 0, 2, 2, NULL, NULL, NULL, NULL);
|
||||
ok(hwEdit != NULL, "got %p\n", hwEdit);
|
||||
GetClientRect(hwEdit, &old_rect);
|
||||
ok(!IsRectEmpty(&old_rect), "got rect %d,%d-%d,%d\n", old_rect.left, old_rect.top, old_rect.right, old_rect.bottom);
|
||||
ok(!IsRectEmpty(&old_rect), "got rect %s\n", wine_dbgstr_rect(&old_rect));
|
||||
|
||||
old_margins = SendMessageA(hwEdit, EM_GETMARGINS, 0, 0);
|
||||
ok(old_margins == 0, "got %x\n", old_margins);
|
||||
|
|
|
@ -251,18 +251,16 @@ static LRESULT WINAPI main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARA
|
|||
ok(dis->CtlType == ODT_LISTBOX, "wrong CtlType %04x\n", dis->CtlType);
|
||||
|
||||
GetClientRect(dis->hwndItem, &rc_client);
|
||||
trace("hwndItem %p client rect (%d,%d-%d,%d)\n", dis->hwndItem,
|
||||
rc_client.left, rc_client.top, rc_client.right, rc_client.bottom);
|
||||
trace("hwndItem %p client rect %s\n", dis->hwndItem, wine_dbgstr_rect(&rc_client));
|
||||
GetClipBox(dis->hDC, &rc_clip);
|
||||
trace("clip rect (%d,%d-%d,%d)\n", rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
|
||||
trace("clip rect %s\n", wine_dbgstr_rect(&rc_clip));
|
||||
ok(EqualRect(&rc_client, &rc_clip) || IsRectEmpty(&rc_clip),
|
||||
"client rect of the listbox should be equal to the clip box,"
|
||||
"or the clip box should be empty\n");
|
||||
|
||||
trace("rcItem (%d,%d-%d,%d)\n", dis->rcItem.left, dis->rcItem.top,
|
||||
dis->rcItem.right, dis->rcItem.bottom);
|
||||
trace("rcItem %s\n", wine_dbgstr_rect(&dis->rcItem));
|
||||
SendMessageA(dis->hwndItem, LB_GETITEMRECT, dis->itemID, (LPARAM)&rc_item);
|
||||
trace("item rect (%d,%d-%d,%d)\n", rc_item.left, rc_item.top, rc_item.right, rc_item.bottom);
|
||||
trace("item rect %s\n", wine_dbgstr_rect(&rc_item));
|
||||
ok(EqualRect(&dis->rcItem, &rc_item), "item rects are not equal\n");
|
||||
|
||||
break;
|
||||
|
@ -334,7 +332,7 @@ static void test_ownerdraw(void)
|
|||
ok(ret == 1, "wrong top index %d\n", ret);
|
||||
|
||||
SendMessageA(hLB, LB_GETITEMRECT, 0, (LPARAM)&rc);
|
||||
trace("item 0 rect (%d,%d-%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
trace("item 0 rect %s\n", wine_dbgstr_rect(&rc));
|
||||
ok(!IsRectEmpty(&rc), "empty item rect\n");
|
||||
ok(rc.top < 0, "rc.top is not negative (%d)\n", rc.top);
|
||||
|
||||
|
|
|
@ -194,11 +194,9 @@ static LRESULT WINAPI menu_ownerdraw_wnd_proc(HWND hwnd, UINT msg,
|
|||
if (winetest_debug > 1) {
|
||||
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",
|
||||
trace("WM_DRAWITEM received hwnd %p hmenu %p itemdata %ld item %d rc %s itemrc: %s\n",
|
||||
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);
|
||||
wine_dbgstr_rect(&pdis->rcItem), wine_dbgstr_rect(&rc));
|
||||
oldpen=SelectObject( pdis->hDC, GetStockObject(
|
||||
pdis->itemState & ODS_SELECTED ? WHITE_PEN :BLACK_PEN));
|
||||
Rectangle( pdis->hDC, pdis->rcItem.left,pdis->rcItem.top,
|
||||
|
@ -347,10 +345,8 @@ static void test_getmenubarinfo(void)
|
|||
ret = pGetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi);
|
||||
ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError());
|
||||
|
||||
ok(mbi.rcBar.left == 0 && mbi.rcBar.top == 0 &&
|
||||
mbi.rcBar.bottom == 0 && mbi.rcBar.right == 0,
|
||||
"rcBar: Expected 0,0-0,0, got: %d,%d-%d,%d\n",
|
||||
mbi.rcBar.left, mbi.rcBar.top, mbi.rcBar.right, mbi.rcBar.bottom);
|
||||
ok(mbi.rcBar.left == 0 && mbi.rcBar.top == 0 && mbi.rcBar.bottom == 0 && mbi.rcBar.right == 0,
|
||||
"rcBar: Expected (0,0)-(0,0), got: %s\n", wine_dbgstr_rect(&mbi.rcBar));
|
||||
ok(mbi.hMenu == hmenu, "hMenu: Got %p instead of %p\n",
|
||||
mbi.hMenu, hmenu);
|
||||
ok(mbi.fBarFocused == 0, "fBarFocused: Got %d instead of 0.\n", mbi.fBarFocused);
|
||||
|
@ -381,8 +377,7 @@ static void test_getmenubarinfo(void)
|
|||
ok(ret, "GetMenuItemRect failed.\n");
|
||||
todo_wine ok(mbi.rcBar.left == rci.left && mbi.rcBar.top == rci.top &&
|
||||
mbi.rcBar.bottom == rci.bottom && mbi.rcBar.right == rcw.right - rci.left + rcw.left,
|
||||
"rcBar: Got %d,%d-%d,%d instead of %d,%d-%d,%d\n",
|
||||
mbi.rcBar.left, mbi.rcBar.top, mbi.rcBar.right, mbi.rcBar.bottom,
|
||||
"rcBar: Got %s instead of (%d,%d)-(%d,%d)\n", wine_dbgstr_rect(&mbi.rcBar),
|
||||
rci.left, rci.top, rcw.right - rci.left + rcw.left, rci.bottom);
|
||||
ok(mbi.hMenu == hmenu, "hMenu: Got %p instead of %p\n", mbi.hMenu, hmenu);
|
||||
ok(mbi.fBarFocused == 0, "fBarFocused: got %d instead of 0\n", mbi.fBarFocused);
|
||||
|
@ -393,9 +388,8 @@ static void test_getmenubarinfo(void)
|
|||
ok(ret, "GetMenuBarInfo failed with error %d\n", GetLastError());
|
||||
ret = GetMenuItemRect(hwnd, hmenu, 1, &rci);
|
||||
ok(ret, "GetMenuItemRect failed.\n");
|
||||
ok(EqualRect(&mbi.rcBar, &rci), "rcBar: Got %d,%d-%d,%d instead of %d,%d-%d,%d\n",
|
||||
mbi.rcBar.left, mbi.rcBar.top, mbi.rcBar.right, mbi.rcBar.bottom,
|
||||
rci.left, rci.top, rci.right, rci.bottom);
|
||||
ok(EqualRect(&mbi.rcBar, &rci), "rcBar: Got %s instead of %s\n", wine_dbgstr_rect(&mbi.rcBar),
|
||||
wine_dbgstr_rect(&rci));
|
||||
ok(mbi.hMenu == hmenu, "hMenu: Got %p instead of %p\n", mbi.hMenu, hmenu);
|
||||
ok(mbi.fBarFocused == 0, "fBarFocused: got %d instead of 0\n", mbi.fBarFocused);
|
||||
ok(mbi.fFocused == 0, "fFocused: got %d instead of 0\n", mbi.fFocused);
|
||||
|
@ -975,9 +969,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
|
|||
GetSystemMetrics(SM_CXMENUCHECK ),
|
||||
GetSystemMetrics(SM_CYMENUCHECK ),arrowwidth, MOD_avec);
|
||||
if( hbmp == HBMMENU_CALLBACK)
|
||||
trace( " rc %d,%d-%d,%d bmp.rc %d,%d-%d,%d\n",
|
||||
rc.left, rc.top, rc.top, rc.bottom, MOD_rc[0].left,
|
||||
MOD_rc[0].top,MOD_rc[0].right, MOD_rc[0].bottom);
|
||||
trace( " rc %s bmp.rc %s\n", wine_dbgstr_rect(&rc), wine_dbgstr_rect(&MOD_rc[0]));
|
||||
}
|
||||
/* clean up */
|
||||
ret = DestroyMenu(submenu);
|
||||
|
|
|
@ -262,21 +262,21 @@ static void test_ChangeDisplaySettingsEx(void)
|
|||
|
||||
/* Resolution change resets clip rect */
|
||||
ok(GetClipCursor(&r), "GetClipCursor() failed\n");
|
||||
ok(EqualRect(&r, &virt), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom);
|
||||
ok(EqualRect(&r, &virt), "Invalid clip rect: %s\n", wine_dbgstr_rect(&r));
|
||||
|
||||
if (!ClipCursor(NULL)) continue;
|
||||
ok(GetClipCursor(&r), "GetClipCursor() failed\n");
|
||||
ok(EqualRect(&r, &virt), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom);
|
||||
ok(EqualRect(&r, &virt), "Invalid clip rect: %s\n", wine_dbgstr_rect(&r));
|
||||
|
||||
/* This should always work. Primary monitor is at (0,0) */
|
||||
SetRect(&r1, 10, 10, 20, 20);
|
||||
ok(ClipCursor(&r1), "ClipCursor() failed\n");
|
||||
ok(GetClipCursor(&r), "GetClipCursor() failed\n");
|
||||
ok(EqualRect(&r, &r1), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom);
|
||||
ok(EqualRect(&r, &r1), "Invalid clip rect: %s\n", wine_dbgstr_rect(&r));
|
||||
SetRect(&r1, 10, 10, 10, 10);
|
||||
ok(ClipCursor(&r1), "ClipCursor() failed\n");
|
||||
ok(GetClipCursor(&r), "GetClipCursor() failed\n");
|
||||
ok(EqualRect(&r, &r1), "Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom);
|
||||
ok(EqualRect(&r, &r1), "Invalid clip rect: %s\n", wine_dbgstr_rect(&r));
|
||||
SetRect(&r1, 10, 10, 10, 9);
|
||||
ok(!ClipCursor(&r1), "ClipCursor() succeeded\n");
|
||||
/* Windows bug: further clipping fails once an empty rect is set, so we have to reset it */
|
||||
|
@ -285,9 +285,8 @@ static void test_ChangeDisplaySettingsEx(void)
|
|||
SetRect(&r1, virt.left - 10, virt.top - 10, virt.right + 20, virt.bottom + 20);
|
||||
ok(ClipCursor(&r1), "ClipCursor() failed\n");
|
||||
ok(GetClipCursor(&r), "GetClipCursor() failed\n");
|
||||
ok(EqualRect(&r, &virt) ||
|
||||
broken(EqualRect(&r, &r1)) /* win9x */,
|
||||
"Invalid clip rect: (%d %d) x (%d %d)\n", r.left, r.top, r.right, r.bottom);
|
||||
ok(EqualRect(&r, &virt) || broken(EqualRect(&r, &r1)) /* win9x */,
|
||||
"Invalid clip rect: %s\n", wine_dbgstr_rect(&r));
|
||||
ClipCursor(&virt);
|
||||
}
|
||||
}
|
||||
|
@ -499,13 +498,12 @@ static void test_work_area(void)
|
|||
ret = pGetMonitorInfoA(hmon, &mi);
|
||||
ok(ret, "GetMonitorInfo error %u\n", GetLastError());
|
||||
ok(mi.dwFlags & MONITORINFOF_PRIMARY, "not a primary monitor\n");
|
||||
trace("primary monitor (%d,%d-%d,%d)\n",
|
||||
mi.rcMonitor.left, mi.rcMonitor.top, mi.rcMonitor.right, mi.rcMonitor.bottom);
|
||||
trace("primary monitor %s\n", wine_dbgstr_rect(&mi.rcMonitor));
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = SystemParametersInfoA(SPI_GETWORKAREA, 0, &rc_work, 0);
|
||||
ok(ret, "SystemParametersInfo error %u\n", GetLastError());
|
||||
trace("work area (%d,%d-%d,%d)\n", rc_work.left, rc_work.top, rc_work.right, rc_work.bottom);
|
||||
trace("work area %s\n", wine_dbgstr_rect(&rc_work));
|
||||
ok(EqualRect(&rc_work, &mi.rcWork), "work area is different\n");
|
||||
|
||||
hwnd = CreateWindowExA(0, "static", NULL, WS_OVERLAPPEDWINDOW|WS_VISIBLE,100,100,10,10,0,0,0,NULL);
|
||||
|
@ -513,16 +511,13 @@ static void test_work_area(void)
|
|||
|
||||
ret = GetWindowRect(hwnd, &rc_normal);
|
||||
ok(ret, "GetWindowRect failed\n");
|
||||
trace("normal (%d,%d-%d,%d)\n", rc_normal.left, rc_normal.top, rc_normal.right, rc_normal.bottom);
|
||||
trace("normal %s\n", wine_dbgstr_rect(&rc_normal));
|
||||
|
||||
wp.length = sizeof(wp);
|
||||
ret = GetWindowPlacement(hwnd, &wp);
|
||||
ok(ret, "GetWindowPlacement failed\n");
|
||||
trace("min: %d,%d max %d,%d normal %d,%d-%d,%d\n",
|
||||
wp.ptMinPosition.x, wp.ptMinPosition.y,
|
||||
wp.ptMaxPosition.x, wp.ptMaxPosition.y,
|
||||
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
|
||||
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
|
||||
trace("min: %d,%d max %d,%d normal %s\n", wp.ptMinPosition.x, wp.ptMinPosition.y,
|
||||
wp.ptMaxPosition.x, wp.ptMaxPosition.y, wine_dbgstr_rect(&wp.rcNormalPosition));
|
||||
OffsetRect(&wp.rcNormalPosition, rc_work.left, rc_work.top);
|
||||
todo_wine_if (mi.rcMonitor.left != mi.rcWork.left ||
|
||||
mi.rcMonitor.top != mi.rcWork.top) /* FIXME: remove once Wine is fixed */
|
||||
|
@ -535,11 +530,8 @@ static void test_work_area(void)
|
|||
wp.length = sizeof(wp);
|
||||
ret = GetWindowPlacement(hwnd, &wp);
|
||||
ok(ret, "GetWindowPlacement failed\n");
|
||||
trace("min: %d,%d max %d,%d normal %d,%d-%d,%d\n",
|
||||
wp.ptMinPosition.x, wp.ptMinPosition.y,
|
||||
wp.ptMaxPosition.x, wp.ptMaxPosition.y,
|
||||
wp.rcNormalPosition.left, wp.rcNormalPosition.top,
|
||||
wp.rcNormalPosition.right, wp.rcNormalPosition.bottom);
|
||||
trace("min: %d,%d max %d,%d normal %s\n", wp.ptMinPosition.x, wp.ptMinPosition.y,
|
||||
wp.ptMaxPosition.x, wp.ptMaxPosition.y, wine_dbgstr_rect(&wp.rcNormalPosition));
|
||||
ok(EqualRect(&rc_normal, &wp.rcNormalPosition), "normal pos is different\n");
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
|
|
|
@ -4354,8 +4354,7 @@ static void test_showwindow(void)
|
|||
GetWindowRect(hwnd, &rc);
|
||||
ok( rc.right-rc.left == GetSystemMetrics(SM_CXSCREEN) &&
|
||||
rc.bottom-rc.top == GetSystemMetrics(SM_CYSCREEN),
|
||||
"Invalid maximized size before ShowWindow (%d,%d)-(%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom);
|
||||
"Invalid maximized size before ShowWindow %s\n", wine_dbgstr_rect( &rc ));
|
||||
/* Reset window's size & position */
|
||||
SetWindowPos(hwnd, 0, 10, 10, 200, 200, SWP_NOZORDER | SWP_NOACTIVATE);
|
||||
ok(IsZoomed(hwnd), "window should be maximized\n");
|
||||
|
@ -4369,8 +4368,7 @@ static void test_showwindow(void)
|
|||
GetWindowRect(hwnd, &rc);
|
||||
ok( rc.right-rc.left == GetSystemMetrics(SM_CXSCREEN) &&
|
||||
rc.bottom-rc.top == GetSystemMetrics(SM_CYSCREEN),
|
||||
"Invalid maximized size after ShowWindow (%d,%d)-(%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom);
|
||||
"Invalid maximized size after ShowWindow %s\n", wine_dbgstr_rect( &rc ));
|
||||
DestroyWindow(hwnd);
|
||||
flush_sequence();
|
||||
|
||||
|
@ -6499,8 +6497,8 @@ static void check_update_rgn( HWND hwnd, HRGN hrgn )
|
|||
}
|
||||
GetRgnBox( update, &r1 );
|
||||
GetUpdateRect( hwnd, &r2, FALSE );
|
||||
ok( EqualRect( &r1, &r2 ), "Rectangles are different: %d,%d-%d,%d / %d,%d-%d,%d\n",
|
||||
r1.left, r1.top, r1.right, r1.bottom, r2.left, r2.top, r2.right, r2.bottom );
|
||||
ok( EqualRect( &r1, &r2 ), "Rectangles are different: %s / %s\n", wine_dbgstr_rect( &r1 ),
|
||||
wine_dbgstr_rect( &r2 ));
|
||||
|
||||
DeleteObject( tmp );
|
||||
DeleteObject( update );
|
||||
|
@ -8288,8 +8286,7 @@ static LRESULT WINAPI ParentMsgCheckProcA(HWND hwnd, UINT message, WPARAM wParam
|
|||
RECT rc;
|
||||
INT ret = GetClipBox((HDC)wParam, &rc);
|
||||
|
||||
trace("WM_ERASEBKGND: GetClipBox()=%d, (%d,%d-%d,%d)\n",
|
||||
ret, rc.left, rc.top, rc.right, rc.bottom);
|
||||
trace("WM_ERASEBKGND: GetClipBox()=%d, %s\n", ret, wine_dbgstr_rect(&rc));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -14602,10 +14599,10 @@ static void test_SetParent(void)
|
|||
ok(child != 0, "Failed to create child window\n");
|
||||
|
||||
GetWindowRect(parent1, &rc);
|
||||
trace("parent1 (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
trace("parent1 %s\n", wine_dbgstr_rect(&rc));
|
||||
GetWindowRect(child, &rc_old);
|
||||
MapWindowPoints(0, parent1, (POINT *)&rc_old, 2);
|
||||
trace("child (%d,%d)-(%d,%d)\n", rc_old.left, rc_old.top, rc_old.right, rc_old.bottom);
|
||||
trace("child %s\n", wine_dbgstr_rect(&rc_old));
|
||||
|
||||
flush_sequence();
|
||||
|
||||
|
@ -14617,14 +14614,13 @@ static void test_SetParent(void)
|
|||
ok(!IsWindowVisible(child), "IsWindowVisible() should return FALSE\n");
|
||||
|
||||
GetWindowRect(parent2, &rc);
|
||||
trace("parent2 (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
trace("parent2 %s\n", wine_dbgstr_rect(&rc));
|
||||
GetWindowRect(child, &rc);
|
||||
MapWindowPoints(0, parent2, (POINT *)&rc, 2);
|
||||
trace("child (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
trace("child %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
ok(EqualRect(&rc_old, &rc), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n",
|
||||
rc_old.left, rc_old.top, rc_old.right, rc_old.bottom,
|
||||
rc.left, rc.top, rc.right, rc.bottom );
|
||||
ok(EqualRect(&rc_old, &rc), "rects do not match %s / %s\n", wine_dbgstr_rect(&rc_old),
|
||||
wine_dbgstr_rect(&rc));
|
||||
|
||||
/* WS_POPUP window */
|
||||
popup = CreateWindowExA(0, "TestWindowClass", NULL, WS_POPUP | WS_VISIBLE,
|
||||
|
@ -14632,7 +14628,7 @@ static void test_SetParent(void)
|
|||
ok(popup != 0, "Failed to create popup window\n");
|
||||
|
||||
GetWindowRect(popup, &rc_old);
|
||||
trace("popup (%d,%d)-(%d,%d)\n", rc_old.left, rc_old.top, rc_old.right, rc_old.bottom);
|
||||
trace("popup %s\n", wine_dbgstr_rect(&rc_old));
|
||||
|
||||
flush_sequence();
|
||||
|
||||
|
@ -14644,14 +14640,13 @@ static void test_SetParent(void)
|
|||
ok(!IsWindowVisible(popup), "IsWindowVisible() should return FALSE\n");
|
||||
|
||||
GetWindowRect(child, &rc);
|
||||
trace("parent2 (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
trace("parent2 %s\n", wine_dbgstr_rect(&rc));
|
||||
GetWindowRect(popup, &rc);
|
||||
MapWindowPoints(0, child, (POINT *)&rc, 2);
|
||||
trace("popup (%d,%d)-(%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
trace("popup %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
ok(EqualRect(&rc_old, &rc), "rects do not match (%d,%d-%d,%d) / (%d,%d-%d,%d)\n",
|
||||
rc_old.left, rc_old.top, rc_old.right, rc_old.bottom,
|
||||
rc.left, rc.top, rc.right, rc.bottom );
|
||||
ok(EqualRect(&rc_old, &rc), "rects do not match %s / %s\n", wine_dbgstr_rect(&rc_old),
|
||||
wine_dbgstr_rect(&rc));
|
||||
|
||||
DestroyWindow(popup);
|
||||
DestroyWindow(child);
|
||||
|
@ -15452,10 +15447,10 @@ static void test_layered_window(void)
|
|||
ok_sequence( WmEmptySeq, "UpdateLayeredWindow", FALSE );
|
||||
GetWindowRect( hwnd, &rect );
|
||||
ok( rect.left == 300 && rect.top == 300 && rect.right == 550 && rect.bottom == 550,
|
||||
"wrong window rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong window rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
GetClientRect( hwnd, &rect );
|
||||
ok( rect.right == client.right - 50 && rect.bottom == client.bottom - 50,
|
||||
"wrong client rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong client rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
size.cx = 150;
|
||||
pos.y = 200;
|
||||
|
@ -15464,10 +15459,10 @@ static void test_layered_window(void)
|
|||
ok_sequence( WmEmptySeq, "UpdateLayeredWindow", FALSE );
|
||||
GetWindowRect( hwnd, &rect );
|
||||
ok( rect.left == 300 && rect.top == 200 && rect.right == 450 && rect.bottom == 450,
|
||||
"wrong window rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong window rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
GetClientRect( hwnd, &rect );
|
||||
ok( rect.right == client.right - 150 && rect.bottom == client.bottom - 50,
|
||||
"wrong client rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong client rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
SetWindowLongA( hwnd, GWL_STYLE,
|
||||
GetWindowLongA(hwnd, GWL_STYLE) & ~(WS_CAPTION | WS_THICKFRAME | WS_SYSMENU) );
|
||||
|
@ -15480,11 +15475,11 @@ static void test_layered_window(void)
|
|||
ok_sequence( WmEmptySeq, "UpdateLayeredWindow", FALSE );
|
||||
GetWindowRect( hwnd, &rect );
|
||||
ok( rect.left == 200 && rect.top == 200 && rect.right == 400 && rect.bottom == 450,
|
||||
"wrong window rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong window rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
GetClientRect( hwnd, &rect );
|
||||
ok( (rect.right == 200 && rect.bottom == 250) ||
|
||||
broken(rect.right == client.right - 100 && rect.bottom == client.bottom - 50),
|
||||
"wrong client rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong client rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
size.cx = 0;
|
||||
ret = pUpdateLayeredWindow( hwnd, 0, &pos, &size, hdc, &src, 0, NULL, ULW_OPAQUE );
|
||||
|
@ -15501,11 +15496,11 @@ static void test_layered_window(void)
|
|||
ok_sequence( WmSetLayeredStyle, "WmSetLayeredStyle", FALSE );
|
||||
GetWindowRect( hwnd, &rect );
|
||||
ok( rect.left == 200 && rect.top == 200 && rect.right == 400 && rect.bottom == 450,
|
||||
"wrong window rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong window rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
GetClientRect( hwnd, &rect );
|
||||
ok( (rect.right == 200 && rect.bottom == 250) ||
|
||||
broken(rect.right == client.right - 100 && rect.bottom == client.bottom - 50),
|
||||
"wrong client rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong client rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
SetWindowLongA( hwnd, GWL_EXSTYLE, GetWindowLongA(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED );
|
||||
info.hwnd = hwnd;
|
||||
|
@ -15521,11 +15516,11 @@ static void test_layered_window(void)
|
|||
CloseHandle( thread );
|
||||
GetWindowRect( hwnd, &rect );
|
||||
ok( rect.left == 200 && rect.top == 200 && rect.right == 450 && rect.bottom == 500,
|
||||
"wrong window rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong window rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
GetClientRect( hwnd, &rect );
|
||||
ok( (rect.right == 250 && rect.bottom == 300) ||
|
||||
broken(rect.right == client.right - 50 && rect.bottom == client.bottom),
|
||||
"wrong client rect %d,%d,%d,%d\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
"wrong client rect %s\n", wine_dbgstr_rect( &rect ));
|
||||
|
||||
DestroyWindow( hwnd );
|
||||
DeleteDC( hdc );
|
||||
|
|
|
@ -600,8 +600,7 @@ static void test_DrawTextCalcRect(void)
|
|||
ok(textheight >= heightcheck, "Got unexpected textheight %d\n", textheight);
|
||||
ok(dtp.iTabLength == 0, "invalid dtp.iTabLength = %i\n",dtp.iTabLength);
|
||||
ok(rect.left == rect2.left && rect.right != rect2.right && rect.top == rect2.top && rect.bottom == rect2.bottom,
|
||||
"incorrect rect %d,%d-%d,%d rect2 %d,%d-%d,%d\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom, rect2.left, rect2.top, rect2.right, rect2.bottom );
|
||||
"incorrect rect %s rect2 %s\n", wine_dbgstr_rect(&rect), wine_dbgstr_rect(&rect2));
|
||||
|
||||
SetRect( &rect, 0,0, 10, 10);
|
||||
memset(&dtp, 0, sizeof(dtp));
|
||||
|
|
|
@ -76,8 +76,8 @@ static void test_SubtractRect(void)
|
|||
result = SubtractRect(&rectr, &rect1, &rect2);
|
||||
ok(result, "SubtractRect returned FALSE but subtraction should not be empty\n");
|
||||
ok(result && rectr.left == 50 && rectr.top == 50 && rectr.right ==150
|
||||
&& rectr.bottom == 100, "wrong rect subtraction of SubtractRect "
|
||||
"(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom);
|
||||
&& rectr.bottom == 100, "wrong rect subtraction of SubtractRect (dest rect=%s)\n",
|
||||
wine_dbgstr_rect(&rectr));
|
||||
|
||||
/* source rect 2 partially overlaps rect 1 */
|
||||
SetRect(&rect1, 2431, 626, 3427, 1608);
|
||||
|
@ -85,8 +85,8 @@ static void test_SubtractRect(void)
|
|||
result = SubtractRect(&rectr, &rect1, &rect2);
|
||||
ok(result, "SubtractRect returned FALSE but subtraction should not be empty\n");
|
||||
ok(result && rectr.left == 2431 && rectr.top == 626 && rectr.right == 2499
|
||||
&& rectr.bottom == 1608, "wrong rect subtraction of SubtractRect "
|
||||
"(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom);
|
||||
&& rectr.bottom == 1608, "wrong rect subtraction of SubtractRect (dest rect=%s)\n",
|
||||
wine_dbgstr_rect(&rectr));
|
||||
|
||||
/* source rect 2 partially overlaps rect 1 - dest is src rect 2 */
|
||||
SetRect(&rect1, 2431, 626, 3427, 1608);
|
||||
|
@ -94,22 +94,22 @@ static void test_SubtractRect(void)
|
|||
result = SubtractRect(&rect2, &rect1, &rect2);
|
||||
ok(result, "SubtractRect returned FALSE but subtraction should not be empty\n");
|
||||
ok(result && rectr.left == 2431 && rectr.top == 626 && rectr.right == 2499
|
||||
&& rectr.bottom == 1608, "wrong rect subtraction of SubtractRect "
|
||||
"(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom);
|
||||
&& rectr.bottom == 1608, "wrong rect subtraction of SubtractRect (dest rect=%s)\n",
|
||||
wine_dbgstr_rect(&rectr));
|
||||
|
||||
/* source rect 2 completely overlaps rect 1 */
|
||||
SetRect(&rect1, 250, 250, 400, 500);
|
||||
SetRect(&rect2, 50, 50, 1500, 1000);
|
||||
result = SubtractRect(&rectr, &rect1, &rect2);
|
||||
ok(!result, "SubtractRect returned TRUE but subtraction should be empty "
|
||||
"(dest rect={%d, %d, %d, %d})\n", rectr.left, rectr.top, rectr.right, rectr.bottom);
|
||||
ok(!result, "SubtractRect returned TRUE but subtraction should be empty (dest rect=%s)\n",
|
||||
wine_dbgstr_rect(&rectr));
|
||||
|
||||
/* source rect 2 completely overlaps rect 1 - dest is src rect 2 */
|
||||
SetRect(&rect1, 250, 250, 400, 500);
|
||||
SetRect(&rect2, 50, 50, 1500, 1000);
|
||||
result = SubtractRect(&rect2, &rect1, &rect2);
|
||||
ok(!result, "SubtractRect returned TRUE but subtraction should be empty "
|
||||
"(dest rect={%d, %d, %d, %d})\n", rect2.left, rect2.top, rect2.right, rect2.bottom);
|
||||
ok(!result, "SubtractRect returned TRUE but subtraction should be empty (dest rect=%s)\n",
|
||||
wine_dbgstr_rect(&rect2));
|
||||
}
|
||||
|
||||
static void test_EqualRect(void)
|
||||
|
|
Loading…
Reference in New Issue