📄 cpercentdone.h
字号:
/*____________________________________________________________________________
Copyright (C) 2002 PGP Corporation
All rights reserved.
$Id: CPercentDone.h,v 1.2 2002/08/06 20:09:24 dallen Exp $
____________________________________________________________________________*/
#ifndef Included_CPercentDone_h // [
#define Included_CPercentDone_h
#include "CString.h"
#include "CComboBox.h"
_PGP_BEGIN
// Class CPercentDone
class CPercentDone : public CComboBox
{
public:
CPercentDone() : mPercent(0) { }
~CPercentDone() { }
void Set(PGPUInt32 percent);
void SetWTimeout(PGPUInt32 percent, PGPUInt32 ms);
void Reset();
private:
PGPUInt32 mPercent;
CString mPercentString;
};
// Class CPercentDone member functions
inline
void
CPercentDone::Set(PGPUInt32 percent)
{
mPercentString.Format("%d%%", percent);
SetWindowText(mPercentString);
}
inline
void
CPercentDone::SetWTimeout(PGPUInt32 percent, PGPUInt32 ms)
{
mPercentString.Format("%d%%", percent);
DWORD result;
SendMessageTimeout(WM_SETTEXT, 0, reinterpret_cast<LPARAM>(
mPercentString.Get()), SMTO_ABORTIFHUNG, ms, result);
}
inline
void
CPercentDone::Reset()
{
mPercent = 0;
Set(0);
}
_PGP_END
#endif // ] Included_CPercentDone_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -