<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi, thanks for the patch. Some comments below.</tt><br>
<br>
<blockquote type="cite">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; white-space: pre-wrap;">+ 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);</pre>
</blockquote>
<tt>I don't think this is necessary. You don't need any string to
trigger this feature.</tt><br>
<blockquote type="cite">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; white-space: pre-wrap;">
+
+ /* 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);</pre>
</blockquote>
<tt>You don't need special font either I think. The point is to set
item height smaller than its natural default, and then trigger
window size update. So you could set height to a half of current
item height to the same effect I believe.</tt><br>
<blockquote type="cite">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; white-space: pre-wrap;">
+
+ /* Cleanup */
+ DestroyWindow(hCombo);
+ DeleteObject(hFont);</pre>
</blockquote>
<tt>P.S. subject line is inaccurate because patch does not fix
anything. Same test would apply to user32 implementation too.</tt><br>
</body>
</html>