Remove menu in SDI.

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???
jaebAsked:
Who is Participating?
 
gurlyCommented:
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
 
Vinayak KumbarSr Program ManagerCommented:
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
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.