I just defined my own resource file (.rc) and a header that contains all the #defines for the menu items.. but once i include the header file in my .cpp file, the window will now show the menu i specified in the resource file.. (in codeblocks)
//ResourceMenu.rc
#include "ResourceMenu.h"
ID_Menu MENU
BEGIN
POPUP "File"
BEGIN
MENUITEM "Open", ID_Open
MENUITEM "Save", ID_Save
MENUITEM "Save As", ID_SaveAs
END
END
and here is my .cpp
1 2 3 4 5 6
#include <windows.h> /* Used for the windows API */
#include <Richedit.h> /* Used for RICHEDIT_CLASS */
#include "ResourceMenu.h" /* Resource file that contain information about the windows pop up menu and it's items */
windowclass.lpszMenuName = MAKEINTRESOURCE(ID_Menu);
//more code here