home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / ttips2 / tooltip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-13  |  1.9 KB  |  80 lines

  1. #ifndef __TOOLTIP_H 
  2. #define __TOOLTIP_H
  3.                       
  4. class CPopupTip;
  5.  
  6. const char SZTIPINI_SECTION[] = "ToolTips";
  7. const char SZTIPINI_FLYBY[] = "FlyBy";
  8. const char SZTIPINI_TIPS[] = "Tips";
  9. const char SZTIPINI_ROUND[] = "BoxStyle";
  10. const char SZTIPINI_WAIT[] = "Wait";
  11. const char SZTIPINI_DISPLAY[] = "Display";
  12. const char SZTIPINI_FONT[] = "SystemFont";
  13.     
  14. #define TTIPS_SQUARESTYLE    0
  15. #define TTIPS_ROUNDSTYLE    1
  16. #define TTIPS_3DSTYLE        2
  17. #define TTIPS_DEFAULT_TIME 500
  18.  
  19. //CToolTipBar
  20. class CToolTipBar : public CToolBar
  21. {
  22.     DECLARE_DYNAMIC(CToolTipBar)
  23. // Construction
  24. public:
  25.     CToolTipBar();
  26.     virtual ~CToolTipBar();
  27.     
  28. private:
  29.     CUIntArray m_pIDXCustom;  // Array of custom controls (e.g., COMBOBOX)
  30.     BOOL DoIdle(LONG lCount); 
  31.     BOOL m_bFlyby;
  32.     BOOL m_bTips;
  33.     UINT m_nWait;
  34.     UINT m_nStyleFlag;
  35.     BOOL m_bToolbarDisplay;
  36.     BOOL m_bSystemFont;
  37.     
  38.     BOOL m_bDirty;      
  39.     DWORD m_dwTicks;
  40.     BOOL m_bIn;
  41.     UINT m_uIdCache;
  42.     CString m_strPopupClassName;   
  43.     CPopupTip *m_pPopup;
  44.     CFont *m_pFont;
  45.     BOOL m_bMousePressed;
  46.     POINT GetBoxPosition(CRect ToolBarRect);
  47.     void SetupFont ();
  48.     void CleanDirty (int ClearCache);
  49.  
  50. public:
  51.     UINT GetTipWait ();
  52.     BOOL GetFlyby ();
  53.     BOOL GetTips ();
  54.     UINT GetTipStyle ();
  55.     BOOL GetTipFont ();
  56.     BOOL GetToolbarDisplay();
  57.     void GetToolbarOptions();
  58.     
  59.     void SetTipWait (UINT bNewWait);
  60.     void SetFlyby (BOOL bNewFlyby);
  61.     void SetTips (BOOL bNewTips);
  62.     void SetTipStyle (UINT bNewStyle);
  63.     void SetTipFont (BOOL bSystemFont);
  64.     void SetToolbarDisplay (BOOL bNewToolBarDisplay);
  65.     void WriteToolbarOptions();
  66.     void AddCustomButton(UINT nIDXControl);
  67.     
  68. protected:
  69.     //{{AFX_MSG(CToolTipBar)
  70.     afx_msg LRESULT OnIdleUpdateCmdUI(WPARAM wParam, LPARAM lParam);     
  71.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  72.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  73.     //}}AFX_MSG
  74.     DECLARE_MESSAGE_MAP()
  75. protected:
  76. };
  77.   
  78. #endif   //__TOOLTIP_H
  79.  
  80.