how to create a window with a menu

How to create a window with a menu?
This compiles, but gives an error when it runs:

Create(NULL,"PROGRAM",WS_OVERLAPPEDWINDOW,NULL,"MENUNAME");
amp2112Asked:
Who is Participating?
 
rakeshkalraConnect With a Mentor Commented:
Use

if(!Create( NULL, "PROGRAM", WS_OVERLAPPEDWINDOW, CFrameWnd::rectDefault, NULL, MAKEINTRESOURCE(ID_MYMENU)))
{
  // handle error
}

where ID_MYMENU is the ID of the menu built in the resourse editor.

0
 
amp2112Author Commented:
Adjusted points to 100
0
 
amp2112Author Commented:
Thanks for the prompt answer. It worked great! :)

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.