Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Visual C++ and MFC Fundamentals Chapter 12: Dialog-Based Windows



  1. Implement the event as follows:


BOOL CDynamicDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
CRect Recto(10, 10, 176, 138);

m_Panel->Create("STATIC", NULL,
WS_CHILD | WS_VISIBLE | WS_DLGFRAME,
Recto, this, 0x166, NULL);

return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}


  1. Execute the application and display the Dynamic Objects dialog box using the main
    menu:

  2. To close the dialog box, click its system Close button or. Also, close the
    application and return to MSVC

  3. Open the Geometry application. If you do not have it, open the Geometry1
    application from the exercises that accompany this book

  4. As done for the above CDynamicDlg class, Add the OnInitDialog() event for the
    CGeomeSheet, the CCircular, and the CGeome3D classes

  5. Save All

Free download pdf