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.

44 lines
1.5 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: Tooltip.h
  3. //
  4. // Copyright (c) 2000, Microsoft Corporation
  5. //
  6. // Class that implements displaying a tooltip balloon.
  7. //
  8. // History: 2000-06-12 vtan created
  9. // --------------------------------------------------------------------------
  10. #ifndef _Tooltip_
  11. #define _Tooltip_
  12. #include <limits.h>
  13. // --------------------------------------------------------------------------
  14. // CTooltip
  15. //
  16. // Purpose: A class that displays a tool tip balloon. It does all the
  17. // creation and positioning work if required. Control the life
  18. // span of the balloon with the object's life span.
  19. //
  20. // History: 2000-06-12 vtan created
  21. // --------------------------------------------------------------------------
  22. class CTooltip
  23. {
  24. private:
  25. CTooltip (void);
  26. public:
  27. CTooltip (HINSTANCE hInstance, HWND hwndParent);
  28. ~CTooltip (void);
  29. void SetPosition (LONG lPosX = LONG_MIN, LONG lPosY = LONG_MIN) const;
  30. void SetCaption (DWORD dwIcon, const TCHAR *pszCaption) const;
  31. void SetText (const TCHAR *pszText) const;
  32. void Show (void) const;
  33. private:
  34. HWND _hwnd;
  35. HWND _hwndParent;
  36. };
  37. #endif /* _Tooltip_ */