Commit 491e44d4 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

user32/tests: Don't check menu items when testing MNS_CHECKORBMP.

If the MNS_CHECKORBMP style is set on a menu, and the menu is checked, the bitmap is not drawn. For the menu tests, that means we get no WM_DRAWITEM message for an owner-drawn bitmap, and the bounding box of the bitmap is not tested. We should leave the menu item unchecked in this case so we can test it.
parent da1030f3
......@@ -357,7 +357,8 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
MOD_GotDrawItemMsg = FALSE;
mii.fMask = MIIM_FTYPE | MIIM_DATA | MIIM_STATE;
mii.fType = 0;
mii.fState = MF_CHECKED;
/* check the menu item unless MNS_CHECKORBMP is set */
mii.fState = (mnuopt != 2 ? MFS_CHECKED : MFS_UNCHECKED);
mii.dwItemData =0;
MODsizes[0] = bmpsize;
hastab = 0;
......@@ -447,8 +448,18 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) {
/* check the position of the bitmap */
/* horizontal */
expect = ispop ? (4 + ( mnuopt ? 0 : GetSystemMetrics(SM_CXMENUCHECK)))
: 3;
if (!ispop)
expect = 3;
else if (mnuopt == 0)
expect = 4 + GetSystemMetrics(SM_CXMENUCHECK);
else if (mnuopt == 1)
expect = 4;
else /* mnuopt == 2 */
expect = 2;
if (ispop && mnuopt == 2)
todo_wine ok( expect == MOD_rc[0].left,
"bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
else
ok( expect == MOD_rc[0].left,
"bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
failed = failed || !(expect == MOD_rc[0].left);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment