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.

89 lines
2.6 KiB

  1. //+----------------------------------------------------------------------------
  2. //
  3. // File: tooltip.h
  4. //
  5. // Module: CMDIAL32.DLL
  6. //
  7. // Synopsis: Main header file for tool tips
  8. //
  9. // Copyright (c) 1998-2000 Microsoft Corporation
  10. //
  11. // Author: markcl Created 11/2/00
  12. //
  13. //+----------------------------------------------------------------------------
  14. // NOTE: The following 2 sections will need to be removed if we compile with NT verion > 4.0
  15. // or _WIN32_IE > 4.0.
  16. //
  17. // Copied from commctrl.h
  18. //
  19. #define TTS_BALLOON 0x40
  20. //#define TTI_INFO 1
  21. #define TTM_SETTITLEA (WM_USER + 32) // wParam = TTI_*, lParam = char* szTitle
  22. #define TTM_SETTITLEW (WM_USER + 33) // wParam = TTI_*, lParam = wchar* szTitle
  23. #ifdef UNICODE
  24. #define TTM_SETTITLE TTM_SETTITLEW
  25. #else
  26. #define TTM_SETTITLE TTM_SETTITLEA
  27. #endif
  28. // End of copied commctrl.h
  29. //
  30. // Copied from shlwapi.h
  31. //
  32. typedef struct _DLLVERSIONINFO
  33. {
  34. DWORD cbSize;
  35. DWORD dwMajorVersion; // Major version
  36. DWORD dwMinorVersion; // Minor version
  37. DWORD dwBuildNumber; // Build number
  38. DWORD dwPlatformID; // DLLVER_PLATFORM_*
  39. } DLLVERSIONINFO;
  40. typedef struct _DLLVERSIONINFO2
  41. {
  42. DLLVERSIONINFO info1;
  43. DWORD dwFlags; // No flags currently defined
  44. ULONGLONG ullVersion; // Encoded as:
  45. // Major 0xFFFF 0000 0000 0000
  46. // Minor 0x0000 FFFF 0000 0000
  47. // Build 0x0000 0000 FFFF 0000
  48. // QFE 0x0000 0000 0000 FFFF
  49. } DLLVERSIONINFO2;
  50. typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
  51. // End of copied shlwapi.h
  52. //+---------------------------------------------------------------------------
  53. //
  54. // class CBalloonTip
  55. //
  56. // Description: Balloon Tip window
  57. //
  58. // History: markcl Created 10/31/00
  59. //
  60. //----------------------------------------------------------------------------
  61. class CBalloonTip
  62. {
  63. public:
  64. CBalloonTip();
  65. BOOL DisplayBalloonTip(LPPOINT lppoint, UINT iIcon, LPCTSTR lpszTitle, LPTSTR lpszBalloonMsg, HWND hWndParent);
  66. BOOL HideBalloonTip();
  67. protected:
  68. static LRESULT CALLBACK SubClassBalloonWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  69. static WNDPROC m_pfnOrgBalloonWndProc; // the original edit control window proc for subclassing
  70. HWND m_hwndTT; // handle for the balloon tooltip
  71. BOOL m_bTTActive; // whether the balloon tooltip is active or not
  72. TOOLINFO m_ti; // tooltip structure
  73. };