Hi,all.
    Anyone could tell me how to solve this problem?
    I am creating a two-layer nested MENU in Radasm,the resource file is:

#define IDM_FILE_OPEN             1000
#define IDM_FILE_SAVE             1001
#define IDM_FILE_SAVEAS           1002

#define IDM_FILE_PRINT            1003
#define IDM_FILE_EXIT             1004

#define IDM_EDIT_UNDO             1101
#define IDM_EDIT_REDO             1102

#define IDM_EDIT_COPY             1103
#define IDM_EDIT_CUT              1104
#define IDM_EDIT_PASTE            1105

#define IDM_VIEW_TOOLBAR          1201       
#define IDM_VIEW_STATUSBAR        1202       
#define IDM_VIEW_TOOLBOX          1203       
#define IDM_VIEW_OUTPUTWINDOW     1204 
     
#define IDM_RUN_ALLCHECK          1301
#define IDM_RUN_REPEATING         1302
#define IDM_RUN_START             1303
           
#define IDM_RUN_WIDE              1304
#define IDM_RUN_TELE              1305
#define IDM_RUN_CLOSE             1306
         
#define IDM_RUN_AFINIT            1307
#define IDM_RUN_AF8STEP           1308
#define IDM_RUN_AFCLIP            1309
#define IDM_RUN_AFNF              1310

#define IDM_RUN_SHUTTERLARGE      1311
#define IDM_RUN_SHUTTERSMALL      1312
#define IDM_RUN_IRISLARGE         1313
#define IDM_RUN_IRISSMALL         1314


#define IDM_PARTS_MAINPCB         1401
#define IDM_PARTS_SHUTTER         1402

#define IDM_PARTS_ZPI             1403
#define IDM_PARTS_ZPR             1404
#define IDM_PARTS_AFPI            1405
#define IDM_PARTS_AFMOTOR         1406
#define IDM_PARTS_ZOOMMOTOR       1407

#define IDM_DRIVER_CONNECT        1501
#define IDM_DRIVER_UC11           1502
#define IDM_DRIVER_N2             1503
#define IDM_DRIVER_SL1            1504
#define IDM_DRIVER_D3             1505
#define IDM_DRIVER_OTHER          1506
#define IDM_DRIVER_VERSION        1507

#define IDM_OPTION_ZOOMVOLTAGE    1601
#define IDM_OPTION_AFVOLTAGE      1602
#define IDM_OPTION_SHUTTERVOLTAGE 1603
#define IDM_OPTION_IRISVOLTAGE    1604
#define IDM_OPTION_SENSORVDD      1605
#define IDM_OPTION_SENSORTHRESHOLD 1606
#define IDM_OPTION_LOADDEFAULT    1607
#define IDM_OPTION_FONT           1608
#define IDM_OPTION_COLOR          1609

