📄 mprogress.cpp
字号:
// MProgress.cpp : implementation file
//
#include "stdafx.h"
#include "IOTest.h"
#include "MProgress.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMProgress
CMProgress::CMProgress()
{
m_ColorBk=RGB(255,0,0);
m_Brush.CreateSolidBrush(m_ColorBk);
}
CMProgress::~CMProgress()
{
}
BEGIN_MESSAGE_MAP(CMProgress, CProgressCtrl)
//{{AFX_MSG_MAP(CMProgress)
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMProgress message handlers
HBRUSH CMProgress::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CProgressCtrl::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetBkColor(m_ColorBk);
return m_Brush;
return hbr;
}
void CMProgress::UpdateWindowX(COLORREF ColorBk)
{
m_ColorBk=ColorBk;
m_Brush.CreateSolidBrush(m_ColorBk);
UpdateWindow();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -