#include <window.h>
Public Types | |
typedef SubclassedWindow | super |
Public Member Functions | |
ColorStatic (HWND hwnd, COLORREF textColor=RGB(255, 0, 0), HBRUSH hbrush_bkgnd=0, HFONT hfont=0) | |
ColorStatic (HWND owner, int id, COLORREF textColor=RGB(255, 0, 0), HBRUSH hbrush_bkgnd=0, HFONT hfont=0) | |
Protected Member Functions | |
LRESULT | WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam) |
Protected Attributes | |
COLORREF | _textColor |
HBRUSH | _hbrush_bkgnd |
HFONT | _hfont |
Definition at line 749 of file window.h.
typedef SubclassedWindow ColorStatic::super |
ColorStatic::ColorStatic | ( | HWND | hwnd, | |
COLORREF | textColor = RGB(255,0,0) , |
|||
HBRUSH | hbrush_bkgnd = 0 , |
|||
HFONT | hfont = 0 | |||
) | [inline] |
Definition at line 753 of file window.h.
00754 : super(hwnd), 00755 _textColor(textColor), 00756 _hbrush_bkgnd(hbrush_bkgnd), 00757 _hfont(hfont) 00758 { 00759 }
ColorStatic::ColorStatic | ( | HWND | owner, | |
int | id, | |||
COLORREF | textColor = RGB(255,0,0) , |
|||
HBRUSH | hbrush_bkgnd = 0 , |
|||
HFONT | hfont = 0 | |||
) | [inline] |
Definition at line 761 of file window.h.
00762 : super(GetDlgItem(owner, id)), 00763 _textColor(textColor), 00764 _hbrush_bkgnd(hbrush_bkgnd), 00765 _hfont(hfont) 00766 { 00767 }
LRESULT ColorStatic::WndProc | ( | UINT | nmsg, | |
WPARAM | wparam, | |||
LPARAM | lparam | |||
) | [inline, protected, virtual] |
Reimplemented from SubclassedWindow.
Definition at line 770 of file window.h.
References _hbrush_bkgnd, _hfont, _textColor, PM_DISPATCH_CTLCOLOR, and SubclassedWindow::WndProc().
00771 { 00772 if (nmsg == PM_DISPATCH_CTLCOLOR) { 00773 HDC hdc = (HDC) wparam; 00774 00775 SetTextColor(hdc, _textColor); 00776 00777 if (_hfont) 00778 SelectFont(hdc, _hfont); 00779 00780 if (_hbrush_bkgnd) 00781 return (LRESULT)_hbrush_bkgnd; 00782 else { 00783 SetBkMode(hdc, TRANSPARENT); 00784 return (LRESULT)GetStockBrush(HOLLOW_BRUSH); 00785 } 00786 } else 00787 return super::WndProc(nmsg, wparam, lparam); 00788 }
COLORREF ColorStatic::_textColor [protected] |
HBRUSH ColorStatic::_hbrush_bkgnd [protected] |
HFONT ColorStatic::_hfont [protected] |
IBrowser Source Code Documentation
generated on 18.09.2008 by |