Solved

how to create a window with a menu

Posted on 1998-10-26
3
203 Views
Last Modified: 2013-11-20
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
Comment
Question by:amp2112
  • 2
3 Comments
 

Accepted Solution

by:
rakeshkalra earned 100 total points
ID: 1323876
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
 

Author Comment

by:amp2112
ID: 1323877
Adjusted points to 100
0
 

Author Comment

by:amp2112
ID: 1323878
Thanks for the prompt answer. It worked great! :)

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli‚Ķ
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question