ReactOS 0.4.15-dev-5667-ged97270
WindowClass Struct Reference

#include <window.h>

Inheritance diagram for WindowClass:
Collaboration diagram for WindowClass:

Public Member Functions

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

Protected Attributes

ATOM _atomClass
 

Additional Inherited Members

- Public Attributes inherited from _WNDCLASSEXA
UINT cbSize
 
UINT style
 
WNDPROC lpfnWndProc
 
int cbClsExtra
 
int cbWndExtra
 
HINSTANCE hInstance
 
HICON hIcon
 
HCURSOR hCursor
 
HBRUSH hbrBackground
 
LPCSTR lpszMenuName
 
LPCSTR lpszClassName
 
HICON hIconSm
 

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::WindowClass ( LPCTSTR  classname,
UINT  style = 0,
WNDPROC  wndproc = Window::WindowWndProc 
)

Definition at line 31 of file window.cpp.

32{
33 memset(this, 0, sizeof(WNDCLASSEX));
34
35 cbSize = sizeof(WNDCLASSEX);
36 style = style_;
39 this->hbrBackground = (HBRUSH)(COLOR_BTNFACE+1);
41 lpfnWndProc = wndproc;
42
43 _atomClass = 0;
44}
ExplorerGlobals g_Globals
Definition: explorer.cpp:52
WCHAR classname[128]
Definition: startup.c:15
#define memset(x, y, z)
Definition: compat.h:39
HINSTANCE _hInstance
Definition: globals.h:270
ATOM _atomClass
Definition: window.h:244
HINSTANCE hInstance
Definition: winuser.h:3196
HCURSOR hCursor
Definition: winuser.h:3198
UINT style
Definition: winuser.h:3192
UINT cbSize
Definition: winuser.h:3191
WNDPROC lpfnWndProc
Definition: winuser.h:3193
LPCSTR lpszClassName
Definition: winuser.h:3201
HBRUSH hbrBackground
Definition: winuser.h:3199
#define IDC_ARROW
Definition: winuser.h:682
#define LoadCursor
Definition: winuser.h:5802
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5709
#define COLOR_BTNFACE
Definition: winuser.h:922

Member Function Documentation

◆ operator ATOM()

WindowClass::operator ATOM ( )
inline

Definition at line 238 of file window.h.

238{return Register();}
ATOM Register()
Definition: window.h:230

◆ operator LPCTSTR()

WindowClass::operator LPCTSTR ( )
inline

Definition at line 241 of file window.h.

241{return (LPCTSTR)(int)Register();}
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
const CHAR * LPCTSTR
Definition: xmlstorage.h:193

◆ Register()

ATOM WindowClass::Register ( )
inline

Definition at line 230 of file window.h.

231 {
232 if (!_atomClass)
234
235 return _atomClass;
236 }
#define RegisterClassEx
Definition: winuser.h:5827

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

Member Data Documentation

◆ _atomClass

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: