+ HWND hCombo;
+ HFONT hFont;
+ int height;
+
+ /* This test requires the WC_COMBOBOXA style. It won't work for WC_COMBOBOXEXA */
+ hCombo = CreateWindowExA(0, WC_COMBOBOXA, NULL, WS_BORDER | WS_VISIBLE | WS_CHILD | CBS_DROPDOWN, 0, 0, 300, 300,
+ hComboExParentWnd, NULL, hMainHinst, NULL);
+
+ /* Add items to the combobox */
+ SendMessageA(hCombo, (UINT)CB_ADDSTRING, (WPARAM)0, (LPARAM)"Item 0");
+ SendMessageA(hCombo, (UINT)CB_ADDSTRING, (WPARAM)0, (LPARAM)"Item 1");
+ SendMessageA(hCombo, (UINT)CB_ADDSTRING, (WPARAM)0, (LPARAM)"Item 2");
+ SendMessageA(hCombo, (UINT)CB_ADDSTRING, (WPARAM)0, (LPARAM)"Item 3");
+ SendMessageA(hCombo, CB_SETCURSEL, 1, 0);
+
+ /* Create large enough font for test to work. */
+ hFont = CreateFontA(17, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS,
+ CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett");
+ SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont, FALSE);
+
+ /* Set Item Height followed by SetWindowPos() is the test */
+ SendMessageA(hCombo, CB_SETITEMHEIGHT, -1, 4);
+
+ /* SetWindowPos() should set the height according to font size*/
+ SetWindowPos(hCombo,NULL, 10,10,150,20, SWP_SHOWWINDOW);
+ height = SendMessageA(hCombo, CB_GETITEMHEIGHT, -1, 0);
+ ok(height > 6, "SetWindowPos() failed. Height (%d)\n", height);