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

Method ThreadProc

TranslucentTB/uwp/xamlthread.cpp:8–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "../../ProgramLog/error/win32.hpp"
7
8DWORD WINAPI XamlThread::ThreadProc(LPVOID param)
9{
10 const auto that = static_cast<XamlThread *>(param);
11 that->ThreadInit();
12 that->m_Ready.SetEvent();
13
14 BOOL ret;
15 MSG msg;
16 while ((ret = GetMessage(&msg, Window::NullWindow, 0, 0)) != 0)
17 {
18 if (ret != -1)
19 {
20 if (!that->PreTranslateMessage(msg))
21 {
22 TranslateMessage(&msg);
23 DispatchMessage(&msg);
24 }
25 }
26 else
27 {
28 LastErrorHandle(spdlog::level::critical, L"Failed to get message");
29 }
30 }
31
32 delete that;
33 winrt::uninit_apartment();
34 return static_cast<DWORD>(msg.wParam);
35}
36
37void XamlThread::DeletedCallback(void *data)
38{

Callers

nothing calls this directly

Calls 2

ThreadInitMethod · 0.80
PreTranslateMessageMethod · 0.45

Tested by

no test coverage detected