Always Remove WS_BORDER Style From ComboBoxEx Control

Robert Shearman rob at codeweavers.com
Thu Oct 21 13:54:48 CDT 2004


Hi,

We make certain assumptions about the control not having the WS_BORDER 
style, such as in the WM_WINDOWPOSCHANGING handler (width is 2 when 
wp->cx is 0 when width should be 0). This causes the combo control to be 
resized to a width of 2, which obviously makes it unusable. When this 
was fixed the ComboBoxEx still had an unwanted border around it, which 
means that the native control removes this style automatically. This was 
confirmed by experimentation. Removing the WS_BORDER style in 
WM_NCCREATE fixes both of these issues.

Rob

Changelog:
Always remove WS_BORDER style from ComboBoxEx control.
-------------- next part --------------
Index: wine/dlls/comctl32/comboex.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/comboex.c,v
retrieving revision 1.74
diff -u -p -r1.74 comboex.c
--- wine/dlls/comctl32/comboex.c	19 Oct 2004 22:59:59 -0000	1.74
+++ wine/dlls/comctl32/comboex.c	21 Oct 2004 18:47:10 -0000
@@ -1570,7 +1570,7 @@ static LRESULT COMBOEX_NCCreate (HWND hw
     DWORD oldstyle, newstyle;
 
     oldstyle = (DWORD)GetWindowLongW (hwnd, GWL_STYLE);
-    newstyle = oldstyle & ~(WS_VSCROLL | WS_HSCROLL);
+    newstyle = oldstyle & ~(WS_VSCROLL | WS_HSCROLL | WS_BORDER);
     if (newstyle != oldstyle) {
 	TRACE("req style %08lx, reseting style %08lx\n",
 	      oldstyle, newstyle);


More information about the wine-patches mailing list