Assuming that you have created your dialog layout and plugged in the controls you want, you must show it.
1) Modal dialog box: by calling CDialog::DoModal, you leave the control of the application to that sole window, until you close it. It becomes the only window to capture events
2) Modeless dialog: you simply call CDialog::ShowWindow (CWnd::ShowWindow); you can pop up other dialogs around and they will be all elligible to receive inputs.
Hope this helps
hi,
-
#include <afxwin.h>
-
-
class CExerciseApp : public CWinApp
-
{
-
public:
-
virtual BOOL InitInstance();
-
};
-
-
-
-
-
BOOL CExerciseApp::InitInstance()
-
{
-
CDialog init;
-
init.Create(IDD_DIALOG1);
-
m_pMainWnd = new CMainFrame;
-
m_pMainWnd->ShowWindow(SW_NORMAL);
-
-
return TRUE;
-
}
-
-
CExerciseApp theApp;
-
HEre is my code i just want to create a Dialog box...How?...pls help