Crossware

Table of Contents        Previous topic       Next topic       

Using the Visual C++ Custom AppWizard->Tutorial - Creating an Extension with the AppWizard->Adding a Dialog Box to your Extension->Making the Dialog Box Modeless

The Create() function must be explicitly called when opening a modeless dialog box.

Open MessageDlg.cpp and modify CMessageDlg::CMessageDlg() adding the line in bold:

CMessageDlg::CMessageDlg(CWnd* pParent /*=NULL*/)
    : CDialog(CMessageDlg::IDD, pParent)
{
 //{{AFX_DATA_INIT(CMessageDlg)
 m_strMessage = _T("");
 //}}AFX_DATA_INIT
 Create(IDD);
}

Also, modify the line:

#include "    \ add additional includes here"

at the top of this file changing it to:

#include "resource.h".