Leaked source code of windows server 2003
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.

29 lines
1.6 KiB

  1. class CErrorBalloon
  2. {
  3. public:
  4. CErrorBalloon();
  5. ~CErrorBalloon();
  6. void ShowToolTip(HINSTANCE hInstance, HWND hwndTarget, LPTSTR pszMessage, LPTSTR pszTitle, DWORD dwIconIndex, DWORD dwFlags, int iTimeout);
  7. void ShowToolTip(HINSTANCE hInstance, HWND hwndTarget, const POINT *ppt, LPTSTR pszMessage, LPTSTR pszTitle, DWORD dwIconIndex, DWORD dwFlags, int iTimeout);
  8. void HideToolTip();
  9. void CreateToolTipWindow();
  10. static LRESULT CALLBACK SubclassProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uID, ULONG_PTR dwRefData);
  11. protected:
  12. HINSTANCE hinst;
  13. HICON hIcon; // handle to an icon, or I_ICONCALLBACK if the notify window should be asked to provide an icon.
  14. HWND hwndNotify; // handle to a window to process notify messages
  15. INT cxTipWidth; // max width of the tooltip in pixels. Defaults to 500.
  16. HWND m_hwndTarget; // the targeted control hwnd
  17. HWND m_hwndToolTip; // the tooltip control
  18. UINT_PTR m_uTimerID; // the timer id
  19. DWORD m_dwIconIndex; // icon index for the balloon
  20. };
  21. #define ERRORBALLOONTIMERID 1000
  22. #define EB_WARNINGBELOW 0x00000000 // default value. Balloon tooltips will be shown below the window by default.
  23. #define EB_WARNINGABOVE 0x00000004 // Ballon tooltips will be shown above the window by default.
  24. #define EB_WARNINGCENTERED 0x00000008 // Ballon tooltips will be shown pointing to the center of the window.
  25. #define EB_MARKUP 0x00000010 // Interpret <A> as markup