Window Struct Reference

Class Window is the base class for several C++ window wrapper classes. More...

#include <window.h>

Inheritance diagram for Window:

Inheritance graph
[legend]
Collaboration diagram for Window:

Collaboration graph
[legend]

Public Types

typedef map< HWND, Window * > WindowMap
typedef Window *(* CREATORFUNC )(HWND)
typedef Window *(* CREATORFUNC_INFO )(HWND, const void *)

Public Member Functions

 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)

Static Public Member Functions

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 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)
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 (HWND hwnd=0)

Protected Member Functions

virtual LRESULT Init (LPCREATESTRUCT pcs)
virtual LRESULT WndProc (UINT nmsg, WPARAM wparam, LPARAM lparam)
virtual int Command (int id, int code)
virtual int Notify (int id, NMHDR *pnmh)

Static Protected Member Functions

static Windowcreate_controller (HWND hwnd)
static StaticWindowDataGetStaticWindowData ()

Static Protected Attributes

static WindowMap s_wnd_map
static const void * s_new_info
static CREATORFUNC s_window_creator
static WindowSet s_pretranslate_windows
static WindowSet s_dialogs

Data Structures

struct  StaticWindowData
 structure for managing critical sections as static class information in struct Window More...

Detailed Description

Class Window is the base class for several C++ window wrapper classes.

Window objects are allocated from the heap. They are automatically freed when the window gets destroyed.

Definition at line 58 of file window.h.


Member Typedef Documentation

typedef map<HWND,Window*> Window::WindowMap

Definition at line 64 of file window.h.

typedef Window*(* Window::CREATORFUNC)(HWND)

typedef Window*(* Window::CREATORFUNC_INFO)(HWND, const void *)


Constructor & Destructor Documentation

Window::Window ( HWND  hwnd  ) 

virtual Window::~Window (  )  [virtual]


Member Function Documentation

static HWND Window::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]

static HWND Window::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]

static LRESULT CALLBACK Window::WindowWndProc ( HWND  hwnd,
UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [static]

static INT_PTR CALLBACK Window::DialogProc ( HWND  hwnd,
UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [static]

Reimplemented in PropSheetPageDlg.

static Window* Window::get_window ( HWND  hwnd  )  [static]

Referenced by get_window().

Here is the caller graph for this function:

template<typename CLASS>
static CLASS* Window::get_window ( HWND  hwnd  )  [inline, static]

Definition at line 84 of file window.h.

References get_window().

00084 {return static_cast<CLASS*>(get_window(hwnd));}

Here is the call graph for this function:

static void Window::register_pretranslate ( HWND  hwnd  )  [static]

static void Window::unregister_pretranslate ( HWND  hwnd  )  [static]

static BOOL Window::pretranslate_msg ( LPMSG  pmsg  )  [static]

static void Window::register_dialog ( HWND  hwnd  )  [static]

Referenced by DialogWindow::DialogWindow().

Here is the caller graph for this function:

static void Window::unregister_dialog ( HWND  hwnd  )  [static]

Referenced by DialogWindow::~DialogWindow().

Here is the caller graph for this function:

static BOOL Window::dispatch_dialog_msg ( LPMSG  pmsg  )  [static]

static int Window::MessageLoop (  )  [static]

LRESULT Window::SendParent ( UINT  nmsg,
WPARAM  wparam = 0,
LPARAM  lparam = 0 
)

LRESULT Window::PostParent ( UINT  nmsg,
WPARAM  wparam = 0,
LPARAM  lparam = 0 
)

static void Window::CancelModes ( HWND  hwnd = 0  )  [static]

virtual LRESULT Window::Init ( LPCREATESTRUCT  pcs  )  [protected, virtual]

virtual LRESULT Window::WndProc ( UINT  nmsg,
WPARAM  wparam,
LPARAM  lparam 
) [protected, virtual]

Reimplemented in MainFrameBase, MainFrame, SubclassedWindow, ChildWindow, Dialog, OwnerdrawnButton, FlatButton, ColorStatic, HyperlinkCtrl, EditController, WebChildWindow, and IPCtrlWindow< ChildWindow, SIfacePtr< IWebBrowser2 > >.

virtual int Window::Command ( int  id,
int  code 
) [protected, virtual]

Reimplemented in MainFrameBase, MainFrame, SubclassedWindow, Dialog, and PropSheetPageDlg.

virtual int Window::Notify ( int  id,
NMHDR *  pnmh 
) [protected, virtual]

Reimplemented in MainFrameBase, and SubclassedWindow.

static Window* Window::create_controller ( HWND  hwnd  )  [static, protected]

static StaticWindowData& Window::GetStaticWindowData (  )  [static, protected]


Field Documentation

WindowMap Window::s_wnd_map [static, protected]

Definition at line 114 of file window.h.

const void* Window::s_new_info [static, protected]

Definition at line 116 of file window.h.

CREATORFUNC Window::s_window_creator [static, protected]

Definition at line 117 of file window.h.

WindowSet Window::s_pretranslate_windows [static, protected]

Definition at line 129 of file window.h.

WindowSet Window::s_dialogs [static, protected]

Definition at line 130 of file window.h.


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

Homepage