📄 statusbarex.cpp
字号:
// StatusBarEx.cpp: implementation of the CStatusBarEx class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "StatusBarEx.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CStatusBarEx::CStatusBarEx()
{
}
CStatusBarEx::~CStatusBarEx()
{
}
BEGIN_MESSAGE_MAP(CStatusBarEx, CStatusBar)
//{{AFX_MSG_MAP(CMyStatusBar)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CStatusBarEx::OnPaint()
{
Default();
CClientDC cDC( this );
CPen pen( PS_SOLID, 1, ::GetSysColor( COLOR_3DSHADOW ) );
HPEN oldPen = (HPEN)cDC.SelectObject( pen );
CRect rcItem;
cDC.SelectObject( ::GetStockObject( NULL_BRUSH ) );
for( int i = 0; i < m_nCount; i++ ) {
GetItemRect(i, rcItem );
cDC.Rectangle( rcItem );
}
cDC.SelectObject( oldPen );
}
BOOL CStatusBarEx::SetIndicators(const UINT* lpIDArray, int nIDCount)
{
if( !CStatusBar::SetIndicators( lpIDArray, nIDCount ) ) {
return false;
}
SendMessage( SB_SETMINHEIGHT, 20 );
for( int i = 0; i < nIDCount; i++ ) {
UINT a, b;
int c;
GetPaneInfo( i, a, b, c );
SetPaneInfo( i, a, b | SBPS_NOBORDERS, c );
}
return true;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -