Sowl  1.0
Simple Object Window Library
sowl::WindowClassRegisterer Class Reference

Builds a call to <a href"https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerclassw">RegisterClass. More...

#include <WindowClassRegisterer.h>

Public Member Functions

 WindowClassRegisterer (HINSTANCE processHandle, LPCWSTR className, WNDPROC windowProcedure)
 Initialize the builder with given parameters and defaults. More...
 
HINSTANCE ProcessHandle () const
 
LPCWSTR ClassName () const
 
WindowClassRegisterer & WithBackgroundBrush (HBRUSH handle)
 
WindowClassRegisterer & WithCursor (HCURSOR handle)
 
WindowClassRegisterer & WithIcon (HICON handle)
 
WindowClassRegisterer & WithMenu (LPCWSTR name)
 
WindowClassRegisterer & WithStyle (UINT style)
 
void Register () const
 If the class was not registered, register it. Otherwise, retrieve the registered class information. More...
 

Detailed Description

Builds a call to <a href"https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerclassw">RegisterClass.

Constructor & Destructor Documentation

WindowClassRegisterer::WindowClassRegisterer ( HINSTANCE  processHandle,
LPCWSTR  className,
WNDPROC  windowProcedure 
)

Initialize the builder with given parameters and defaults.

Parameters
processHandleHandle of the process where the window class to be registered must belongs to.
classNameA valid window class name.
windowProcedureA pointer to the window procedure.
Returns
A builder. If parameters are valid, a call to Register() must return a valid registered window class.

Member Function Documentation

void WindowClassRegisterer::Register ( ) const

If the class was not registered, register it. Otherwise, retrieve the registered class information.

Returns
Structure with information about the registered class.

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