mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 02:25:40 +00:00
[COMCTL32_APITEST]: Add one more test for BCM_GETIDEALSIZE, it is as if it completely ignores BS_BITMAP.
svn path=/trunk/; revision=73995
This commit is contained in:
parent
f7120fd6aa
commit
d054fcda2b
1 changed files with 28 additions and 0 deletions
|
@ -122,6 +122,9 @@ void Test_GetIdealSizeNoThemes()
|
|||
|
||||
DestroyWindow(hwnd1);
|
||||
|
||||
|
||||
|
||||
|
||||
hwnd1 = CreateWindowW(L"Button", L"", 0, 10, 10, 100, 100, 0, NULL, NULL, NULL);
|
||||
ok (hwnd1 != NULL, "Expected CreateWindowW to succeed\n");
|
||||
SetWindowTheme(hwnd1, L"", L"");
|
||||
|
@ -166,6 +169,28 @@ void Test_GetIdealSizeNoThemes()
|
|||
|
||||
DestroyWindow(hwnd1);
|
||||
|
||||
|
||||
|
||||
|
||||
hwnd1 = CreateWindowW(L"Button", L" ", BS_BITMAP , 10, 10, 100, 100, 0, NULL, NULL, NULL);
|
||||
ok (hwnd1 != NULL, "Expected CreateWindowW to succeed\n");
|
||||
SetWindowTheme(hwnd1, L"", L"");
|
||||
|
||||
SendMessageW(hwnd1, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hbmp);
|
||||
|
||||
memset(&s, 0, sizeof(s));
|
||||
ret = SendMessageW(hwnd1, BCM_GETIDEALSIZE, 0, (LPARAM)&s);
|
||||
ok (ret == TRUE, "Expected BCM_GETIDEALSIZE to succeed\n");
|
||||
|
||||
/* In xp and 2k3 the image is ignored, in vista+ its width is added to the text width */
|
||||
ok_size(s, textent.cx + 2 * wi.cxWindowBorders - 1 + 2,
|
||||
textent.cy + 2 * wi.cyWindowBorders + 1 + 2); /* the last +2 is the text margin */
|
||||
|
||||
DestroyWindow(hwnd1);
|
||||
|
||||
|
||||
|
||||
|
||||
hwnd1 = CreateWindowW(L"Button", L" ", 0, 10, 10, 100, 100, 0, NULL, NULL, NULL);
|
||||
ok (hwnd1 != NULL, "Expected CreateWindowW to succeed\n");
|
||||
SetWindowTheme(hwnd1, L"", L"");
|
||||
|
@ -219,6 +244,9 @@ void Test_GetIdealSizeNoThemes()
|
|||
|
||||
DestroyWindow(hwnd1);
|
||||
|
||||
|
||||
|
||||
|
||||
/* Test again with some real text to see if the formula is correct */
|
||||
hwnd1 = CreateWindowW(L"Button", L"Some test text", 0, 10, 10, 100, 100, 0, NULL, NULL, NULL);
|
||||
ok (hwnd1 != NULL, "Expected CreateWindowW to succeed\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue