WindowClass is a neat wrapper for RegisterClassEx(). More...
#include <window.h>
Public Member Functions | |
WindowClass (LPCTSTR classname, UINT style=0, WNDPROC wndproc=Window::WindowWndProc) | |
ATOM | Register () |
operator ATOM () | |
operator LPCTSTR () | |
Protected Attributes | |
ATOM | _atomClass |
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.
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; }
WindowClass::operator ATOM | ( | ) | [inline] |
Definition at line 238 of file window.h.
References Register().
{return Register();}
WindowClass::operator LPCTSTR | ( | ) | [inline] |
Definition at line 241 of file window.h.
References Register().
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; }
ATOM WindowClass::_atomClass [protected] |
Definition at line 244 of file window.h.
Referenced by Register(), and WindowClass().
ROS Explorer Source Code Documentation
generated on 02.01.2013 by ![]() |