[Bug 16598] New: winuser.rh misses some standard control ids (dialog button, ...) resulting in wrc failure with windows.h include only

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Dec 22 12:04:54 CST 2008


http://bugs.winehq.org/show_bug.cgi?id=16598

           Summary: winuser.rh misses some standard control ids (dialog
                    button, ...) resulting in wrc failure with windows.h
                    include only
           Product: Wine
           Version: 1.1.10
          Platform: Other
        OS/Version: other
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: -unknown
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net


Hello,

while doing some occasional end user support on #winehq (*yuck*), one user
complained about wrc not compiling his .rc file.
Visual C++ and mingw toolchains compiled it in Windows without problems but
Wine's wrc didn't like it.

--- snip ---
...
resource.rc:114:31: Error: syntax error
--- snip ---

He sent me a link to the .rc file to have a look at.
Relevant parts:

Resource.rc:

--- snip ---
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include <windows.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

...

/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDR_MENU MENU 
BEGIN 

...
END


/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_MEMTRANSFER DIALOGEX 100, 100, 174, 90
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION |
WS_SYSMENU
CAPTION "Memory Transfer"
FONT 8, "Courier New", 0, 0, 0x0
BEGIN
    DEFPUSHBUTTON   "&OK",IDOK,42,72,40,14
...
--- snip ---

Resource.h:

--- snip ---
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by resource.rc
//

#define IDR_MENU                        100
#define IDI_ICON                        101
#define IDB_BITMAP                      102
#define IDR_MAIN_ACCEL                  103
#define IDD_MEMTRANSFER                 104
...
--- snip ---

The resource include chain is as follows:

resource.h
windows.h (due to RC_INVOKED defined by wrc) -> winresrc.h -> winuser.rh and
commctrl.rh 

The problem is that winuser.rh defines only a subset of winuser.h control ids
This breaks resource scripts which for example reference standard dialog button
IDs.

Telling the user to explicitly include <winuser.h> solved his problems.
You might want to extend winuser.rh a bit to include often used standard
control ids (ex: dialog button).

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list