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

📄 typebutton.cpp

📁 电脑编程技巧和源码。很不错的。
💻 CPP
字号:
// TypeButton.cpp : implementation file
//

#include "stdafx.h"
#include "Monitor.h"
#include "TypeButton.h"

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

/////////////////////////////////////////////////////////////////////////////
// CTypeButton

CTypeButton::CTypeButton()
{
}

CTypeButton::~CTypeButton()
{
}


BEGIN_MESSAGE_MAP(CTypeButton, CButton)
	//{{AFX_MSG_MAP(CTypeButton)
	ON_CONTROL_REFLECT(BN_CLICKED, OnClicked)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CTypeButton message handlers

void CTypeButton::OnClicked() 
{
	// TODO: Add your control notification handler code here
	int qwert=GetDlgCtrlID();	
}

BOOL CTypeButton::SetTextColor(COLORREF clrText)
{
	m_clrText=clrText;
	return TRUE;
}

void CTypeButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) 
{
	// TODO: Add your code to draw the specified item
	CDC dc;
	RECT rc;
	CString strText;
	dc.Attach(lpDrawItemStruct->hDC);
	rc=lpDrawItemStruct->rcItem;
	GetWindowText(strText);
	
	dc.SetTextColor(m_clrText);
	dc.DrawText(strText,&rc,DT_CENTER | DT_VCENTER | DT_SINGLELINE);
}

⌨️ 快捷键说明

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