SRGraphTip Class
class SRGraphTip
A simple tooltip-style window designed to show data for the SRGraphFeedback systemDefined in: grphtip.h
Remarks
This simple window draws a ToolTip-like box with text on the main window. It is not clipped by its parent and remains in place for 5 seconds unless it is turned off or the mouse cursor passes over it.Class Members
virtual void SetTipTime(int v)
Initializes the tip timer
virtual int GetTipTime()
retrieves the tip timer value
virtual BOOL IsShowing()
Returns TRUE if the Graph Tip is currently visible
virtual void ShowTip(LPCTSTR strText,CPoint point,CWnd *pParentWnd)
One-step initialization of the Graph Tip
virtual void ShowTip(CPoint point, CWnd* pParentWnd, LPCTSTR lpszFormat, ...)
Variable argument version of ShowTip
virtual void ShowTip(CPoint point, HWND hParentWnd, LPCTSTR lpszFormat, ...)
Variable argument version of ShowTip
virtual void ShowTip(LPCTSTR strText, CPoint point, HWND hParentWnd)
Show tooltips
Constructor
virtual void EraseTip()
Removes the Graph Tip and destroys the window
void SetTextColor(COLORREF color)
Set the text color for the tooltip
void SetBkColor(COLORREF color)
Set the background color for the tooltip
virtual ~SRGraphTip()
Destructor
COLORREF m_TextColor
The tooltip foreground color
int m_nTipTime
The time (in milliseconds) that the tip is to be shown
HBRUSH m_hBkBrush
Handle to the background brush
CString m_ClassName
The Afx generated class name
CString m_TextString
The text to display in the Graph Tip
CPoint m_Point
The point at which the graph tip is drawn
BOOL m_bShowing
TRUE when the Graph Tip is visible
afx_msg void OnPaint()
Draws the tip text in the window
afx_msg void OnMouseMove(UINT nFlags, CPoint point)
Destroys the tip window when mouse cursor passes over it
afx_msg void OnTimer(SEC_UINT nIDEvent)
Destroys the tip window when time limit (5 seconds) expires