
August 30th, 2003, 02:49 AM
|
|
Junior Member
|
|
Join Date: Aug 2003
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Program hang when creating a CDialog
I am using Visual C++ to create an application, once i want to create a popup dialog box after click the option in the popup menu. So i write the following code:
void CGroupchatDlg::OnPopupCreategroup()
{
CDialog createDialog(IDD_CREATEGROUP,&dialog);
createDialog.DoModal();
}
The IDD_CREATEGROUP is the dialog box that i created in the resource editor.And the variable dialog is represent the dialog box of main window, so i set the parent window of the createDialog is dialog. When the test the program, after clicking the popup menu that when to show this model dialog box, the program will hang, but the CDialog createDialog can show in the screen. And i cannot take a cursor to anyone of the control in the createDialog. Thx for help.
|