dlls/user/button.c - fix AUTO3STATE with BS_OWNERDRAW (Resend)

Michael Lin mlin at corvu.com.au
Mon Mar 21 17:39:33 CST 2005


Hi Alexandre,

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

MSGBOX_DLG DIALOG 21, 32, 168, 83
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Error"
FONT 8, "MS Sans Serif"
{
 GROUPBOX "", 101, 6, -2, 157, 61, BS_GROUPBOX | WS_CHILD | WS_VISIBLE
 AUTO3STATE "Text", 103, 10, 9, 149, 47, BS_OWNERDRAW | WS_CHILD | 
WS_VISIBLE | WS_TABSTOP
 PUSHBUTTON "Cancel", 111, 6, 65, 50, 14, BS_PUSHBUTTON | WS_CHILD | 
WS_VISIBLE | WS_GROUP | WS_TABSTOP
 PUSHBUTTON "Cancel", 112, 58, 65, 50, 14
 PUSHBUTTON "Cancel", 113, 110, 65, 50, 14
}


Alexandre Julliard wrote:

>Michael Lin <mlin at corvu.com.au> writes:
>
>  
>
>> inline static UINT get_button_type( LONG window_style )
>> {
>>-    return (window_style & 0x0f);
>>+    if ((window_style & BS_OWNERDRAW) == BS_OWNERDRAW)
>>+        return BS_OWNERDRAW;
>>+    else
>>+        return (window_style & 0x0f);
>>    
>>
>
>BS_OWNERDRAW is not a bit mask, this won't work right. What is the
>problem you are trying to fix?
>
>  
>




More information about the wine-devel mailing list