ColorStatic Struct Reference

#include <window.h>

Inheritance diagram for ColorStatic:

Inheritance graph
[legend]
Collaboration diagram for ColorStatic:

Collaboration graph
[legend]

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

Detailed Description

Definition at line 749 of file window.h.


Member Typedef Documentation

typedef SubclassedWindow ColorStatic::super

Reimplemented from SubclassedWindow.

Definition at line 751 of file window.h.


Constructor & Destructor Documentation

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     }


Member Function Documentation

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     }

Here is the call graph for this function:


Field Documentation

COLORREF ColorStatic::_textColor [protected]

Definition at line 790 of file window.h.

Referenced by WndProc().

HBRUSH ColorStatic::_hbrush_bkgnd [protected]

Definition at line 791 of file window.h.

Referenced by WndProc().

HFONT ColorStatic::_hfont [protected]

Definition at line 792 of file window.h.

Referenced by WndProc().


The documentation for this struct was generated from the following file:
IBrowser Source Code Documentation
generated on 18.09.2008 by doxygen

Homepage