⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scriptpage.cpp

📁 一个有分割窗口的程序
💻 CPP
字号:
// scriptPage.cpp : implementation file
//

#include "stdafx.h"
#include "testCard.h"
#include "scriptPage.h"

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

/////////////////////////////////////////////////////////////////////////////
// scriptPage property page

IMPLEMENT_DYNCREATE(scriptPage, CPropertyPage)

scriptPage::scriptPage() : CPropertyPage(scriptPage::IDD)
{
	//{{AFX_DATA_INIT(scriptPage)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	m_editBrush.CreateSolidBrush(RGB(255, 255, 255));
}

scriptPage::~scriptPage()
{
}

void scriptPage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(scriptPage)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(scriptPage, CPropertyPage)
	//{{AFX_MSG_MAP(scriptPage)
	ON_WM_SIZE()
	ON_WM_CTLCOLOR()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// scriptPage message handlers

void scriptPage::OnSize(UINT nType, int cx, int cy) 
{
//	CPropertyPage::OnSize(nType, cx, cy);
	this->ShowWindow(SW_MAXIMIZE);
	
	CWnd *pchild = this->GetWindow(GW_CHILD);//只有一个顶层子窗口
	if(pchild != NULL){
		CRect rect;
		this->GetWindowRect(&rect);
		pchild->ScreenToClient(&rect);
		pchild->SetWindowPos(NULL, 0, 0, rect.Width(), rect.Height(),
							SWP_NOZORDER | SWP_NOACTIVATE);
	}	
}

HBRUSH scriptPage::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
	HBRUSH hbr = CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor);
	
	if(pWnd->GetDlgCtrlID() == IDC_EDIT1){
		pDC->SetBkColor(RGB(255, 255, 255));
		return m_editBrush;	
	}
	
	// TODO: Return a different brush if the default is not desired
	return hbr;
}

⌨️ 快捷键说明

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