这是一本学习 window编程的很好的参考教材
源代码在线查看: xaviplay.h
#include
#include
class CSHProgressWnd
{
public:
CSHProgressWnd();
~CSHProgressWnd();
void SetTitle ( LPCTSTR szTitle );
void SetAnimation ( UINT uRsrcID );
void SetAnimation ( HINSTANCE hinst, UINT uRsrcID );
void SetCancelMessage ( LPCTSTR szMessage );
void SetLineText ( DWORD dwLine, LPCTSTR szText, bool bCompactPath = false );
void SetCalculateTime ( bool bCalculate = true );
void SetAllowMinimize ( bool bAllow = true );
void SetShowProgressBar ( bool bShow = true );
void ResetTimer();
HRESULT ShowModal ( HWND hWndParent );
HRESULT ShowModeless (HWND hWndParent );
void EndDialog();
void UpdateProgress ( DWORD dwProgress, DWORD dwMax );
void UpdateProgress ( DWORD dwProgress );
void UpdateProgress ( ULONGLONG u64Progress, ULONGLONG u64ProgressMax );
void UpdateProgress ( ULONGLONG u64Progress );
bool HasUserCanceled();
bool IsValid() const { return m_bValid; }
protected:
IProgressDialog* m_pIDlg;
bool m_bValid;
bool m_bDlgVisible;
DWORD m_dwDlgFlags;
DWORD m_dwLastMaxProgress;
ULONGLONG m_u64LastMaxProgress;
};