how to create new window in mfc project
hi im using c++ mfc. i have main window which works all the time and i want to make new window. how can i do it? thanks开发者_JS百科
Hi you can create your own dialog by VS master and then do // on some event
CMyDialog dlg;
dlg.DoMoDal();
link http://www.codersource.net/mfc/mfc-tutorials/dialog-boxes-in-mfc.aspx
Create a dialog resource in the resource editor.
Right click it and choose "Add Class".
Make sure the parent class is "CDialog" or any other you'd like and hit ok.
Visual Studio class wizard will now create the necessary files you can now override window messages...etc
Easiest way to show your new dialog by calling:
CMyNewDialog dlg;
dlg.DoModal();
and make sure you include the newly created dialog class header file, should be: MyNewDialog.h
精彩评论