I was reading the Game Programing Genesis article, and it was great, but I am having trouble leading a menu:
my code:
wincl.hIcon = LoadIcon(hThisInstance, "ICON_MAIN");
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = LoadMenu(hThisInstance, MAKEINTRESOURCE(MAIN_MENU));
wincl.cbClsExtra = 0;
wincl.cbWndExtra = 0;
resource file:
MAIN_MENU MENU DISCARDABLE
{
POPUP "&File"
{
MENUITEM "&New", MENUID_NEW
MENUITEM "&Open...", MENUID_OPEN
MENUITEM "&Save", MENUID_SAVE
MENUITEM "Save &As...", MENUID_SAVEAS
MENUITEM "E&xit", MENUID_EXIT
}
POPUP "&Help"
{
MENUITEM "&Contents", MENUID_CONTENTS
MENUITEM "&Index...", MENUID_INDEX
MENUITEM "&About", MENUID_ABOUT
}
}
resource.h :
#define MAIN_MENU 9
#define MENUID_NEW 0
#define MENUID_OPEN 1
#define MENUID_SAVE 2
#define MENUID_SAVEAS 3
#define MENUID_EXIT 4
#define MENUID_CONTENTS 5
#define MENUID_INDEX 6
#define MENUID_ABOUT 7
there error I get is:
"cannot convert `HMENU__*' to `const CHAR*' in assignment"
it is on this line:
wincl.lpszMenuName = LoadMenu(hThisInstance, MAKEINTRESOURCE(MAIN_MENU));
thanks in advance (obviously this isnt full source, if you need anything else let me know)