flightpropertysheet.cpp

来自「用VC实现的一个简单的旅行预订系统」· C++ 代码 · 共 75 行

CPP
75
字号
// FlightPropertySheet.cpp : implementation file
//

#include "stdafx.h"
#include "resource.h"
#include "FlightPropertySheet.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFlightPropertySheet

IMPLEMENT_DYNAMIC(CFlightPropertySheet, CPropertySheet)

CFlightPropertySheet::CFlightPropertySheet(CWnd* pWndParent)
	 : CPropertySheet(IDS_PROPSHT_CAPTION, pWndParent)
{
	// Add all of the property pages here.  Note that
	// the order that they appear in here will be
	// the order they appear in on screen.  By default,
	// the first page of the set is the active one.
	// One way to make a different property page the 
	// active one is to call SetActivePage().

	AddPage(&m_Page1);
	AddPage(&m_Page2);
}

CFlightPropertySheet::~CFlightPropertySheet()
{
}


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


/////////////////////////////////////////////////////////////////////////////
// CFlightPropertySheet message handlers

void CFlightPropertySheet::PostNcDestroy()
{
	CPropertySheet::PostNcDestroy();
	delete this;
}



BOOL CFlightPropertySheet::OnInitDialog() 
{
	BOOL bResult = CPropertySheet::OnInitDialog();
	
	// TODO: Add your specialized code here
	//去除默认的按钮
	static int rgiButtons[] = {IDOK,IDCANCEL,ID_APPLY_NOW,IDHELP};
	for(int i = 0;i < 4;i++)
	{
		HWND hWnd=::GetDlgItem(m_hWnd,rgiButtons[i]);
		if(hWnd != NULL)
		{
			::ShowWindow(hWnd,SW_HIDE);
			::EnableWindow(hWnd,FALSE);
		}
	}
	CenterWindow();

	return bResult;
}

⌨️ 快捷键说明

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