Crossware

Table of Contents        Previous topic       Next topic       

Using the Custom AppWizard or Project Template->Tutorial - Creating an Extension with the AppWizard->Adding a Dialog Box to your Extension->Creating the Class Source Files for your Dialog Box

We will now use Microsoft Class Wizard to create a C++ source and header file for the dialox box resource that you have just created.

Right mouse click on your dialog box and select ClassWizard from the context menu that appears.  Click on OK to create a new class for the IDD_DIALOG_MESSAGES resource.  Enter CMessageDlg in the Name field of the New Class box and click on OK.  Files MessageDlg.cpp and MessageDlg.h will now be created.

In the Message Maps tab, click on the IDC_BUTTON_SEND Object ID and then click on the BN_CLICKED message.  Click on the Add Function.. button and click on OK to accept the default function name of OnButtonSend.

In the Member Variables tab, click on the IDC_EDIT_MESSAGE Control ID.  Click on Add Variable'85 and enter m_strMessage as the Member variable name.  Click on OK.

Finally click on OK to exit MFC Class Wizard.