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

📄 frmexit.cpp

📁 上传的是有关mfc的详细介绍
💻 CPP
字号:
// ExitFrm.cpp: implementation of the ExitFrm class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "FrmExit.h"
#include "SystemConfig.h"

#include "ToolKit.h"

#include "FrmMain.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

IMPLEMENT_REGISTANDPRC(FrmExit)

FrmExit::FrmExit()
{
	this->m_strFile				= "FrmExit.ini";
	this->m_ClassName			= "FrmExit";	
	this->m_hBack				= &FrmExit::s_FrmExit.m_hWnd;
	this->m_WndStruct.lpszClass	= TEXT(this->m_ClassName);
	this->m_WndStruct.lpszName	= (LPCTSTR)SystemConfig::GetConfig()->m_chTitle;
}

FrmExit::~FrmExit()
{

}

void FrmExit::OnOK(WPARAM wParam, LPARAM lParam)
{
	ToolKit::ExitSystem();
}

void FrmExit::OnCancel(WPARAM wParam, LPARAM lParam)
{
	this->OnHide();
	SendMessage(*this->m_hBack, MFC_SHOWWND, 0, 0);
}

void FrmExit::SetControlPropertity()
{
	CBaseDialog::SetControlPropertity();

	m_ctrlOK = this->GetControlByKey("IDC_BTN_OK");
	m_ctrlCancel = this->GetControlByKey("IDC_BTN_CANCEL");
	m_ctrlTitle = this->GetControlByKey("IDC_STATIC_QUERY");

	// 显示比例:设置显示比例按钮的字体大小及位置
	m_ctrlTitle->m_CProperty.m_logfont.lfWeight = 700;   // 粗体
	m_ctrlTitle->m_CProperty.m_logfont.lfWidth += 22;
	m_ctrlTitle->m_CProperty.m_logfont.lfHeight += 26;
	m_ctrlTitle->m_CProperty.m_TextFormat = DT_SINGLELINE|DT_TOP|DT_CENTER;

	// 设置控件事件
	this->SetCtrlEvent(m_ctrlOK, OnOK);
	this->SetCtrlEvent(m_ctrlCancel, OnCancel);
}

⌨️ 快捷键说明

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