home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dho.zip / DHO / SRC / SOURCE.ZIP / prgress.h < prev    next >
C/C++ Source or Header  |  1995-08-27  |  1KB  |  46 lines

  1. /****************************************/
  2. /*    Developer Helper Object Set       */
  3. /*  (C) 1994-95 Thomas E. Bednarz, Jr.  */
  4. /*     All rights reserved              */
  5. /***************************************/
  6.  
  7. /* $Id: prgress.h 1.4 1995/08/26 22:51:59 teb Exp $ */
  8.  
  9.  
  10. #ifndef __PRGRESS_H__
  11. #define __PRGRESS_H__
  12.  
  13. #define INCL_WIN
  14. #define INCL_GPI
  15. #include<os2.h>
  16.  
  17. #include<window.h>
  18.  
  19. /*****************************************************************
  20.  *   this class implements a simple progress meter window        *
  21.  *   control.                                                    *
  22.  *****************************************************************/
  23.  
  24. class TProgressBar : public TWindow
  25. {
  26.    char progStr[50];
  27.    ULONG perDone; 
  28.    ULONG x, y, cx, cy;
  29.    ULONG bg, fg, brdr;
  30.    public:
  31.       TProgressBar(ULONG id, TWinBase *parent, ULONG x, ULONG y,
  32.                    ULONG cx, ULONG cy);
  33.       virtual ~TProgressBar();
  34.       virtual BOOL init();
  35.       virtual void paintWindow(HPS ps, RECTL rcl);
  36.   
  37.       void setPercentDone(LONG percent);     
  38.       ULONG getPercentDone();
  39.  
  40.       void setBackground(ULONG clr_index);
  41.       void setForeground(ULONG clr_index);
  42.       void setBorder(ULONG clr_index);
  43. };
  44.  
  45. #endif
  46.