⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 progressbar.h

📁 C++ class libraries for network-centric, portable applications, integrated perfectly with the C++ St
💻 H
字号:
//// ProgressBar.h//// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ProgressBar.h#1 $//#ifndef ProgressBar_INCLUDED#define ProgressBar_INCLUDED#include "CppUnit/CppUnit.h"#include <afxwin.h>namespace CppUnit {/* A Simple ProgressBar for test execution display */class ProgressBar{public:	ProgressBar(CWnd* baseWindow, CRect& bounds);	void step(bool successful);	void paint(CDC& dc);	int scale(int value);	void reset();	void start(int total);protected:    void paintBackground(CDC& dc);    void paintStatus(CDC& dc);    COLORREF getStatusColor();    void paintStep(int startX, int endX);    CWnd* _baseWindow;    CRect _bounds;    bool _error;    int _total;    int _progress;    int _progressX;};// Construct a ProgressBarinline ProgressBar::ProgressBar(CWnd* baseWindow, CRect& bounds): 	_baseWindow(baseWindow), 	_bounds(bounds), 	_error(false),	_total(0), 	_progress(0), 	_progressX(0){    WINDOWINFO wi;    wi.cbSize = sizeof(WINDOWINFO);    baseWindow->GetWindowInfo(&wi);    _bounds.OffsetRect(-wi.rcClient.left, -wi.rcClient.top);}// Get the current colorinline COLORREF ProgressBar::getStatusColor(){	return _error ? RGB(255, 0, 0) : RGB(0, 255, 0);}} // namespace CppUnit#endif // ProgressBar_INCLUDED

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -