Chapter 12: Dialog-Based Windows Visual C++ and MFC Fundamentals
- Click Finish
- On the dialog, click TODO and press Delete three times to delete the TODO line, the
OK and the Cancel buttons - While the dialog box is displaying, access its properties.
Change its ID to IDD_QUADRILATERAL
If necessary, change its Caption to Quadrilateral
Change its Style value to Child
Change its Border to Thin
Remove the check mark of the System Menu check box or set it to False
Set its Visible property to False or remove its check mark
If necessary, remove the check mark of the Disabled check box or set it to False - Save All
- From the Controls toolbox, click the Edit Box button and click anywhere in the
dialog box - Open the header file of the dialog
Change its base class to CPropertyPage
Change the value of the IDD to IDD_QUADRILATERAL
class CQuadrilateral : public CPropertyPage
{
// Construction
public:
CQuadrilateral(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CQuadrilateral)
enum { IDD = IDD_QUADRILATERAL };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
- Change the source file of the CQuadrilateral class as follows:
// Quadrilateral.cpp : implementation file
//
#include "stdafx.h"
#include "Geometry.h"
#include "Quadrilateral.h"