📄 msgwnd.h
字号:
/*
事件消息窗口
作者: 蒋钰泳
版权所有:北海银河电力科技
*/
#if !defined(AFX_TOOLTIPWND_H__2C52D3E4_2F5B_11D2_8FC9_000000000000__INCLUDED_)
#define AFX_TOOLTIPWND_H__2C52D3E4_2F5B_11D2_8FC9_000000000000__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
//窗口形状
#define ELLIPSEWND 0
#define RECTWND 1
//DBCLICK ON WIN
#define WM_MSGWINDBCLICK WM_USER+102
class CMsgWnd : public CWnd
{
private:
// Construction
public:
CMsgWnd();
// Attributes
public:
BOOL Create(HWND hwnd);
bool m_bStuck;
BYTE m_Shape;
int m_iWidth;
int m_iHeight;
void SetText(char* msg,COLORREF cr = NULL);
void SetWidth(int iWidth) { m_iWidth = iWidth; }
void SetHeight(int iHeight) { m_iHeight = iHeight; }
void SetBkColor(COLORREF clrRef) { m_clrBkColor = clrRef; }
void SetFrameColor(COLORREF clrRef) { m_clrFrameColor = clrRef; }
void SetDefTextColor(COLORREF clrRef) { m_clrTextColor = clrRef; }
void SetFontHeight(int iHeight) { m_iFontHeight = iHeight; }
void SetFontName(CString strFontName) { m_strFontName = strFontName; }
CRect m_RectText;
private:
CRgn rgn;
CRgn rgnComb;
CRgn rgnTri;
CFont m_fontText;
CString m_strText;
bool m_bMouseIn;
COLORREF m_clrTextColor;
COLORREF m_clrBkColor;
COLORREF m_clrFrameColor;
int m_iFontHeight;
CString m_strFontName;
HWND m_hParentWnd; //注意:其实并非windows中的“父”,logic parent,jyy *_*
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMsgWnd)
public:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMsgWnd();
// Generated message map functions
protected:
//{{AFX_MSG(CMsgWnd)
afx_msg void OnPaint();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TOOLTIPWND_H__2C52D3E4_2F5B_11D2_8FC9_000000000000__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -