home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c05 / lab07 / ex01 / progressstatusbar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.4 KB  |  58 lines

  1. #ifndef __PROGRESSSTATUSBAR_H__
  2. #define __PROGRESSSTATUSBAR_H__
  3.  
  4. // ProgressStatusBar.h : header file
  5. //
  6.  
  7. /////////////////////////////////////////////////////////////////////////////
  8. // CProgressStatusBar window
  9.  
  10. const int PROGRESS_CTRL_CX = 160;
  11. const int X_MARGIN = 5;
  12. const int Y_MARGIN = 2;
  13.  
  14. class CProgressStatusBar : public CStatusBar
  15. {
  16. // Construction
  17. public:
  18.     void ShowProgressDisplay(BOOL bShow = TRUE);
  19.     void SetProgressLabel(LPCSTR lpszProgressLabel);
  20.     void RecalcProgressDisplay();
  21.     void SetProgressCtrlWidth(int nWidth = PROGRESS_CTRL_CX);
  22.     CProgressStatusBar();
  23.  
  24. // Attributes
  25. public:
  26.  
  27. // Operations
  28. public:
  29.  
  30. // Overrides
  31.     // ClassWizard generated virtual function overrides
  32.     //{{AFX_VIRTUAL(CProgressStatusBar)
  33.     //}}AFX_VIRTUAL
  34.  
  35. // Implementation
  36. public:
  37.     virtual ~CProgressStatusBar();
  38.  
  39.     // Generated message map functions
  40. protected:
  41.     int m_nProgressCtrlWidth;
  42.     BOOL m_bProgressMode;
  43.     CStatic m_ProgressLabel;
  44.     CProgressCtrl m_ProgressCtrl;
  45.     //{{AFX_MSG(CProgressStatusBar)
  46.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  47.     afx_msg void OnPaint();
  48.     //}}AFX_MSG
  49.     DECLARE_MESSAGE_MAP()
  50. };
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53.  
  54. //{{AFX_INSERT_LOCATION}}
  55. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  56.  
  57. #endif // __PROGRESSSTATUSBAR_H__
  58.