mysheet.cpp
来自「在VC++对话框中调用属性页的一个实例程序源码」· C++ 代码 · 共 62 行
CPP
62 行
// MySheet.cpp : implementation file
//
#include "stdafx.h"
#include "Property3.h"
#include "MySheet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMySheet
IMPLEMENT_DYNAMIC(CMySheet, CPropertySheet)
CMySheet::CMySheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}
CMySheet::CMySheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
}
CMySheet::~CMySheet()
{
}
BEGIN_MESSAGE_MAP(CMySheet, CPropertySheet)
//{{AFX_MSG_MAP(CMySheet)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMySheet message handlers
BOOL CMySheet::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
CRect rectWnd;
GetWindowRect(rectWnd);
SetWindowPos(NULL, 0, 0,
rectWnd.Width() + 100,
rectWnd.Height(),
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
CRect rectButton(rectWnd.Width() + 25, 25,
rectWnd.Width()+75, 75);
m_button.Create("Button", BS_PUSHBUTTON, CRect(rectWnd.Width(), 25,
rectWnd.Width()+75, 50), this, 1);
m_button.ShowWindow( SW_SHOW );
CenterWindow();
return bResult;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?