News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

.RC commands

Started by xandaz, December 14, 2010, 01:10:09 PM

Previous topic - Next topic

xandaz

  hi there. Doe anyone know any manual for the .rc commands ? I'm trying to make and RCDATA dword aligned but dont know how. Thanks and  bye

Vortex

Hi xandaz,

Here is the manual :

\masm32\bin\rc.hlp

dedndave

mannnnnnn - lol
the rc.hlp file must be for a different version or something
the help-about in the rc.hlp file does not say - it tells me which version of windows i have, though   :P

here is an example from the hlp file
sample MENU
BEGIN
     MENUITEM "&Soup", 100
     MENUITEM "S&alad", 101
     POPUP "&Entree"
     BEGIN
          MENUITEM "&Fish", 200
          MENUITEM "&Chicken", 201, CHECKED
          POPUP "&Beef"
          BEGIN
               MENUITEM "&Steak", 301
               MENUITEM "&Prime Rib", 302
          END
     END
     MENUITEM "&Dessert", 103
END

error - begin expected in menu

here is the same example as it appears on MSDN
sample MENU
     {
     MENUITEM "&Soup", 100
     MENUITEM "S&alad", 101
     POPUP "&Entree"
          {
          MENUITEM "&Fish", 200
          MENUITEM "&Chicken", 201, CHECKED
          POPUP "&Beef"
               {
               MENUITEM "&Steak", 301
               MENUITEM "&Prime Rib", 302
               }
          }
     MENUITEM "&Dessert", 103
     }

same error

if i play around and get rid of the begin error, i get "invalid numeric in checked" - lol

caseys

im using winasm studio for making .RC config files. nice tool. 
Uf, never been so hard to understand

dedndave

thanks - i have seen that before
one of the members in here (Erol - i think) wrote ResEdit - resource editor
i may give that a shot

dedndave

actually - i'd like to know how to implement the menus in code   :P
that way, i can change them when the context changes

Vortex

Hi Dave,

Here is the homepage of RedEdit. ( I am not the author. )

http://www.resedit.net

dedndave



dedndave

thanks Victor
but, apparently, i do not have the version of RC.EXE that they are talking about
just as well - i want to see how some things are done that aren't necessarily done in resource - or at least, not documented
i will probably see something i like in some other program, RE it, and figure out how to do it - lol
it seems a more effective way of learning, as the documentation is a bit disorganized

dedndave

i found a nice tutorial on "another" forum site   :P

http://www.winprog.org/tutorial/resnotes.html

i think i see where i was going wrong with the example code posted earlier   :lol

xandaz

   I noticed that there's resource.h circulating in the forum that has DWORD BYTE and etc TYPEDEFs. Can i use this for RCDATA type of resource? From what i understand RCDATA is composed from integers. Can it be done directly with DWORD and BYTE and STRUCTS? Thanks and bye.

dedndave

that's what it is for
if you mean the one that ~50 Kb - that one is up to date
there are two values that you can look at to see if the one you have is up to date
VOS_WINDOWS32
VFT_APP
those values were not in the old one (and many more, i am sure)

dedndave

yeah !!!!
i finally got a nested menu to work - lol
now, if i could just get CHECKED and GRAYED to work   :(

            MENUITEM "&Standard", 1032, CHECKED

error...
rsrc.rc (83): error RC2242 : invalid numeric expression at CHECKED

if i replace it with
            MENUITEM "&Standard", 1032
it works

Gunner

Very strange Dave, I have the following in my RC and it works
MENUITEM "&Open...",IDM_OPEN,CHECKED
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com