MCPcopy Create free account
hub / github.com/EasyIME/PIME / runGuiThread

Method runGuiThread

PIMELauncher/PipeServer.cpp:488–507  ·  view source on GitHub ↗

Main Windows UI message loop

Source from the content-addressed store, hash-verified

486
487// Main Windows UI message loop
488void PipeServer::runGuiThread() {
489 // this method is called from an worker thread other than the main thread
490 // For libuv, it's only safe to use uv_aysnc_*() from within this thread.
491
492 WNDCLASSEX wndClass;
493 auto wndClassAtom = registerWndClass(wndClass);
494 hwnd_ = ::CreateWindowEx(0, LPCTSTR(wndClassAtom), NULL, 0, 0, 0, 0, 0, HWND_DESKTOP, NULL, wndClass.hInstance, this);
495
496 createShellNotifyIcon();
497
498 MSG msg;
499 while (::GetMessage(&msg, NULL, 0, 0)) {
500 ::TranslateMessage(&msg);
501 ::DispatchMessage(&msg);
502 }
503
504 destroyShellNotifyIcon();
505
506 ::ExitProcess(0);
507}
508
509
510} // namespace PIME

Callers 1

execMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected