Solved

Remove menu in SDI.

Posted on 2002-07-27
2
188 Views
Last Modified: 2013-11-20
Hi,

When I create SDI project using Project wizard,

a Menu is created automatically.

So If I compile the code, A Menu always appeares.

But I don't want a menu.

So I remove menu in resource.

Then A program doesn't start.

How can I remove menu???
0
Comment
Question by:jaeb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Expert Comment

by:VinExpert
ID: 7183193
Hi,

Leave the menu in resource for now. Go to OnCreate(...) function in MainFrm.cpp. Just before returning form that function, put the following line of code.

SetMenu(NULL);

That should give u the menu less SDI window.

Try it out.
VinExpert
0
 
LVL 1

Accepted Solution

by:
gurly earned 100 total points
ID: 7183233
I'm almost sure this is not the best way to do it, but unless you find another solution, try the following:

In your PreCreateWindow function add this line:
     cs.hMenu = NULL;

0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

695 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