www.gusucode.com > VC++动画翻页效果的电话簿程序源码程序 > VC++动画翻页效果的电话簿程序源码程序/code/PhoneSheetDlg.cpp

    //Download by http://www.NewXing.com
// PhoneSheetDlg.cpp : implementation file
//

#include "stdafx.h"
#include "phonebook.h"
#include "PhoneSheetDlg.h"
#include "AboutDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// PhoneSheetDlg

IMPLEMENT_DYNAMIC(PhoneSheetDlg, CPropertySheet)

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

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

PhoneSheetDlg::~PhoneSheetDlg()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// PhoneSheetDlg message handlers

BOOL PhoneSheetDlg::OnInitDialog() 
{
	BOOL bResult = CPropertySheet::OnInitDialog();
	
	GetDlgItem(IDOK)->ShowWindow(SW_HIDE);
	GetDlgItem(IDCANCEL)->ShowWindow(SW_HIDE);
	GetDlgItem(IDHELP)->ShowWindow(SW_HIDE);
	GetDlgItem(12321)->ShowWindow(SW_HIDE);
	CRect rectWnd;
	GetWindowRect(rectWnd);
	SetWindowPos(NULL, 0, 0,rectWnd.Width() ,rectWnd.Height()-25,SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
	

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu="关于";
		//strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	return bResult;
}


void PhoneSheetDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if (nID  == IDM_ABOUTBOX)
	{
		AboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CPropertySheet::OnSysCommand(nID, lParam);
	}
}