Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

TitleTip.h

00001 
00002 // Titletip.h : header file
00003 //
00004 // MFC Grid Control - cell titletips
00005 //
00006 // Written by Chris Maunder <cmaunder@mail.com>
00007 // Copyright (c) 1998-2001. All Rights Reserved.
00008 //
00009 // This code may be used in compiled form in any way you desire. This
00010 // file may be redistributed unmodified by any means PROVIDING it is 
00011 // not sold for profit without the authors written consent, and 
00012 // providing that this notice and the authors name and all copyright 
00013 // notices remains intact. 
00014 //
00015 // An email letting me know how you are using it would be nice as well. 
00016 //
00017 // This file is provided "as is" with no expressed or implied warranty.
00018 // The author accepts no liability for any damage/loss of business that
00019 // this product may cause.
00020 //
00021 // For use with CGridCtrl v2.10+
00022 //
00024 
00025 #if !defined(AFX_TITLETIP_H__C7165DA1_187F_11D1_992F_895E185F9C72__INCLUDED_)
00026 #define AFX_TITLETIP_H__C7165DA1_187F_11D1_992F_895E185F9C72__INCLUDED_
00027 
00028 #if _MSC_VER >= 1000
00029 #pragma once
00030 #endif // _MSC_VER >= 1000
00031 
00032 #define TITLETIP_CLASSNAME _T("ZTitleTip")
00033 
00035 // CTitleTip window
00036 
00037 class CTitleTip : public CWnd
00038 {
00039 // Construction
00040 public:
00041         CTitleTip();
00042         virtual ~CTitleTip();
00043         virtual BOOL Create( CWnd *pParentWnd);
00044 
00045 // Attributes
00046 public:
00047     void SetParentWnd(CWnd* pParentWnd)  { m_pParentWnd = pParentWnd; }
00048     CWnd* GetParentWnd()                 { return m_pParentWnd;       }
00049 
00050 // Operations
00051 public:
00052         void Show(CRect rectTitle, LPCTSTR lpszTitleText, 
00053               int xoffset = 0, LPRECT lpHoverRect = NULL, 
00054               const LOGFONT* lpLogFont = NULL,
00055               COLORREF crTextClr = CLR_DEFAULT, COLORREF crBackClr = CLR_DEFAULT);
00056     void Hide();
00057 
00058 // Overrides
00059         // ClassWizard generated virtual function overrides
00060         //{{AFX_VIRTUAL(CTitleTip)
00061         public:
00062         virtual BOOL PreTranslateMessage(MSG* pMsg);
00063         virtual BOOL DestroyWindow();
00064         //}}AFX_VIRTUAL
00065 
00066 // Implementation
00067 protected:
00068         CWnd  *m_pParentWnd;
00069         CRect  m_rectTitle;
00070     CRect  m_rectHover;
00071     DWORD  m_dwLastLButtonDown;
00072     DWORD  m_dwDblClickMsecs;
00073     BOOL   m_bCreated;
00074 
00075         // Generated message map functions
00076 protected:
00077         //{{AFX_MSG(CTitleTip)
00078         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00079         //}}AFX_MSG
00080         DECLARE_MESSAGE_MAP()
00081 };
00082 
00084 //{{AFX_INSERT_LOCATION}}
00085 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
00086 
00087 #endif // !defined(AFX_TITLETIP_H__C7165DA1_187F_11D1_992F_895E185F9C72__INCLUDED_)

Generated on Tue Feb 17 02:03:07 2004 for harlem by doxygen 1.3.6