Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.0 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1992 **/
  4. /**********************************************************************/
  5. /*
  6. bltmeter.hxx
  7. Header file for the blt activity meter.
  8. FILE HISTORY:
  9. terryk 10-Jun-91 Created
  10. terryk 11-Jul-91 code review changed. Attend. jonn terryk ericch
  11. */
  12. #define BLUE RGB( 0, 0, 255 )
  13. /**********************************************************\
  14. NAME: METER
  15. WORKBOOK:
  16. SYNOPSIS: This is an activity indicator. It will look like a
  17. rectangle box. In the center of the box, it will
  18. display the number of completed percentage. It will
  19. also fill up part of the box which depending on the
  20. number of completed percentage with the specified color.
  21. INTERFACE:
  22. METER() - constructor
  23. SetComplete() - set the number of completed percentage.
  24. QueryComplete() - query the number of completed percentage.
  25. PARENT: CUSTOM_CONTROL, CONTROL_WINDOW
  26. USES: COLORREF
  27. CAVEATS: If no color is specified in the constructor, it will use
  28. BLUE as the default color.
  29. NOTES:
  30. HISTORY:
  31. terryk 10-Jun-91 Created
  32. \**********************************************************/
  33. DLL_CLASS METER : public CONTROL_WINDOW, public CUSTOM_CONTROL
  34. {
  35. private:
  36. INT _nComplete;
  37. COLORREF _color;
  38. static const TCHAR * _pszClassName;
  39. protected:
  40. BOOL OnPaintReq();
  41. public:
  42. // constructor
  43. METER( OWNER_WINDOW *powin, CID cid, COLORREF color = BLUE );
  44. METER( OWNER_WINDOW *powin, CID cid,
  45. XYPOINT pXY, XYDIMENSION dXY,
  46. ULONG flStyle, COLORREF color = BLUE );
  47. // set the completed percentage
  48. VOID SetComplete( INT nComplete );
  49. // query completed percentage
  50. inline INT QueryComplete()
  51. { return _nComplete; }
  52. };