diff options
author | crupest <crupest@outlook.com> | 2019-04-10 19:42:46 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-10 19:42:46 +0800 |
commit | 7351020a582d70a1495249fba87d342c8a1fb634 (patch) | |
tree | e80f225041dc3816b3dce21c7e15aadbb211602e /src/platform_win/window_class.cpp | |
parent | a94a806f69586e08a30fff0cdb3e52b0ce7acfa5 (diff) | |
download | cru-7351020a582d70a1495249fba87d342c8a1fb634.tar.gz cru-7351020a582d70a1495249fba87d342c8a1fb634.tar.bz2 cru-7351020a582d70a1495249fba87d342c8a1fb634.zip |
Refactor.
Diffstat (limited to 'src/platform_win/window_class.cpp')
-rw-r--r-- | src/platform_win/window_class.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/platform_win/window_class.cpp b/src/platform_win/window_class.cpp deleted file mode 100644 index b58f53b2..00000000 --- a/src/platform_win/window_class.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "cru/platform/win/window_class.hpp" - -#include "cru/platform/win/exception.hpp" - -namespace cru::platform::win { -WindowClass::WindowClass(const std::wstring& 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 |