Public Member Functions | Protected Attributes

WindowClass Struct Reference

WindowClass is a neat wrapper for RegisterClassEx(). More...

#include <window.h>

Inheritance diagram for WindowClass:
Inheritance graph
Collaboration diagram for WindowClass:
Collaboration graph

List of all members.

Public Member Functions

 WindowClass (LPCTSTR classname, UINT style=0, WNDPROC wndproc=Window::WindowWndProc)
ATOM Register ()
 operator ATOM ()
 operator LPCTSTR ()

Protected Attributes

ATOM _atomClass

Detailed Description

WindowClass is a neat wrapper for RegisterClassEx().

Just construct a WindowClass object, override the attributes you want to change, then call Register() or simply request the ATOM value to register the window class. You don't have to worry calling Register() more than once. It checks if, the class has already been registered.

Definition at line 226 of file window.h.

Constructor & Destructor Documentation

WindowClass::WindowClass ( LPCTSTR  classname,
UINT  style = 0,
WNDPROC  wndproc = Window::WindowWndProc 

Definition at line 34 of file window.cpp.

References _atomClass, ExplorerGlobals::_hInstance, and g_Globals.

    memset(this, 0, sizeof(WNDCLASSEX));

    cbSize = sizeof(WNDCLASSEX);
    style = style_;
    hInstance = g_Globals._hInstance;
    hCursor = LoadCursor(0, IDC_ARROW);

    lpszClassName = classname;
    lpfnWndProc = wndproc;

    _atomClass = 0;

Member Function Documentation

WindowClass::operator ATOM (  ) [inline]

Definition at line 238 of file window.h.

References Register().

{return Register();}

Here is the call graph for this function:

WindowClass::operator LPCTSTR (  ) [inline]

Definition at line 241 of file window.h.

References Register().

{return (LPCTSTR)(int)Register();}

Here is the call graph for this function:

ATOM WindowClass::Register (  ) [inline]

Definition at line 230 of file window.h.

References _atomClass.

Referenced by operator ATOM(), and operator LPCTSTR().

        if (!_atomClass)
            _atomClass = RegisterClassEx(this);

        return _atomClass;

Here is the caller graph for this function:

Member Data Documentation

ATOM WindowClass::_atomClass [protected]

Definition at line 244 of file window.h.

Referenced by Register(), and WindowClass().

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

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage