Created
September 1, 2018 06:31
-
-
Save nibasya/3719ba6fc185f4e299c27a8a5808c0c1 to your computer and use it in GitHub Desktop.
Add text on progress control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
Name: InfoProgresssCtrl.h | |
Desc: CProgressCtrlに文字情報表示機能を追加. | |
Author: donadona | |
reidphoaさんのInfoProgressBar.hより改変 | |
*********************************************************************/ | |
#if !defined(AFX_INFOPROGRESSCTRL_H__09E9DBA9_0BB8_4EF2_9208_C4A44A679B89__INCLUDED_) | |
#define AFX_INFOPROGRESSCTRL_H__09E9DBA9_0BB8_4EF2_9208_C4A44A679B89__INCLUDED_ | |
#if _MSC_VER > 1000 | |
#pragma once | |
#endif // _MSC_VER > 1000 | |
class CInfoProgressCtrl : public CProgressCtrl | |
{ | |
public: | |
CInfoProgressCtrl(); | |
virtual ~CInfoProgressCtrl(); | |
virtual void SetTxtColor(COLORREF rgbIn, COLORREF rgbOut) | |
{ | |
m_rgbIn = rgbIn; | |
m_rgbOut = rgbOut; | |
} | |
// オーバーライド | |
//{{AFX_VIRTUAL(CInfoProgressCtrl) | |
protected: | |
virtual void PreSubclassWindow(); | |
//}}AFX_VIRTUAL | |
protected: | |
virtual void DrawText(CDC* pDC); | |
CFont m_font; // フォント | |
COLORREF m_rgbIn; // 文字列の色(バー内) | |
COLORREF m_rgbOut; // 文字列の色(バー外) | |
CRect m_rcBarMax; // バーの領域 | |
// 生成されたメッセージ マップ関数 | |
//{{AFX_MSG(CInfoProgressCtrl) | |
afx_msg void OnPaint(); | |
afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam); | |
//}}AFX_MSG | |
DECLARE_MESSAGE_MAP() | |
}; | |
///////////////////////////////////////////////////////////////////////////// | |
//{{AFX_INSERT_LOCATION}} | |
#endif // !defined(AFX_INFOPROGRESSCTRL_H__09E9DBA9_0BB8_4EF2_9208_C4A44A679B89__INCLUDED_) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
Name: InfoProgresssCtrl.h | |
Desc: CProgressCtrlに文字情報表示機能を追加. | |
Author: donadona | |
reidphoaさんのInfoProgressBar.hより改変 | |
*********************************************************************/ | |
#if !defined(AFX_INFOPROGRESSCTRL_H__09E9DBA9_0BB8_4EF2_9208_C4A44A679B89__INCLUDED_) | |
#define AFX_INFOPROGRESSCTRL_H__09E9DBA9_0BB8_4EF2_9208_C4A44A679B89__INCLUDED_ | |
#if _MSC_VER > 1000 | |
#pragma once | |
#endif // _MSC_VER > 1000 | |
class CInfoProgressCtrl : public CProgressCtrl | |
{ | |
public: | |
CInfoProgressCtrl(); | |
virtual ~CInfoProgressCtrl(); | |
virtual void SetTxtColor(COLORREF rgbIn, COLORREF rgbOut) | |
{ | |
m_rgbIn = rgbIn; | |
m_rgbOut = rgbOut; | |
} | |
// オーバーライド | |
//{{AFX_VIRTUAL(CInfoProgressCtrl) | |
protected: | |
virtual void PreSubclassWindow(); | |
//}}AFX_VIRTUAL | |
protected: | |
virtual void DrawText(CDC* pDC); | |
CFont m_font; // フォント | |
COLORREF m_rgbIn; // 文字列の色(バー内) | |
COLORREF m_rgbOut; // 文字列の色(バー外) | |
CRect m_rcBarMax; // バーの領域 | |
// 生成されたメッセージ マップ関数 | |
//{{AFX_MSG(CInfoProgressCtrl) | |
afx_msg void OnPaint(); | |
afx_msg LRESULT OnSetText(WPARAM wParam, LPARAM lParam); | |
//}}AFX_MSG | |
DECLARE_MESSAGE_MAP() | |
}; | |
///////////////////////////////////////////////////////////////////////////// | |
//{{AFX_INSERT_LOCATION}} | |
#endif // !defined(AFX_INFOPROGRESSCTRL_H__09E9DBA9_0BB8_4EF2_9208_C4A44A679B89__INCLUDED_) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment