Archived

This topic is now archived and is closed to further replies.

KaMiKaZ04

Using Menues

Recommended Posts

hi! i''ve been programming c++ in dos for a while now, and i just started to program win32 console programs with a little help from "tricks of the windows game programming gurus" (awesome book). my compiler (msoft vc++ 6.0) keeps on giving me 3 errors with the following resource script: #include"rcdef.h" TheMenu MENU DISCARDABLE { POPUP "File" { MENUITEM "&Hello", Menu_File_ID_Hello MENUITEM "&PlaySound", Menu_File_ID_PlaySound MENUITEM "Clos&e", Menu_File_ID_Close } POPUP "Help" { MENUITEM "&About", Menu_Help_ID_About } } it says that the line TheMenu MENU DISCARDABLE is missing a semicolon before MENU (!??!), TheMenu is a missing storage type, and unexpected end of file found. can anyone help me with this? thanks, KaMiKaZ04

Share this post


Link to post
Share on other sites
Sounds like you''re trying to compile it with the C++ Compiler. You should use the resource compiler instead.

It''s called rc.exe

Share this post


Link to post
Share on other sites
You should use BEGIN/END instead of { and }


  
#include "rcdef.h"

TheMenu MENU DISCARDABLE
BEGIN
POPUP "File"
BEGIN
MENUITEM "&Hello", Menu_File_ID_Hello
MENUITEM "&PlaySound", Menu_File_ID_PlaySound
MENUITEM "Clos&e", Menu_File_ID_Close
END
POPUP "Help"
BEGIN
MENUITEM "&About", Menu_Help_ID_About
END
}

Share this post


Link to post
Share on other sites