📄 tooltipwnd.h
字号:
#if !defined(AFX_TOOLTIPWND_H__02DB22C1_5B4F_11D9_82B8_82C159E57678__INCLUDED_)
#define AFX_TOOLTIPWND_H__02DB22C1_5B4F_11D9_82B8_82C159E57678__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ToolTipWnd.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CToolTipWnd window
struct BTOOLINFO
{
HWND hwndTool; //Active Tool Tip CWnd(HWND)
CString strToolText; //Show Text
COLORREF clrToolTextClr; //Text Color
};
class CToolTipWnd : public CWnd
{
// Construction
public:
CToolTipWnd();
// Attributes
public:
HWND m_pCurrwnd; //Current Wnd HWND
protected:
LPCTSTR m_lpWndCls; //AfxRegistryClass Name
CRgn m_rgn; //CRgn 1
CRgn m_rgnTri; //CRgn 2
CRgn m_rgnComb; //CRgn Comb
CRect m_RectText; //Rect of Text
CFont m_FontText; //Font of Text
CString m_strText; //Show Text
bool m_bMouseIn; //Mouse if In Active CWnd
COLORREF m_clrTextColor; //Text Color
COLORREF m_clrBkColor; //Background Color
COLORREF m_clrFrameColor; //Frame Color
CMapPtrToPtr m_ToolPtr; //Active CWnd and BTOOLINFO MAP
int m_iWidth; //CWnd Width
int m_iHeight; //CWnd Height
int m_iFontHeight; //Font Height
int m_iFontWidth;
CString m_strFontName; //Font Name
HWND m_hParentWnd; //Parent CWnd HWND
int m_iNumText; //Number of Text
int m_iNumTextComp;
CString m_strExtentText; //use ExtentText Max Width
CRect m_ParentRect;
BOOL m_bIsPaint;
//BOOL m_bIsPaintHeight;
// Operations
public:
void SetWidth(int iWidth);
void SetHeight(int iHeight);
void SetBkColor(COLORREF clrRef);
void SetDefTextColor(COLORREF clrRef);
void SetFrameColor(COLORREF clrRef);
void SetFontHeight(int iHeight);
void SetFontName(CString strFontName);
BOOL Create(CWnd *pParentWnd);
void AddTool(CWnd *pWnd,CString strText,COLORREF clrTextColor);
void RelayEvent(LPMSG lpMsg);
void UpdateText(int iNumText,CString strExtentText,CString strText,CWnd *pWnd,COLORREF clrTextColor=NULL); //use add multip text calue rect
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CToolTipWnd)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CToolTipWnd();
// Generated message map functions
protected:
//{{AFX_MSG(CToolTipWnd)
afx_msg void OnPaint();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TOOLTIPWND_H__02DB22C1_5B4F_11D9_82B8_82C159E57678__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -