22 #ifndef WIN7_PROGRESS_BAR_H
23 #define WIN7_PROGRESS_BAR_H
27 #if defined _WIN64 || defined _WIN32
38 #define CMIC_MASK_ASYNCOK SEE_MASK_ASYNCOK
41 typedef enum THUMBBUTTONMASK
49 typedef enum THUMBBUTTONFLAGS
53 THBF_DISMISSONCLICK = 0x2,
54 THBF_NOBACKGROUND = 0x4,
56 THBF_NONINTERACTIVE = 0x10
59 typedef struct THUMBBUTTON
61 THUMBBUTTONMASK dwMask;
66 THUMBBUTTONFLAGS dwFlags;
68 typedef struct THUMBBUTTON *LPTHUMBBUTTON;
73 TBPF_INDETERMINATE = 0x1,
79 typedef IUnknown *HIMAGELIST;
82 DECLARE_INTERFACE_(ITaskbarList3,IUnknown)
85 STDMETHOD(QueryInterface) (THIS_ REFIID riid,
void **ppv) PURE;
86 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
87 STDMETHOD_(ULONG,Release) (THIS) PURE;
90 STDMETHOD(HrInit) (THIS) PURE;
91 STDMETHOD(AddTab) (THIS_ HWND hwnd) PURE;
92 STDMETHOD(DeleteTab) (THIS_ HWND hwnd) PURE;
93 STDMETHOD(ActivateTab) (THIS_ HWND hwnd) PURE;
94 STDMETHOD(SetActiveAlt) (THIS_ HWND hwnd) PURE;
95 STDMETHOD (MarkFullscreenWindow) (THIS_ HWND hwnd,
int fFullscreen) PURE;
98 STDMETHOD (SetProgressValue) (THIS_ HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) PURE;
99 STDMETHOD (SetProgressState) (THIS_ HWND hwnd, TBPFLAG tbpFlags) PURE;
100 STDMETHOD (RegisterTab) (THIS_ HWND hwndTab,HWND hwndMDI) PURE;
101 STDMETHOD (UnregisterTab) (THIS_ HWND hwndTab) PURE;
102 STDMETHOD (SetTabOrder) (THIS_ HWND hwndTab, HWND hwndInsertBefore) PURE;
103 STDMETHOD (SetTabActive) (THIS_ HWND hwndTab, HWND hwndMDI, DWORD dwReserved) PURE;
104 STDMETHOD (ThumbBarAddButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE;
105 STDMETHOD (ThumbBarUpdateButtons) (THIS_ HWND hwnd, UINT cButtons, LPTHUMBBUTTON pButton) PURE;
106 STDMETHOD (ThumbBarSetImageList) (THIS_ HWND hwnd, HIMAGELIST himl) PURE;
109 STDMETHOD (SetThumbnailTooltip) (THIS_ HWND hwnd, LPCWSTR pszTip) PURE;
110 STDMETHOD (SetThumbnailClip) (THIS_ HWND hwnd, RECT *prcClip) PURE;
112 typedef ITaskbarList3 *LPITaskbarList3;
124 enum ToolBarProgressState
134 void setProgressValue(
int value,
int max);
135 void setProgressState(ToolBarProgressState state);
136 void setClientProgress(
int id,
int progress);
137 void removeClient(
int id);
138 void showOverallProgress();
139 bool winEvent(MSG * message,
long * result);
145 UINT mTaskbarMessageId;
146 ITaskbarList3 *mTaskbar;
147 vector<int> clientProgress;
151 #endif//WIN7_PROGRESS_BAR_H