ReactOS  0.4.14-dev-1314-gacf135d
OwnerdrawnButton Struct Referenceabstract

#include <window.h>

Inheritance diagram for OwnerdrawnButton:
Collaboration diagram for OwnerdrawnButton:

Public Types

typedef SubclassedWindow super
 
- Public Types inherited from SubclassedWindow
typedef Window super
 
- Public Types inherited from Window
typedef map< HWND, Window * > WindowMap
 
typedef Window *(* CREATORFUNC) (HWND)
 
typedef Window *(* CREATORFUNC_INFO) (HWND, const void *)
 

Public Member Functions

 OwnerdrawnButton (HWND hwnd)
 
- Public Member Functions inherited from SubclassedWindow
 SubclassedWindow (HWND)
 
- Public Member Functions inherited from Window
 Window (HWND hwnd)
 
virtual ~Window ()
 
LRESULT SendParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 
LRESULT PostParent (UINT nmsg, WPARAM wparam=0, LPARAM lparam=0)
 

Protected Member Functions

LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
 
virtual void DrawItem (LPDRAWITEMSTRUCT dis)=0
 
- Protected Member Functions inherited from SubclassedWindow
virtual int Command (int id, int code)
 
virtual int Notify (int id, NMHDR *pnmh)
 
- Protected Member Functions inherited from Window
virtual LRESULT Init (LPCREATESTRUCT pcs)
 

Additional Inherited Members

- Static Public Member Functions inherited from Window
static HWND Create (CREATORFUNC creator, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static HWND Create (CREATORFUNC_INFO creator, const void *info, DWORD dwExStyle, LPCTSTR lpClassName, LPCTSTR lpWindowName, DWORD dwStyle, int x, int y, int w, int h, HWND hwndParent=0, HMENU hMenu=0)
 
static Windowcreate_mdi_child (const ChildWndInfo &info, const MDICREATESTRUCT &mcs, CREATORFUNC_INFO creator)
 
static LRESULT CALLBACK WindowWndProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static INT_PTR CALLBACK DialogProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
static Windowget_window (HWND hwnd)
 get window controller from window handle More...
 
template<typename CLASS >
static CLASS * get_window (HWND hwnd)
 
static void register_pretranslate (HWND hwnd)
 
static void unregister_pretranslate (HWND hwnd)
 
static BOOL pretranslate_msg (LPMSG pmsg)
 
static void register_dialog (HWND hwnd)
 
static void unregister_dialog (HWND hwnd)
 
static BOOL dispatch_dialog_msg (LPMSG pmsg)
 
static int MessageLoop ()
 
static void CancelModes ()
 
- Public Attributes inherited from Window
IAccessible IAccessible_iface
 
IOleWindow IOleWindow_iface
 
IEnumVARIANT IEnumVARIANT_iface
 
LONG ref
 
- Static Protected Member Functions inherited from SubclassedWindow
static LRESULT CALLBACK SubclassedWndProc (HWND hwnd, UINT nmsg, WPARAM wparam, LPARAM lparam)
 
- Static Protected Member Functions inherited from Window
static Windowcreate_controller (HWND hwnd)
 create controller for a new window More...
 
static StaticWindowDataGetStaticWindowData ()
 
static LRESULT CALLBACK MDICBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
static LRESULT CALLBACK PropSheetCBTHookProc (int code, WPARAM wparam, LPARAM lparam)
 
- Protected Attributes inherited from SubclassedWindow
WNDPROC _orgWndProc
 
- Static Protected Attributes inherited from Window
static WindowMap s_wnd_map
 
static const voids_new_info = NULL
 
static CREATORFUNC s_window_creator = NULL
 
static HHOOK s_hcbtHook = 0
 
static WindowSet s_pretranslate_windows
 
static WindowSet s_dialogs
 

Detailed Description

Subclass button controls to draw them by using PM_DISPATCH_DRAWITEM The owning window should use the OwnerDrawParent template to route owner draw messages to the buttons.

Definition at line 656 of file window.h.

Member Typedef Documentation

◆ super

Definition at line 658 of file window.h.

Constructor & Destructor Documentation

◆ OwnerdrawnButton()

OwnerdrawnButton::OwnerdrawnButton ( HWND  hwnd)
inline

Definition at line 660 of file window.h.

661  : super(hwnd) {}
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
SubclassedWindow super
Definition: window.h:658

Member Function Documentation

◆ DrawItem()

virtual void OwnerdrawnButton::DrawItem ( LPDRAWITEMSTRUCT  dis)
protectedpure virtual

Implemented in PictureButton, FlatButton, and StartMenuButton.

Referenced by WndProc().

◆ WndProc()

LRESULT OwnerdrawnButton::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
)
protectedvirtual

Reimplemented from SubclassedWindow.

Reimplemented in FlatButton.

Definition at line 865 of file window.cpp.

866 {
867  if (nmsg == PM_DISPATCH_DRAWITEM) {
869  return TRUE;
870  } else
871  return super::WndProc(nmsg, wparam, lparam);
872 }
#define TRUE
Definition: types.h:120
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
virtual void DrawItem(LPDRAWITEMSTRUCT dis)=0
virtual LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
Definition: window.cpp:343
#define PM_DISPATCH_DRAWITEM
Definition: window.h:621
static UINT WPARAM wparam
Definition: combo.c:716

Referenced by StartMenuButton::WndProc(), StartButton::WndProc(), and FlatButton::WndProc().


The documentation for this struct was generated from the following files: