I have been trying to create a menu bar in my windows application but the bar will not show, can anyone help me find whats wrong with my code? I'm sure i don't completely understand the concept..
Here is the function that creates my window class and "tries" to create a menu bar
/* This function will create a Window Class and a Window Menu */
WNDCLASSEX CreateWindowClass (WNDCLASSEX windowclass, HINSTANCE handle)
{
HMENU windowmenu; /* A handle to the menu */
MENUITEMINFO MenuItemInfo; /* Structure variable that contains info about a menu item */
windowmenu = CreatePopupMenu (); /* Creating a menu */
unsignedint File; /* Declaring a Menu Item name */
MenuItemInfo.cbSize = sizeof (MENUITEMINFO); /* Filling out members of the menu item info structure */
MenuItemInfo.fMask = MIIM_TYPE | MIIM_STATE | MIIM_ID
| MIIM_CHECKMARKS | MIIM_STRING;
MenuItemInfo.fType = MFT_MENUBREAK | MFT_OWNERDRAW | MFT_STRING;
MenuItemInfo.fState = MFS_ENABLED;
MenuItemInfo.wID = File;
MenuItemInfo.hbmpChecked = NULL;
InsertMenuItem (windowmenu, File, false, &MenuItemInfo); /*inserting a menu item in menu bar*/
windowclass.cbSize = sizeof (WNDCLASSEX);
windowclass.hInstance = handle;
windowclass.lpszClassName = "Main Class";
windowclass.lpszMenuName = MAKEINTRESOURCE (File); /*Assigning the menu bar to window class */
windowclass.lpfnWndProc = WindowProcedure;
windowclass.style = CS_DBLCLKS;
windowclass.hIcon = LoadIcon (NULL, IDI_APPLICATION);
windowclass.hIconSm = NULL;
windowclass.hCursor = LoadCursor (NULL, IDC_CROSS);
windowclass.hbrBackground = (HBRUSH) (COLOR_BACKGROUND + 3);
windowclass.cbClsExtra = 0;
windowclass.cbWndExtra = 0;
}