• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

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");
0
amp2112
Asked:
amp2112
  • 2
1 Solution
 
rakeshkalraCommented:
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now