| | |
| | | // CMyStatusbar 消息处理程序 |
| | | |
| | | |
| | | void CMyStatusbar::setBkgnd(COLORREF color) |
| | | void CMyStatusbar::setBackgroundColor(COLORREF color) |
| | | { |
| | | if (m_brBkgnd.GetSafeHandle() != nullptr) { |
| | | m_brBkgnd.DeleteObject(); |
| | |
| | | |
| | | m_brBkgnd.CreateSolidBrush(color); |
| | | Invalidate(); |
| | | UpdateWindow(); |
| | | } |
| | | |
| | | void CMyStatusbar::setForegroundColor(COLORREF cr) |
| | | { |
| | | m_crForeground = cr; |
| | | Invalidate(); |
| | | UpdateWindow(); |
| | | } |
| | | |
| | |
| | | if (nCtlColor == CTLCOLOR_STATIC) { |
| | | pDC->SetBkMode(TRANSPARENT); |
| | | pDC->SetBkColor(m_crBkgnd); |
| | | pDC->SetTextColor(RGB(255, 255, 255)); |
| | | pDC->SetTextColor(m_crForeground); |
| | | } |
| | | |
| | | if (m_brBkgnd.GetSafeHandle() == nullptr) { |