Add Menu???

This is my code:

// Create The Window
if (!(hWnd=CreateWindowEx(	dwExStyle,							// Extended Style For The Window
							"JOEY",							// Class Name
							title,								// Window Title
							dwStyle |							// Defined Window Style
							WS_CLIPSIBLINGS |					// Required Window Style
							WS_CLIPCHILDREN,					// Required Window Style
							0, 0,								// Window Position
							WindowRect.right-WindowRect.left,	// Calculate Window Width,	// Calculate Window Height
							NULL,								// No Parent Window
							NULL,								// No Menu
							hInstance,							// Instance
							NULL)))								// Dont Pass Anything To WM_CREATE
	KillGLWindow();								// Reset The Display
	MessageBox(NULL,"Window Creation Error.","ERROR",MB_OK|MB_ICONEXCLAMATION);
	return FALSE;								// Return FALSE

let say i want to add a menu bar to the window with simple FILE,EDIT,VIEW,WINDOW,HELP etc…
How do i edit my code (NULL,// No Menu) above??
if i have a parent window, how do i change(NULL,// No Parent Window) coding above??\

Any help is appreciated…
Thanks for reading through the code…

Hi !

Not much OpenGL there is it ;o)

You have to create the menu with the CreateMenu() functions and friends, then you get a HMENU handle you can pass on to the function when you create the window.


If you are using MSV you can use


where IDR_MENU is a menu in your resource.