www.pudn.com > 321inter3.rar > MySheet.cpp


// 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; 
}