mypropertysheet.cpp

来自「Visual_C++[1].NET_Bible1 Visual_C++宝典书中」· C++ 代码 · 共 49 行

CPP
49
字号
// MyPropertySheet.cpp : implementation file
//

#include "stdafx.h"
#include "PropertySheetDemo.h"
#include "MyPropertySheet.h"

// CMyPropertySheet

IMPLEMENT_DYNAMIC(CMyPropertySheet, CPropertySheet)
CMyPropertySheet::CMyPropertySheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}

CMyPropertySheet::CMyPropertySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
}

CMyPropertySheet::~CMyPropertySheet()
{
}


BEGIN_MESSAGE_MAP(CMyPropertySheet, CPropertySheet)
END_MESSAGE_MAP()


// CMyPropertySheet message handlers

void CMyPropertySheet::PostNcDestroy()
{
  int nPages = GetPageCount();
  for (int i = (nPages - 1); i >= 0; i--)
  {
    CPropertyPage* pPage = GetPage(i);
    ASSERT(pPage);
    if (pPage)
    {
      delete pPage;
      RemovePage(i);
      TRACE("[CMyPropertySheet::OnDestroy] Removing page %ld\n", i);
    }
  }
 
  CPropertySheet::PostNcDestroy();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?