void MessageLoop() { request_stop.Clear(); running.Set(); if (!Init()) { running.Clear(); MessageBox(nullptr, L"Window init failed!", L"", MB_ICONERROR); } SetMarquee(true); while (!request_stop.IsSet()) { MSG msg; while (PeekMessage(&msg, window_handle, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); } } running.Clear(); Destroy(); }
BOOL CXTPMarqueeCtrl::OnInitControl() { if (::IsWindow(m_hWnd)) { // initialize the progress bar. SetMarquee(); return TRUE; } return FALSE; }
void ResetProgress() { SendMessage(progressbar_handle, PBM_SETPOS, 0, 0); SetMarquee(true); }