Re: can't see my menu item

r_z_aret_at_pen_fact.com
Date: 12/06/04


Date: Mon, 06 Dec 2004 14:23:30 -0500

On Fri, 3 Dec 2004 11:35:01 -0800, "Greg"
<Greg@discussions.microsoft.com> wrote:

>Hi, Kirk. I had the same problem and I made the following workaround for it:
>
>I edited the resources (.rc) file with a text editor and I saw that there
>was something wrong with the definition of the item that couldn't be seen: If
>I remember well, the identifier constant of the item didn't appear on the
>resources file and instead of it, a numeric constant appeared.
>
>I then had a look at the resource.h file (with the text editor) and I saw
>that the identifier constant of the item was not defined on it.
>
>I defined the constant in resource.h file and I wrote the constant name in
>the resource (.rc) file instead of the constant, and it worked.

The resource editor will probably undo this work. I'm pretty sure:
1) When the resource editor reads a resource script (.rc file), it
remembers everything it understands and discards the rest
2) When the resource editor saves the file, it restores everything it
remembers.
In particular, macros are expanded (names become numbers) and comments
are discarded.

>
>Anyway, just in case, make a copy of these two files prior to the changes
>with the text editor.

Make copies before using the resource editor (see above).

>
>Good luck.
>
>"Kirk" wrote:
>
>> Hello,
>>
>> In my application (EVC3, PPC 2000/2002), i create a menu with the resource
>> editor. The first item is a pop-up (with items inside), and the second item
>> is not a pop-up. The problem is i can't see the second item (under emulator
>> or device).
>>
>> Is it normal ?
>>
>> Thanks in advance.
>>
>>

-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

Robert E. Zaret, eMVP
PenFact, Inc.
500 Harrison Ave., Suite 3R
Boston, MA 02118
www.penfact.com



Relevant Pages

  • Re: Dialogeditor
    ... wenn du den Dialog Editor nutzen mußt: kreiere eine .RC Datei per Hand ... Dialogeditor erzeugt ja eine .DLG und eine .RES Datei). ... Es ist dann zwar nach wie vor so, daß bei jedem Arbeiten der Dialog Editor ... nebenbei), aber du kannst jederzeit die KOMPLETTE Resource erzeugen, indem ...
    (de.comp.os.os2.programmer)
  • Re: dynamic menu question
    ... If you define IDR_DYNA in the resource ... editor, it will be ... delete it from the map. ... I just need find a way to give that menu IDR_ identifier somehow... ...
    (microsoft.public.vc.mfc)
  • Re: Headers common to .cpp and .rc files
    ... .RC file you may have problems if you use the RC editor to add or remove resources in the future since it takes liberties in rewriting the file. ... I typically do "extra" things in the .RC2 file that is created since there is no way of controlling how the editor rewrites the .RC file. ... It's a bit of an art, as it appeared to me at the time that the resource compiler does not respect ALL preprocessor definitions which the CPP compiler does. ... The appended header definitions seem to work, but I never worked out why both _STR and STR are needed. ...
    (microsoft.public.vc.language)
  • Re: dynamic menu question
    ... Create a menu at design time and load it dynamically, ... a menu from the resource segment. ... editor, it will be ... delete it from the map. ...
    (microsoft.public.vc.mfc)

Quantcast