|
From: <jos...@ya...> - 2001-02-23 08:00:12
|
In the resource (.rc) file type
#include <windows.h> // this is necessary for IDHELP
#include "menu.h" // this you create within the project
EXAMPLEMENU MENU
{
POPUP "&File"
{
MENUITEM "&New\tCtrl+N", IDM_FILENEW
MENUITEM "&Open\tCtrl+O", IDM_FILEOPEN
MENUITEM "&Close", IDM_FILECLOSE
MENUITEM SEPARATOR
MENUITEM "&Exit\tAlt+F4", IDM_FILEEXIT
}
POPUP "&Edit"
{
MENUITEM "&Undo\tCtrl+Z", IDM_EDITUNDO
MENUITEM SEPARATOR
MENUITEM "Cu&t\tCtrl+X", IDM_EDITCUT
MENUITEM "&Copy\tCtrl+C", IDM_EDITCOPY
MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE
MENUITEM "&Delete\tDel", IDM_EDITCLEAR
}
POPUP "&Help"
{
MENUITEM "&Help topics\tF1", IDHELP
}
}
In menu.h you will write
#define IDM_FILENEW 100
#define IDM_FILEOPEN 101
etc
NOT for IDHELP, because this is defined in windows.h
In your main.cpp (or whatever you call it) type this in the class
definitions.
Done.
hth
Chemanuel
WndClass.lpszMenuName = "MAINMENU";
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
|