aboutsummaryrefslogtreecommitdiff
path: root/CruUI/application.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-12 23:09:13 +0800
committercrupest <crupest@outlook.com>2018-09-12 23:09:13 +0800
commit5f75c4f4f6736ff8efa87beab715fd9a044f666c (patch)
treea67dd8d9f6af0ff7b93776c1e3bcc2816a2250dd /CruUI/application.h
parente2dab3893a8be43de0e50587c85df9e11abf87fe (diff)
downloadcru-5f75c4f4f6736ff8efa87beab715fd9a044f666c.tar.gz
cru-5f75c4f4f6736ff8efa87beab715fd9a044f666c.tar.bz2
cru-5f75c4f4f6736ff8efa87beab715fd9a044f666c.zip
...
Never use PostMessage with hwnd as null!!!!!!!!!!!!!!!!!!!!!!!!
Diffstat (limited to 'CruUI/application.h')
-rw-r--r--CruUI/application.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/CruUI/application.h b/CruUI/application.h
index be5d21ba..4285cc21 100644
--- a/CruUI/application.h
+++ b/CruUI/application.h
@@ -2,6 +2,7 @@
#include "system_headers.h"
#include <memory>
+#include <optional>
#include "base.h"
@@ -9,6 +10,7 @@ namespace cru
{
namespace ui
{
+ class WindowClass;
class WindowManager;
}
@@ -58,11 +60,21 @@ namespace cru
return h_instance_;
}
+ HWND GetGodWindowHandle() const
+ {
+ return god_hwnd_;
+ }
+
private:
- bool HandleThreadMessage(const MSG& message);
+ static LRESULT __stdcall GodWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
+ std::optional<LRESULT> HandleGodWindowMessage(HWND hwnd, int msg, WPARAM w_param, LPARAM l_param);
private:
HINSTANCE h_instance_;
+
+ std::unique_ptr<ui::WindowClass> god_window_class_;
+ HWND god_hwnd_;
+
std::unique_ptr<ui::WindowManager> window_manager_;
std::unique_ptr<graph::GraphManager> graph_manager_;
std::unique_ptr<TimerManager> timer_manager_;