OwnerDrawParent< BASE > Struct Template Reference

draw message routing for ColorButton and PictureButton More...

#include <window.h>

Inheritance diagram for OwnerDrawParent< BASE >:

Inheritance graph
[legend]
Collaboration diagram for OwnerDrawParent< BASE >:

Collaboration graph
[legend]

Public Types

typedef BASE super

Public Member Functions

 OwnerDrawParent (HWND hwnd)
LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)

Detailed Description

template<typename BASE>
struct OwnerDrawParent< BASE >

draw message routing for ColorButton and PictureButton

Definition at line 606 of file window.h.


Member Typedef Documentation

template<typename BASE>
typedef BASE OwnerDrawParent< BASE >::super

Definition at line 608 of file window.h.


Constructor & Destructor Documentation

template<typename BASE>
OwnerDrawParent< BASE >::OwnerDrawParent ( HWND  hwnd  )  [inline]

Definition at line 610 of file window.h.

00611      : super(hwnd) {}


Member Function Documentation

template<typename BASE>
LRESULT OwnerDrawParent< BASE >::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [inline]

Definition at line 613 of file window.h.

References PM_DISPATCH_DRAWITEM.

00614     {
00615         switch(nmsg) {
00616           case WM_DRAWITEM:
00617             if (wparam) {   // should there be drawn a control?
00618                 HWND hctl = GetDlgItem(this->_hwnd, wparam);
00619 
00620                 if (hctl)
00621                     return SendMessage(hctl, PM_DISPATCH_DRAWITEM, wparam, lparam);
00622             } /*else        // or is it a menu entry?
00623                 ; */
00624 
00625             return 0;
00626 
00627           default:
00628             return super::WndProc(nmsg, wparam, lparam);
00629         }
00630     }


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

Homepage