Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Thu, 10 Apr 2008 14:36:24 +0200,    group: microsoft.public.platformsdk.tools        back       


rc.exe & MENUEX & SEPARATOR   
Hello,

i have to port some old .rc files to msvc++ 9.0 (visual studio 2008).

the following .rc source does not compile - not with the rc.exe for VS6 nor 
with VS2008

any idea whats wrong?

#include "winuser.h"

My MENUEX
  BEGIN
    POPUP     "&Hilfe"                   ,  100
      BEGIN
        MENUITEM  "&Produkt Information"       ,  200
        MENUITEM SEPARATOR
        MENUITEM  "Generelle Hilfe"          ,  300
      END
  END

menu.rc (8): error RC2243 : invalid string expression at SEPARATOR
menu.rc (9): error RC2236 : required parameter missing

thx a lot for any tipps.

mario.
date: Thu, 10 Apr 2008 14:36:24 +0200   author:   Mario Semo

Re: rc.exe & MENUEX & SEPARATOR   
Mario Semo wrote:
> Hello,
>
> i have to port some old .rc files to msvc++ 9.0 (visual studio 2008).
>
> the following .rc source does not compile - not with the rc.exe for
> VS6 nor with VS2008
>
> any idea whats wrong?
>
> #include "winuser.h"
>
> My MENUEX
>  BEGIN
>    POPUP     "&Hilfe"                   ,  100
>      BEGIN
>        MENUITEM  "&Produkt Information"       ,  200
>        MENUITEM SEPARATOR
>        MENUITEM  "Generelle Hilfe"          ,  300
>      END
>  END
>
> menu.rc (8): error RC2243 : invalid string expression at SEPARATOR
> menu.rc (9): error RC2236 : required parameter missing
>
> thx a lot for any tipps.

The docs say that MENUITEM inside MENUEX is different from MENUITEM inside 
MENU.  You're trying to use the MENU syntax inside a MENUEX.  Change one or 
the other...

>
> mario.
date: Thu, 10 Apr 2008 14:54:11 -0500   author:   Ben Voigt [C++ MVP] am

Re: rc.exe & MENUEX & SEPARATOR   
"Ben Voigt [C++ MVP]" <rbv@nospam.nospam> schrieb im Newsbeitrag 
news:OGgCgQ0mIHA.2396@TK2MSFTNGP02.phx.gbl...
>>
>> My MENUEX
>>>>        MENUITEM SEPARATOR
>>        MENUITEM  "Generelle Hilfe"          ,  300
>
> The docs say that MENUITEM inside MENUEX is different from MENUITEM inside 
> MENU.  You're trying to use the MENU syntax inside a MENUEX.  Change one 
> or the other...
>

Ben,

thx for your feedback. I cannot find such a statement in my MS VC++ 6.0 docs 
(and neither in my Visual Studio 2008 Express docs).
Here i read about MENUEX:

The MENUEX resource-definition statement is an extension of the MENU 
resource-definition statement. In addition to the functionality offered by 
MENU, MENUEX allows for the following:

  a.. Help identifiers on menus.
  b.. Identifiers on menus.
  c.. Use of the MFT_* type flags and MFS_* state flags. For more 
information on these flags, see the MENUITEMINFO structure.
menuID MENUEX{    [{[MENUITEM itemText [,[id][, [type][, state]]]] | 
[POPUP itemText [,[id][, [type][, [state][, helpID]]]]      { 
popupBody      }
    } ...]} Parameters
  MENUITEM statement
  ...
And clicking to the  MENUITEM i find a sample with SEPERATOR.
And i am using the RC shipped with MSVC++ 6.0 :
where rc.exe ->
H:\LC32ENV\VC6\FixPack4\MSVS6\Common\MSDev98\Bin\RC.EXE

What i found in the meantime - searching the web for menuitem, seperator,... 
is:

        MENUITEM "", -1, MFT_SEPARATOR

i guess this is what i need.

But so, now, i have one more question. is there a standard define from 
rc.exe which i can check to see if the source (x.rc) is compiled with RC.exe 
and with which version ?
(like _MSC_VER from cl.exe).
Currently i have to compile the .RC with the old environment (non-msc, which 
supports MENUITEM SEPARATOR in MENUEX) and the new MS-VC environment.

thx for your help.

mario.
date: Fri, 11 Apr 2008 10:28:39 +0200   author:   Mario Semo

Re: rc.exe & MENUEX & SEPARATOR   
Mario Semo wrote:
> "Ben Voigt [C++ MVP]" <rbv@nospam.nospam> schrieb im Newsbeitrag
> news:OGgCgQ0mIHA.2396@TK2MSFTNGP02.phx.gbl...
>>>
>>> My MENUEX
>>>>>        MENUITEM SEPARATOR
>>>        MENUITEM  "Generelle Hilfe"          ,  300
>>
>> The docs say that MENUITEM inside MENUEX is different from MENUITEM
>> inside MENU.  You're trying to use the MENU syntax inside a MENUEX. 
>> Change one or the other...
>>
>
> Ben,
>
> thx for your feedback. I cannot find such a statement in my MS VC++
> 6.0 docs (and neither in my Visual Studio 2008 Express docs).
> Here i read about MENUEX:
>
> The MENUEX resource-definition statement is an extension of the MENU
> resource-definition statement. In addition to the functionality
> offered by MENU, MENUEX allows for the following:
>
>  a.. Help identifiers on menus.
>  b.. Identifiers on menus.
>  c.. Use of the MFT_* type flags and MFS_* state flags. For more
> information on these flags, see the MENUITEMINFO structure.
> menuID MENUEX{    [{[MENUITEM itemText [,[id][, [type][, state]]]] |
> [POPUP itemText [,[id][, [type][, [state][, helpID]]]]      {
> popupBody      }

Here, as you can see, MENUITEM inside a MENUEX must be followed by the 
itemText, and optionally by id, type, state.  There is no second form.

>    } ...]} Parameters
>  MENUITEM statement
>  ...
> And clicking to the  MENUITEM i find a sample with SEPERATOR.

Yes this is a documentation bug, it should not link you to the MENU version 
of MENUITEM.

> And i am using the RC shipped with MSVC++ 6.0 :
> where rc.exe ->
> H:\LC32ENV\VC6\FixPack4\MSVS6\Common\MSDev98\Bin\RC.EXE
>
> What i found in the meantime - searching the web for menuitem,
> seperator,... is:
>
>        MENUITEM "", -1, MFT_SEPARATOR
>
> i guess this is what i need.

I guess so too.

>
> But so, now, i have one more question. is there a standard define from
> rc.exe which i can check to see if the source (x.rc) is compiled with
> RC.exe and with which version ?
> (like _MSC_VER from cl.exe).
> Currently i have to compile the .RC with the old environment
> (non-msc, which supports MENUITEM SEPARATOR in MENUEX) and the new
> MS-VC environment.

Does your other environment support MFT_SEPARATOR?  If so, then just use 
that.

To answer your question, I think I've seen

#ifdef RC_INVOKED

It is described here: 
http://msdn2.microsoft.com/en-us/library/aa381032(VS.85).aspx

>
> thx for your help.
>
> mario.
date: Mon, 14 Apr 2008 10:16:35 -0500   author:   Ben Voigt [C++ MVP] am

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us