Easy menu/modal dialog question
-
In an application I'm making I need to use a menu to launch a modal dialog box. I seem to be struggling a bit with this task. How do I do it?!?! Thanks! Phillip
Hm, you handle the menu selection (add a handler with the Class Wizard if you use MSVC++ 6.0 ). In the handler, you declare a variable of the dialog class. Then, you call
DoModal
on the variable. -
In an application I'm making I need to use a menu to launch a modal dialog box. I seem to be struggling a bit with this task. How do I do it?!?! Thanks! Phillip
the menu part or the dialog part ? did you create your dialog ? in the resources and in the code ( generated by the wizard ) did you add the menu item ( in the resources ) ? did you create an handler for the menu item ? ( can be created from the wizard )
Maximilien Lincourt Your Head A Splode - Strong Bad
-
the menu part or the dialog part ? did you create your dialog ? in the resources and in the code ( generated by the wizard ) did you add the menu item ( in the resources ) ? did you create an handler for the menu item ? ( can be created from the wizard )
Maximilien Lincourt Your Head A Splode - Strong Bad
-
I've made the menu, made the handler for the menu item, and made the actual dialog box (and a corresponding class). I'm having trouble making an instance of the dialog class and calling DoModal for some reason. It's quite baffling, actually. Phillip
#include "MyDialogClass.h" //... CXXX::OnSomething() { CMyDialogClass dialog; dialog.DoModal(); }
-
In an application I'm making I need to use a menu to launch a modal dialog box. I seem to be struggling a bit with this task. How do I do it?!?! Thanks! Phillip
-
#include "MyDialogClass.h" //... CXXX::OnSomething() { CMyDialogClass dialog; dialog.DoModal(); }