How to create a Modeless Dialog?
Answers were Sorted based on User's Feedback
Answer / arvin
Call the CDialogs Create() function.
NewDialog *dlg;
dlg = new NewDialog;
dlg->Create(IDR_MYDIALOG);
dlg->ShowWindow(1);
| Is This Answer Correct ? | 17 Yes | 2 No |
Answer / sonali d
CModeLess *m_pmodeless = new CModeLess(this);
m_pmodeless->Create(CModeLess::IDD);
m_pmodeless->ShowWindow(SW_SHOW);
| Is This Answer Correct ? | 5 Yes | 1 No |
1.First you write the CDialog ctor without any parameter.
2.Then create object of CDialog class & call the Create()
function.
3.After creating call the ShowWindow() function.
*Instead of ShowWindow() you can us the WS_VISIBLE in
dialog rc script file.
While deleting call the DestroyWindow() not EndDialog()
which is for Modal dialog.
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / c.vidhya
CDialog class is base class and Creatte is member function
CDialog dlg;
dlg.Create(LPCTSTR TemplateName,ParentWnd);
| Is This Answer Correct ? | 1 Yes | 6 No |
What is the use of OninitDialog ?
What is the difference between the ASSERT and VERIFY macros?
How to find the mouse entering an image?..while entering need to display next image...
If application hangs while SendMessage is waiting for the result, how you handle it?
How do I create a dialog box in mfc?
is it possible to display a window .without using windowclass
What types of threads are supported by MFC framework?
How can i implement the dynamic menus in MFC plz give the code
1)why we cant create more than one instance of the class Derived from CWinApp
What is the base class for most MFC classes?
What is the difference between Struts and JSF? Pls list some most suitable differences.
1) Enable or disable a Cancel button at run time?