home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c05 / lab07 / ex02 / progressstatusbar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.4 KB  |  60 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.     CProgressCtrl * GetProgressCtrl() 
  27.                         { return &m_ProgressCtrl; }
  28.  
  29. // Operations
  30. public:
  31.  
  32. // Overrides
  33.     // ClassWizard generated virtual function overrides
  34.     //{{AFX_VIRTUAL(CProgressStatusBar)
  35.     //}}AFX_VIRTUAL
  36.  
  37. // Implementation
  38. public:
  39.     virtual ~CProgressStatusBar();
  40.  
  41.     // Generated message map functions
  42. protected:
  43.     int m_nProgressCtrlWidth;
  44.     BOOL m_bProgressMode;
  45.     CStatic m_ProgressLabel;
  46.     CProgressCtrl m_ProgressCtrl;
  47.     //{{AFX_MSG(CProgressStatusBar)
  48.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  49.     afx_msg void OnPaint();
  50.     //}}AFX_MSG
  51.     DECLARE_MESSAGE_MAP()
  52. };
  53.  
  54. /////////////////////////////////////////////////////////////////////////////
  55.  
  56. //{{AFX_INSERT_LOCATION}}
  57. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  58.  
  59. #endif // __PROGRESSSTATUSBAR_H__
  60.