MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / WindowClass

Method WindowClass

TranslucentTB/windows/windowclass.cpp:31–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31WindowClass::WindowClass(WNDPROC procedure, Util::null_terminated_wstring_view className, const wchar_t *iconResource, HINSTANCE hInstance, unsigned int style, HBRUSH brush, HCURSOR cursor) :
32 m_hInstance(hInstance)
33{
34 LoadIcons(iconResource);
35
36 const WNDCLASSEX classStruct = {
37 .cbSize = sizeof(classStruct),
38 .style = style,
39 .lpfnWndProc = procedure,
40 .hInstance = hInstance,
41 .hIcon = m_hIcon.get(),
42 .hCursor = cursor,
43 .hbrBackground = brush,
44 .lpszClassName = className.c_str(),
45 .hIconSm = m_hIconSmall.get()
46 };
47
48 m_Atom = RegisterClassEx(&classStruct);
49 if (!m_Atom)
50 {
51 LastErrorHandle(spdlog::level::critical, L"Failed to register window class!");
52 }
53}
54
55void WindowClass::ChangeIcon(Window window, const wchar_t *iconResource)
56{

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected