aboutsummaryrefslogtreecommitdiff
path: root/src/ui/window_class.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-31 17:14:47 +0800
committercrupest <crupest@outlook.com>2019-03-31 17:14:47 +0800
commitfbfd90255731954fb80483f4ba7188d3611fafec (patch)
tree8e3283c911d7aec76130d6a1dc7f5d8a85512b59 /src/ui/window_class.cpp
parent877f65e2e2c40eecc7cfeb194dc9d391af60711b (diff)
downloadcru-fbfd90255731954fb80483f4ba7188d3611fafec.tar.gz
cru-fbfd90255731954fb80483f4ba7188d3611fafec.tar.bz2
cru-fbfd90255731954fb80483f4ba7188d3611fafec.zip
...
Diffstat (limited to 'src/ui/window_class.cpp')
-rw-r--r--src/ui/window_class.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/ui/window_class.cpp b/src/ui/window_class.cpp
deleted file mode 100644
index 5e8b3454..00000000
--- a/src/ui/window_class.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include "window_class.hpp"
-
-#include "exception.hpp"
-
-namespace cru::ui {
-WindowClass::WindowClass(const String& name, WNDPROC window_proc,
- HINSTANCE h_instance)
- : name_(name) {
- WNDCLASSEX window_class;
- window_class.cbSize = sizeof(WNDCLASSEX);
-
- window_class.style = CS_HREDRAW | CS_VREDRAW;
- window_class.lpfnWndProc = window_proc;
- window_class.cbClsExtra = 0;
- window_class.cbWndExtra = 0;
- window_class.hInstance = h_instance;
- window_class.hIcon = LoadIcon(NULL, IDI_APPLICATION);
- window_class.hCursor = LoadCursor(NULL, IDC_ARROW);
- window_class.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
- window_class.lpszMenuName = NULL;
- window_class.lpszClassName = name.c_str();
- window_class.hIconSm = NULL;
-
- atom_ = ::RegisterClassExW(&window_class);
- if (atom_ == 0)
- throw Win32Error(::GetLastError(), "Failed to create window class.");
-}
-} // namespace cru::ui