MCPcopy Create free account
hub / github.com/OldJii/ring_layout / GetWindowClass

Method GetWindowClass

example/windows/runner/win32_window.cpp:71–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;
70
71const wchar_t* WindowClassRegistrar::GetWindowClass() {
72 if (!class_registered_) {
73 WNDCLASS window_class{};
74 window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
75 window_class.lpszClassName = kWindowClassName;
76 window_class.style = CS_HREDRAW | CS_VREDRAW;
77 window_class.cbClsExtra = 0;
78 window_class.cbWndExtra = 0;
79 window_class.hInstance = GetModuleHandle(nullptr);
80 window_class.hIcon =
81 LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));
82 window_class.hbrBackground = 0;
83 window_class.lpszMenuName = nullptr;
84 window_class.lpfnWndProc = Win32Window::WndProc;
85 RegisterClass(&window_class);
86 class_registered_ = true;
87 }
88 return kWindowClassName;
89}
90
91void WindowClassRegistrar::UnregisterWindowClass() {
92 UnregisterClass(kWindowClassName, nullptr);

Callers 1

CreateAndShowMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected