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

📄 mimadlg.cpp

📁 visual c++ 实例编程
💻 CPP
字号:
// MimaDlg.cpp : implementation file
//

#include "stdafx.h"
#include "NTAutoLogon.h"
#include "MimaDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMimaDlg dialog


CMimaDlg::CMimaDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CMimaDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CMimaDlg)
	m_strMima = _T("");
	//}}AFX_DATA_INIT
}


void CMimaDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMimaDlg)
	DDX_Text(pDX, IDC_EDIT1, m_strMima);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMimaDlg, CDialog)
	//{{AFX_MSG_MAP(CMimaDlg)
	ON_WM_CTLCOLOR()
	ON_WM_PAINT()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMimaDlg message handlers

void CMimaDlg::OnOK() 
{
	UpdateData();
	CDialog::OnOK();
}


HBRUSH CMimaDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
    HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
    
   // pDC->SetBkColor(RGB(255,120,96));

    return (HBRUSH)(m_BrushBK.GetSafeHandle());

}

void CMimaDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
//		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

BOOL CMimaDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
//	m_BrushBK.CreateSolidBrush(RGB(255,120,90));
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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