Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Visual C++ and MFC Fundamentals Chapter 15: Fundamental Controls


// the CREATESTRUCT cs
cs.style &= ~FWS_ADDTOTITLE;

return TRUE;
}


  1. Test the application. Then close it and return to MSVC

  2. Open the IDR_MAINFRAME menu and change the Caption of the New menu item
    under File to &New...\tCtrl+N

  3. Display the Add Resource dialog box and expand the Dialog node. Double-click
    IDD_PROPPAGE_MEDIUM

  4. Delete its TODO line. Change its Caption to Company Forms and its ID to
    IDD_COMPANY_FORMS

  5. Add A New Class for the new dialog box. Name it CCompanyForms and base it on
    CPropertyPage

  6. Add another IDDPROPPAGE MEDIUM dialog. Delete its TODO line. Change its
    Caption to Projects and its ID to IDD_COMPANY_PROJECTS

  7. Add A New Class for the new dialog box. Name it CCompanyProjects and base it
    on CPropertyPage

  8. Add a New MFC Class named CCompanySheet and based on CPropertySheet

  9. In the header of the property sheet class, delete the constructor that takes a null-
    terminated string and add the previously created property page classes in the header
    of the:


#pragma once
#include "CompanyForms.h"
#include "CompanyProjects.h"

// CCompanySheet

class CCompanySheet : public CPropertySheet
{
DECLARE_DYNAMIC(CCompanySheet)

public:
CCompanySheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT
iSelectPage = 0);
Free download pdf