Rev | Line | |
---|
[2] | 1 | #ifndef __PROGRESSDLG_H |
---|
| 2 | #define __PROGRESSDLG_H |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | typedef void (*progressThreadFn)( void *data ); |
---|
| 6 | typedef void (*progressBrkFn)( void *data ); |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | class ProgressDlg |
---|
| 10 | { |
---|
| 11 | public: |
---|
| 12 | ProgressDlg( HWND hWndFrame ); |
---|
| 13 | virtual ~ProgressDlg(); |
---|
| 14 | |
---|
| 15 | void show( progressThreadFn _threadFn, void *_threadData ); |
---|
| 16 | void hide(); |
---|
| 17 | |
---|
| 18 | void setBreakFunc( progressBrkFn _fn, void *_data ); |
---|
| 19 | void setText( const char *_text ); |
---|
| 20 | |
---|
| 21 | private: |
---|
| 22 | |
---|
| 23 | void drawShape( HPS hps, PRECTL r ); |
---|
| 24 | void wmPaintBar( HWND hwnd ); |
---|
| 25 | |
---|
| 26 | static MRESULT EXPENTRY progressDlgProc( HWND hwnd, ULONG msg, |
---|
| 27 | MPARAM mp1, MPARAM mp2 ); |
---|
| 28 | static MRESULT EXPENTRY progressBarProc( HWND hwnd, ULONG msg, |
---|
| 29 | MPARAM mp1, MPARAM mp2 ); |
---|
| 30 | |
---|
| 31 | HWND hFrame; |
---|
| 32 | HWND hDialog; |
---|
| 33 | char *text; |
---|
| 34 | progressThreadFn threadFn; |
---|
| 35 | void *threadData; |
---|
| 36 | progressBrkFn fn; |
---|
| 37 | void *data; |
---|
| 38 | PFNWP pOldBarProc; |
---|
| 39 | HPS hpsBuffer; |
---|
| 40 | HDC hdcBuffer; |
---|
| 41 | LONG startPos; |
---|
| 42 | }; |
---|
| 43 | |
---|
| 44 | #endif // __PROGRESSDLG_H |
---|
Note: See
TracBrowser
for help on using the repository browser.