Sowl  1.0
Simple Object Window Library
WindowWithMessages.h
1 #pragma once
2 
3 #include "Window.h"
4 #include <functional>
5 
6 namespace sowl
7 {
9  class WindowWithMessages : public Window
10  {
11  public:
12  virtual ~WindowWithMessages() = default;
13 
14  virtual LRESULT Process(UINT uMsg, WPARAM wParam, LPARAM lParam) = 0;
15 
16  static LRESULT BindAndProcess(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam,
17  UINT bindingMessage,
18  const std::function<WindowWithMessages* (LPARAM)>& extractWindowPointer);
19  };
20 }
static LRESULT BindAndProcess(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT bindingMessage, const std::function< WindowWithMessages *(LPARAM)> &extractWindowPointer)
Handles the binding between a Window-object and a window-handle.
Definition: WindowWithMessages.cpp:13
Encapsulates a window handle.
Definition: Window.h:8
A Window with its own window procedure.
Definition: WindowWithMessages.h:9