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@winehq.org ReportedBy: focht@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
http://bugs.winehq.org/show_bug.cgi?id=16598
Andrey Turkin andrey.turkin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.turkin@gmail.com
--- Comment #1 from Andrey Turkin andrey.turkin@gmail.com 2009-01-05 10:40:59 --- Some more defines were copied from winuser.h to winuser.rh, this example rc compiles now
http://bugs.winehq.org/show_bug.cgi?id=16598
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net 2009-01-05 10:50:19 --- Hello,
--- quote --- Some more defines were copied from winuser.h to winuser.rh, this example rc compiles now --- quote ---
fine then lets mark this one fixed. I can't test by myself, I usually throw everything away after analysis ;-)
If the user appears in #winehq again and still complains about missing resource identifier stuff just reopen this bug.
Regard
http://bugs.winehq.org/show_bug.cgi?id=16598
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org 2009-01-16 10:39:14 --- Closing bugs fixed in 1.1.13.
http://bugs.winehq.org/show_bug.cgi?id=16598
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |a54c0de2a415dbd563dabc67496 | |58568e6d3c2e5
--- Comment #4 from Anastasius Focht focht@gmx.net 2011-10-12 03:22:53 CDT --- Hello,
filling/correcting fields ...
Regards