Sowl  1.0
Simple Object Window Library
CustomWindow.h
1 #pragma once
2 
3 #include "WindowClassRegisterer.h"
4 #include "../WindowWithMessages.h"
5 #include "../WindowHandleCreator.h"
6 #include "../../Graphics/PaintDeviceContext.h"
7 #include <functional>
8 
9 namespace sowl
10 {
13  {
14  public:
15  CustomWindow(HINSTANCE processHandle, LPCWSTR className);
16  explicit CustomWindow(const WindowHandleCreator& handleCreator);
17  explicit CustomWindow(const WindowClassRegisterer& classRegisterer);
18  CustomWindow(const WindowClassRegisterer& classRegisterer, WindowHandleCreator handleCreator);
19 
20  LRESULT Process(UINT uMsg, WPARAM wParam, LPARAM lParam) override;
21 
22  virtual bool OnShow(bool show, int showStatus);
23  virtual void OnPaint(const PaintDeviceContext& dc);
24  virtual bool OnCommand(int notificationCode, int senderId, HWND controlHandle);
25  virtual bool OnLButtonDown(int mouseKeys, int x, int y);
26 
27  static WindowClassRegisterer ClassRegisterer(HINSTANCE processHandle, LPCWSTR className);
28  static LRESULT CALLBACK BindAndProcess(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
29  };
30 }
Builds a call to <a href"https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-regis...
Definition: WindowClassRegisterer.h:7
Definition: PaintDeviceContext.h:6
Builds a call to CreateWindowEx.
Definition: WindowHandleCreator.h:7
A Window with its own window procedure.
Definition: WindowWithMessages.h:9
A Window with its own window procedure and window class.
Definition: CustomWindow.h:12