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

📄 myinfodlg.cpp

📁 本程序提供了一种编写定时提醒功能的例子。
💻 CPP
字号:
// MyInfoDlg.cpp : implementation file
//

#include "stdafx.h"
#include "AlarmInfo.h"
#include "MyInfoDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CMyInfoDlg dialog


CMyInfoDlg::CMyInfoDlg(CWnd* pParent) : CDialog(CMyInfoDlg::IDD, pParent)
{
}

void CMyInfoDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyInfoDlg)
	DDX_Text(pDX, IDC_INFO, m_Info);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMyInfoDlg, CDialog)
	//{{AFX_MSG_MAP(CMyInfoDlg)
	ON_WM_CTLCOLOR()
	ON_WM_SHOWWINDOW()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyInfoDlg message handlers

HBRUSH CMyInfoDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
	HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);

	// TODO: Change any attributes of the DC here
	switch (nCtlColor)
	{
	case CTLCOLOR_STATIC:
		{
			if (pWnd->GetDlgCtrlID() == IDC_INFO)	//设置静态文本的字体颜色			{
				pDC->SetBkMode(TRANSPARENT);   
				pDC->SetTextColor(RGB(255, 0, 0));   
				pDC->SetBkColor(RGB(0, 0, 0));
			}

			break;
		}   
	default:
		hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
	}
	// TODO: Return a different brush if the default is not desired
	return hbr;
}

void CMyInfoDlg::OnShowWindow(BOOL bShow, UINT nStatus) 
{
	CDialog::OnShowWindow(bShow, nStatus);
	
	// TODO: Add your message handler code here
	CenterWindow();
}

⌨️ 快捷键说明

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