#define IDM_HELP_ABOUT            1700
#define IDM_HELP_USERMANUAL       1701
#define IDM_HELP_ADVANCETOPIC     1702
#define IDM_HELP_OEMHELP          1703
#define IDM_HELP_CONTACT          1704
;Menu structure             
MyMenu MENU
{
POPUP  "&File"
        {
MENUITEM "&Open"                  ,IDM_FILE_OPEN 
MENUITEM "&Save"                  ,IDM_FILE_SAVE
MENUITEM "Save &As"               ,IDM_FILE_SAVEAS
MENUITEM SEPARATOR
MENUITEM "&Print"                 ,IDM_FILE_PRINT
MENUITEM "E&xit"                  ,IDM_FILE_EXIT
        }
       
                POPUP  "&Edit"
        {
MENUITEM "Undo"                   ,IDM_EDIT_UNDO
MENUITEM "Redo"                   ,IDM_EDIT_REDO
MENUITEM  Separator
MENUITEM "Copy"                   ,IDM_EDIT_COPY
MENUITEM "Cut"                    ,IDM_EDIT_CUT
MENUITEM "Paste",                 ,IDM_EDIT_PASTE
        }
       
        POPUP  "&View"
        {
MENUITEM "ToolBar"                ,IDM_VIEW_TOOLBAR     ;Check box style
MENUITEM "StatusBar"              ,IDM_VIEW_STATUSBAR   ;check box style
MENUITEM "ToolBox"                ,IDM_VIEW_TOOLBOX     ;Check box style
MENUITEM "OutputWindow"           ,IDM_VIEW_OUTPUTWINDOW;check box style
        }
       
        POPUP  "&Parts"
        {       MENUITEM "Main PCB Ass'y"         ,IDM_PARTS_MAINPCB
                MENUITEM "Shutter/Iris Ass'y"     ,IDM_PARTS_SHUTTER
                MENUITEM SEPARATOR
MENUITEM "Zoom PI"                ,IDM_PARTS_ZPI
MENUITEM "Zoom PR"                ,IDM_PARTS_ZPR  ;May be grayed
MENUITEM "AF PI",                 ,IDM_PARTS_AFPI
MENUITEM Separator
menuitem  "AF Motor"              ,IDM_PARTS_AFMOTOR
MENUITEM  "Zoom Motor"            ,IDM_PARTS_ZOOMMOTOR
        }
      POPUP   "&Driver"
                       {
MENUITEM "&Connect/Disconnect Motor Dviver"  ,IDM_DRIVER_CONNECT;Check box style
POPUP    "Driver Type"                                       ;Mutex
{
          MENUITEM "UC11"                ,IDM_DRIVER_UC11
          MENUITEM "N2"                  ,IDM_DRIVER_N2
          MENUITEM "SL1"                 ,IDM_DRIVER_SL1
          MENUITEM "D3"                  ,IDM_DRIVER_D3
          MENUITEM "Other..."            ,IDM_DRIVER_OTHER
}
                            MENUITEM "Driver Version"         ,IDM_DRIVER_VERSION   
                         }

                       POPUP   "&Option"
                      {
                                               POPUP    "Project Selection"
POPUP    "Voltage Setting"                                   ;Pop a dialog to setting the voltage
{         MENUITEM  "Zoom Voltage"       ,IDM_OPTION_ZOOMVOLTAGE
          MENUITEM  "AF Voltage"         ,IDM_OPTION_AFVOLTAGE
          MENUITEM  "Shutter Voltage"    ,IDM_OPTION_SHUTTERVOLTAGE
          MENUITEM  "Iris Voltage"       ,IDM_OPTION_IRISVOLTAGE
          MENUITEM  "Senor Vdd"          ,IDM_OPTION_SENSORVDD
          MENUITEM  "Senor On Threshold" ,IDM_OPTION_SENSORTHRESHOLD
}

;POPUP     "Speed Setting"
;popup     "Position Setting"
;popup     "Misc Setting"
MENUITEM   SEPARATOR
                                               MENUITEM  "Load Default Setting"         ,IDM_OPTION_LOADDEFAULT
                                               MENUITEM   SEPARATOR
                                               MENUITEM   "Font"                        ,IDM_OPTION_FONT
                                               MENUITEM   "Color"                       ,IDM_OPTION_COLOR   
        }
        POPUP   "&Help"
                       {
MENUITEM "About"                  ,IDM_HELP_ABOUT
MenuItem "User Manual"            ,IDM_HELP_USERMANUAL
MENUITEM "Advance Topic"          ,IDM_HELP_ADVANCETOPIC
MENUITEM "OEM Help"               ,IDM_HELP_OEMHELP
MENUITEM "Contact"                ,IDM_HELP_CONTACT
        }

}


  It said this should use" BEGIN..END" structure instead of"{...}"  structure for two more layer MENU?
   
   What's wrong with it? How to repair?
 
  Thanks in advance.
   
  Regards!
 
Posted on 2005-12-05 03:18:14 by Luckrock
A standard Menu looks a little like this:


IDR_MYMENU MENU
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "E&xit", ID_FILE_EXIT
    END
END


You are missing the Begin/End Blocks.

/edit: I'd say do a Find replace on { with BEGIN and } with END and try again.
Posted on 2005-12-05 06:31:35 by JimmyClif
Hi,Jimmy
      I had ever known the "begin..end" structure is the standard VC++ menu resource descript key words.
And from Iczelion's TUT ,he is using a "{..}" structure.That's fine.
      So ,I am always thinking that in Masm  is using "{,...}" instead.
      Well.
      I have change it with "begin...end",it works now.
      Thanks.
     
Posted on 2005-12-05 18:27:20 by Luckrock
Luckrock,

MASM in fact does not specify any menu format, if you have the tools to build a RC file and it has valid syntax for RC.EXE, you build it with RC.EXE and link it into the EXE like normal. If you are familiar with VC, you can use its resource editor with no problems at all.
Posted on 2005-12-06 05:14:46 by hutch--
Hi, Hutch--
    Do you mean the Menu resource file is a binary file ,so it's could be compiled by other RC.exe tool?
    Thanks
    Regards.
Posted on 2005-12-06 11:05:33 by Luckrock
hi luckrock, ????????????????????????????????http://www.hanzify.org/?Go=Show::List&ID=9532

Posted on 2005-12-06 20:32:00 by miaomiao
Please try to post in English. Not everyone can understand Chinese and this board is meant for everyone to access information easily.
Posted on 2005-12-06 21:04:33 by roticv
Mr Roticv,
      Plz don't got angry or something about Mr mIAO, He is a buddy of mine, the infomation should be posted in English,
isn't it?
    Thanks.
Posted on 2005-12-06 21:17:57 by Luckrock
No, I am not angry. I am just saying that we should keep to english as this is an international board and communicating in English would allow the information to be accessible to more people around the world. Though of course the number of chinese speakers are larger (I am one, for instance).  ;)
Posted on 2005-12-06 22:00:16 by roticv

.......we should keep to english as this is an international board and communicating in English would allow the information to be accessible to more people around the world. ....

OK, roticv, I just know Mr  Luckrock is a chinese too, So I wrote it in chinese. I have got it and I will not make the same mistake anymore, ;) thank you.
Posted on 2005-12-07 00:08:35 by miaomiao