Hi Alexandre,

The dialog compiled on windows works on wine.
On windows,
AUTO3STATE control with BS_OWNERDRAW will have BS_OWNERDRAW button style.
AUTO3STATE control without BS_OWNERDRAW will have BS_AUTO3STATE button style.
So BS_OWNERDRAW will overrides all other button style as in msdn documentation says that it is not supposed to be used with any other button style.


so how does the following patch in wrc look?

Index: tools/wrc/parser.y
===================================================================
RCS file: /home/wine/wine/tools/wrc/parser.y,v
retrieving revision 1.49
diff -u -r1.49 parser.y
--- tools/wrc/parser.y  8 Mar 2005 19:09:16 -0000       1.49
+++ tools/wrc/parser.y  23 Mar 2005 00:02:47 -0000
@@ -2062,7 +2062,11 @@

if (!ctrl->gotstyle)
ctrl->style = new_style(0,0);
-
+ + /* BS_OWNERDRAW overrides any other button style */
+ if (type == CT_BUTTON && (ctrl->style->or_mask & BS_OWNERDRAW) == BS_OWNERDRAW)
+ special_style = BS_PUSHBUTTON;
+ /* combine all styles */
ctrl->style->or_mask = ctrl->style->or_mask | defaultstyle | special_style;
ctrl->gotstyle = TRUE;


I will submit this patch if it looks ok.
Thanks
Michael

Alexandre Julliard wrote:

Michael Lin <[EMAIL PROTECTED]> writes:



I was trying to make the following dialog compile and work in
WINE. The dialog compiles and works in Borland.



Does the dialog compiled on Windows work on Wine? If so it's a resource compiler issue. If not, you should then write a test program that creates buttons with various styles to find out exactly how Windows handles it.







Reply via email to