cpercentdone.h
来自「PGP8.0源码 请认真阅读您的文件包然后写出其具体功能」· C头文件 代码 · 共 67 行
H
67 行
/*____________________________________________________________________________
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 + =
减小字号Ctrl + -
显示快捷键?