-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCEdit9527.h
57 lines (50 loc) · 1.37 KB
/
CEdit9527.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#pragma once
struct IEditHost
{
virtual bool canProcessMsg() = NULL;
};
namespace SOUI
{
class CEdit9527 :public SRichEdit
{
SOUI_CLASS_NAME(CEdit9527, L"et9527")
public:
CEdit9527();
~CEdit9527();
void SetHost(IEditHost* _ieditHost);
void PaintToDC(HDC hdc);
void SetFontSize(int size);
void SetTextColor(COLORREF color);
virtual BOOL IsContainPoint(const POINT &pt, BOOL bClientOnly) const;
protected:
LRESULT OnCreate(LPVOID);
//void OnDestroy();
bool OnKillFocus(EventArgs * e);
bool OnEditNotify(EventArgs * e);
virtual BOOL OnSetCursor(const CPoint &pt);
void OnNcLButtonDown(UINT nHitTest, CPoint point);
void OnNcMouseMove(UINT nHitTest, CPoint point);
void UpdataSize();
void OnNcLButtonUp(UINT nHitTest, CPoint point);
void OnNcPaint(IRenderTarget *pRT);
BOOL OnEraseBkgnd(IRenderTarget * pRT);
void OnMouseHover(WPARAM wParam, CPoint ptPos);
void OnMouseLeave();
SOUI_MSG_MAP_BEGIN()
MSG_WM_CREATE(OnCreate)
MSG_WM_NCMOUSEMOVE(OnNcMouseMove)
MSG_WM_NCLBUTTONDOWN(OnNcLButtonDown)
MSG_WM_NCLBUTTONUP(OnNcLButtonUp)
MSG_WM_NCPAINT_EX(OnNcPaint)
MSG_WM_ERASEBKGND_EX(OnEraseBkgnd)
MSG_WM_MOUSEHOVER(OnMouseHover)
//MSG_WM_MOUSELEAVE(OnMouseLeave)
//MSG_WM_DESTROY(OnDestroy)
SOUI_MSG_MAP_END()
BOOL m_bDraging;
CPoint m_ptClick;
int m_iWid, m_iHei;
bool bChanged;
IEditHost *m_pHost;
};
}