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

Method init

TranslucentTB/windows/messagewindow.cpp:7–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "../../ProgramLog/error/std.hpp"
6
7void MessageWindow::init(Util::null_terminated_wstring_view windowName, DWORD style, DWORD extended_style, Window parent)
8{
9 m_WindowHandle = Window::Create(extended_style, *m_WindowClass, windowName, style, 0, 0, 0, 0, parent);
10 if (!m_WindowHandle)
11 {
12 LastErrorHandle(spdlog::level::critical, L"Failed to create message window!");
13 }
14
15 const auto proc = m_ProcPage.make_thunk<WNDPROC>(this, &MessageWindow::MessageHandler);
16 m_ProcPage.mark_executable();
17
18 set_long_ptr<spdlog::level::critical>(GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(proc));
19}
20
21MessageWindow::MessageWindow(WindowClass &classRef, Util::null_terminated_wstring_view windowName, DWORD style, DWORD extended_style, Window parent, const wchar_t *iconResource) :
22 m_WindowClass(&classRef, false),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected