diff options
author | crupest <crupest@outlook.com> | 2020-10-30 00:07:57 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-10-30 00:07:57 +0800 |
commit | 6aa2201797a9ed64ce0178215ae941d0c5f09579 (patch) | |
tree | 9a74ee8d9f616afbe693ef7825a71474850831b5 /src/win/native/WindowClass.cpp | |
parent | b4cb4fb7552d35c267bdb66913e4c822f16346ab (diff) | |
download | cru-6aa2201797a9ed64ce0178215ae941d0c5f09579.tar.gz cru-6aa2201797a9ed64ce0178215ae941d0c5f09579.tar.bz2 cru-6aa2201797a9ed64ce0178215ae941d0c5f09579.zip |
...
Diffstat (limited to 'src/win/native/WindowClass.cpp')
-rw-r--r-- | src/win/native/WindowClass.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/win/native/WindowClass.cpp b/src/win/native/WindowClass.cpp deleted file mode 100644 index 2e74606e..00000000 --- a/src/win/native/WindowClass.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "cru/win/native/WindowClass.hpp" - -#include "cru/win/native/Exception.hpp" - -namespace cru::platform::native::win { -WindowClass::WindowClass(std::wstring name, WNDPROC window_proc, - HINSTANCE h_instance) - : name_(std::move(name)) { - WNDCLASSEXW window_class; - window_class.cbSize = sizeof(WNDCLASSEXW); - - 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::platform::native::win |