Click here to Skip to main content
15,896,606 members
Articles / Desktop Programming / MFC

Tool tip on window

Rate me:
Please Sign up or sign in to vote.
4.60/5 (11 votes)
16 Oct 20011 min read 104.2K   3.4K   34  
Tooltips for window according to specified rectangular areas of that window
// ToolTipView.h : interface of the CToolTipView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TOOLTIPVIEW_H__34F0B981_38DF_4A6B_948C_DCF242326E7A__INCLUDED_)
#define AFX_TOOLTIPVIEW_H__34F0B981_38DF_4A6B_948C_DCF242326E7A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "WindowTip.h"

class CToolTipView : public CView
{
protected: // create from serialization only
	CToolTipView();
	DECLARE_DYNCREATE(CToolTipView)

// Attributes
public:
	CToolTipDoc* GetDocument();
    CWindowTip m_MyTip;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CToolTipView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CToolTipView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CToolTipView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in ToolTipView.cpp
inline CToolTipDoc* CToolTipView::GetDocument()
   { return (CToolTipDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TOOLTIPVIEW_H__34F0B981_38DF_4A6B_948C_DCF242326E7A__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
I am a Software Professional and Currently working in C-DAC (Centre For Development of Advanced Computing). This is a Scientific Socity under ministry of india of Information Technology.
I have completed My B.C.A. Degree with 77% marks, I am certified by microsofr as Microsoft Certified Professional in Visual Basic 6.0(70-176). Currently working on Visual C++ 6.0 and Using MFC support in my Applicaitons.
For Future Studying 3D graphics desinging like OpenGL and DirectX.

Comments and Discussions