mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
[COMCTL32_WINETEST] Sync with Wine Staging 2.16. CORE-13762
svn path=/trunk/; revision=75863
This commit is contained in:
parent
a82b6638df
commit
72bcc475e7
3 changed files with 100 additions and 3 deletions
|
@ -98,6 +98,6 @@ IDD_PROP_PAGE_WITH_CUSTOM_DEFAULT_BUTTON DIALOG 5, 43, 227, 215
|
|||
STYLE WS_CHILD | WS_DISABLED
|
||||
FONT 8, "MS Shell Dlg"
|
||||
{
|
||||
COMBOBOX IDC_PS_COMBO1, 16, 68, 140, 14, CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_PS_COMBO1, 16, 68, 140, 60, CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Add", IDC_PS_PUSHBUTTON1, 164, 68, 40, 13
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include "v6util.h"
|
||||
|
||||
static HRESULT (WINAPI *pTaskDialogIndirect)(const TASKDIALOGCONFIG *, int *, int *, BOOL *);
|
||||
static HRESULT (WINAPI *pTaskDialog)(HWND, HINSTANCE, const WCHAR *, const WCHAR *, const WCHAR *,
|
||||
TASKDIALOG_COMMON_BUTTON_FLAGS, const WCHAR *, int *);
|
||||
|
||||
START_TEST(taskdialog)
|
||||
{
|
||||
|
@ -50,6 +52,12 @@ START_TEST(taskdialog)
|
|||
return;
|
||||
}
|
||||
|
||||
pTaskDialog = (void *)GetProcAddress(hinst, "TaskDialog");
|
||||
|
||||
ptr_ordinal = GetProcAddress(hinst, (const char *)344);
|
||||
ok(pTaskDialog == ptr_ordinal, "got wrong pointer for ordinal 344, %p expected %p\n",
|
||||
ptr_ordinal, pTaskDialog);
|
||||
|
||||
ptr_ordinal = GetProcAddress(hinst, (const char *)345);
|
||||
ok(pTaskDialogIndirect == ptr_ordinal, "got wrong pointer for ordinal 345, %p expected %p\n",
|
||||
ptr_ordinal, pTaskDialogIndirect);
|
||||
|
|
|
@ -490,13 +490,81 @@ static void add_128x15_bitmap(HWND hToolbar, int nCmds)
|
|||
|
||||
static void test_add_bitmap(void)
|
||||
{
|
||||
TBADDBITMAP stdsmall, std;
|
||||
HWND hToolbar = NULL;
|
||||
TBADDBITMAP bmp128;
|
||||
TBADDBITMAP bmp80;
|
||||
TBADDBITMAP stdsmall;
|
||||
TBADDBITMAP addbmp;
|
||||
HIMAGELIST himl;
|
||||
INT ret;
|
||||
INT ret, id;
|
||||
|
||||
/* Test default bitmaps range */
|
||||
for (id = IDB_STD_SMALL_COLOR; id < IDB_HIST_LARGE_COLOR; id++)
|
||||
{
|
||||
HIMAGELIST himl;
|
||||
int cx, cy, count;
|
||||
|
||||
rebuild_toolbar(&hToolbar);
|
||||
|
||||
std.hInst = HINST_COMMCTRL;
|
||||
std.nID = id;
|
||||
|
||||
ret = SendMessageA(hToolbar, TB_ADDBITMAP, 0, (LPARAM)&std);
|
||||
ok(ret == 0, "Got %d\n", ret);
|
||||
|
||||
himl = (HIMAGELIST)SendMessageA(hToolbar, TB_GETIMAGELIST, 0, 0);
|
||||
ok(himl != NULL, "Got %p\n", himl);
|
||||
|
||||
ret = ImageList_GetIconSize(himl, &cx, &cy);
|
||||
ok(ret, "Got %d\n", ret);
|
||||
ok(cx == cy, "Got %d x %d\n", cx, cy);
|
||||
|
||||
count = ImageList_GetImageCount(himl);
|
||||
|
||||
/* Image count */
|
||||
switch (id)
|
||||
{
|
||||
case IDB_STD_SMALL_COLOR:
|
||||
case IDB_STD_LARGE_COLOR:
|
||||
case 2:
|
||||
case 3:
|
||||
ok(count == 15, "got count %d\n", count);
|
||||
break;
|
||||
case IDB_VIEW_SMALL_COLOR:
|
||||
case IDB_VIEW_LARGE_COLOR:
|
||||
case 6:
|
||||
case 7:
|
||||
ok(count == 12, "got count %d\n", count);
|
||||
break;
|
||||
case IDB_HIST_SMALL_COLOR:
|
||||
case IDB_HIST_LARGE_COLOR:
|
||||
ok(count == 5, "got count %d\n", count);
|
||||
break;
|
||||
default:
|
||||
ok(0, "id %d, count %d\n", id, count);
|
||||
}
|
||||
|
||||
/* Image sizes */
|
||||
switch (id)
|
||||
{
|
||||
case IDB_STD_SMALL_COLOR:
|
||||
case 2:
|
||||
case IDB_VIEW_SMALL_COLOR:
|
||||
case 6:
|
||||
case IDB_HIST_SMALL_COLOR:
|
||||
ok(cx == 16, "got size %d\n", cx);
|
||||
break;
|
||||
case IDB_STD_LARGE_COLOR:
|
||||
case 3:
|
||||
case IDB_VIEW_LARGE_COLOR:
|
||||
case 7:
|
||||
case IDB_HIST_LARGE_COLOR:
|
||||
ok(cx == 24, "got size %d\n", cx);
|
||||
break;
|
||||
default:
|
||||
ok(0, "id %d, size %d\n", id, cx);
|
||||
}
|
||||
}
|
||||
|
||||
/* empty 128x15 bitmap */
|
||||
bmp128.hInst = GetModuleHandleA(NULL);
|
||||
|
@ -2409,6 +2477,26 @@ todo_wine
|
|||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
static void test_imagelist(void)
|
||||
{
|
||||
HIMAGELIST imagelist;
|
||||
HWND hwnd = NULL;
|
||||
int ret;
|
||||
|
||||
rebuild_toolbar(&hwnd);
|
||||
|
||||
imagelist = (HIMAGELIST)SendMessageA(hwnd, TB_GETIMAGELIST, 0, 0);
|
||||
ok(imagelist == NULL, "got %p\n", imagelist);
|
||||
|
||||
ret = SendMessageA(hwnd, TB_SETBITMAPSIZE, 0, MAKELONG(16, 16));
|
||||
ok(ret, "got %d\n", ret);
|
||||
|
||||
imagelist = (HIMAGELIST)SendMessageA(hwnd, TB_GETIMAGELIST, 0, 0);
|
||||
ok(imagelist == NULL, "got %p\n", imagelist);
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
START_TEST(toolbar)
|
||||
{
|
||||
WNDCLASSA wc;
|
||||
|
@ -2454,6 +2542,7 @@ START_TEST(toolbar)
|
|||
test_noresize();
|
||||
test_save();
|
||||
test_drawtext_flags();
|
||||
test_imagelist();
|
||||
|
||||
PostQuitMessage(0);
|
||||
while(GetMessageA(&msg,0,0,0)) {
|
||||
|
|
Loading…
Reference in a new issue