Dialog-based MFC apps and menus

I created, in VC++ 6.0, a dialog based MFC app. I want to use a menu in my dialog, only I do not know what parameter I should switch. I cannot find a dialog function anywhere. If this is too complicated, I would instead prefer to write a Win32 app without a window... just with a dialog procedure. How would I do this? Thanks.
LVL 3
SuperMarioAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SuperMarioAuthor Commented:
I would really like just some working Dialog Box creation code. I know how to do it, but it will not run in VC++ because I don't have enough experience yet and I goofed up somewhere. However, I know it would be easier in MFC to implement a menu in a dialog box. Please supply me with the answer to the least difficult question. Thank you!
0
Answers2000Commented:
Use SetMenu (member of CWnd - the base class of CDialog) to set a menu into your dialog.

The SetMenu function requires a CMenu, so you'll need to construct one of these including loading the menu from your resources.

The Menus send WM_COMMAND messages to your dialog proc/class.

The menu functions for a window/dialog are the same - and are members of CWnd
0
wyy_cqCommented:
when you edit the dialog resource , you can set the menu of the dialog.
Open the dialog properties , and select the menu-ID in the comboBox .

the menu will appears when your application open it and will not appear when you test it in VC Studio .
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

SuperMarioAuthor Commented:
I mean, in MFC, there IS no dialog procedure OR window procedure. It is all classes. I would much rather have some code that would just create a dialog box... no window. I would raise the points but I only have 50. Sorry. I need code with a dialog procedure in it with the UINT parameter. PLZ help!
0
SuperMarioAuthor Commented:
I know how to do that, I need to know how to manipulate the menu and where I switch the UINT parameter in all that class stuff. I don't see any window or dialog procedure in all my MFC code.
0
wyy_cqCommented:
what are you want to do ? add menu to dialog or see the procedure of window .

if it is important to see the windowProc the easiest way is to subclass the window procedure with your own WndProc .

::SetWindowLong(dlg.GetSafeHwnd()......); can subclass the windowProc of the dlg object.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.