1 /* 2 * PROJECT: ReactOS system libraries 3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) 4 * PURPOSE: Classes for displaying progress dialog. 5 * COPYRIGHT: Copyright 2021 He Yang <1160386205@qq.com> 6 */ 7 8 #pragma once 9 10 #include <atlbase.h> 11 #include <atlwin.h> 12 13 #include "resource.h" 14 #include "registry.h" 15 16 // When wParam < item count ==> wParam is item index (0 based) 17 // wParam = item count ==> all finished, lParam = bSuccess 18 #define WM_SETINDEX (WM_USER + 1) 19 20 class ProgressDlg : public CDialogImpl<ProgressDlg> 21 { 22 private: 23 INT_PTR m_DialogID; 24 HWND m_hListBox; 25 HFONT m_hBoldFont; 26 HBITMAP m_hArrowBmp; 27 BITMAP m_ArrowBmp; 28 INT m_PointedItem; 29 30 public: 31 enum { IDD = IDD_DIALOG }; 32 33 RunOnceExInstance &m_RunOnceExInst; 34 35 ProgressDlg(_In_ RunOnceExInstance &RunOnceExInst); 36 37 BOOL RunDialogBox(); 38 39 void CalcTextRect(_In_ LPCWSTR lpText, _Inout_ RECT *pRect); 40 41 void ResizeListBoxAndDialog(_In_ int NewHeight); 42 43 BOOL ProcessWindowMessage(_In_ HWND hwnd, _In_ UINT message, _In_ WPARAM wParam, 44 _In_ LPARAM lParam, _Out_ LRESULT& lResult, 45 _In_ DWORD dwMsgMapID); 46 }; 47