PhoneSheetDlg.cpp
上传用户:cuijiu615
上传日期:2007-03-28
资源大小:45k
文件大小:2k
- // 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);
- }
- }