propsheet.cpp

来自「本软件在输入公历年、月、日后」· C++ 代码 · 共 81 行

CPP
81
字号
// PropSheet.cpp : implementation file
//

#include "stdafx.h"
#include "Calend_CE.h"
#include "PropSheet.h"
#include "Calend_CEDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPropSheet

IMPLEMENT_DYNAMIC(CPropSheet, CPropertySheet)

CPropSheet::CPropSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
	AddPage(&m_page1);
	AddPage(&m_page4);
	m_Dlg=(CCalend_CEDlg*)pParentWnd;
}

CPropSheet::CPropSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
	AddPage(&m_page1);
	AddPage(&m_page4);
	m_Dlg=(CCalend_CEDlg*)pParentWnd;
}

CPropSheet::~CPropSheet()
{
}


BEGIN_MESSAGE_MAP(CPropSheet, CPropertySheet)
	//{{AFX_MSG_MAP(CPropSheet)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPropSheet message handlers

BOOL CPropSheet::OnInitDialog() 
{
	BOOL bResult = CPropertySheet::OnInitDialog();
	
	CTabCtrl* pTAB=GetTabControl( );
	TC_ITEM TabCtrlItem;
	TabCtrlItem.mask = TCIF_TEXT;
	TabCtrlItem.pszText = _T("阴阳历换算 ");
	pTAB->SetItem(0,&TabCtrlItem);
    TabCtrlItem.pszText = _T("版本 ");
	pTAB->SetItem(1,&TabCtrlItem);
	

	ModifyStyleEx(WS_EX_CAPTIONOKBTN,WS_EX_TOPMOST,SWP_NOMOVE);
	MoveWindow(0,0,240,320);
	return bResult;
}

BOOL CPropSheet::DestroyWindow() 
{
m_Dlg->EndDialog(1);		
return CPropertySheet::DestroyWindow();
}

BOOL CPropSheet::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) 
{
if(nID!=1)	
	return CPropertySheet::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
else
	return 1;
}

⌨️ 快捷键说明

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