|
Revision 5, 1.7 kB
(checked in by qbert, 6 years ago)
|
Initial ( and last :( ) commit
|
| Line | |
|---|
| 1 |
#if !defined __EDIT_EX__ |
|---|
| 2 |
#define __EDIT_EX__ |
|---|
| 3 |
|
|---|
| 4 |
#if _MSC_VER > 1000 |
|---|
| 5 |
#pragma once |
|---|
| 6 |
#endif // _MSC_VER > 1000 |
|---|
| 7 |
// EditEx.h : header file |
|---|
| 8 |
// |
|---|
| 9 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 10 |
/* |
|---|
| 11 |
[Description] |
|---|
| 12 |
This class provide a appearance the same as the "Master of Windows optimization".That is |
|---|
| 13 |
when the mouse move over the edit control,the background turns to White!When the |
|---|
| 14 |
mouse move out of the edit control,the background turns to the origion color! |
|---|
| 15 |
[History] |
|---|
| 16 |
2002/3/3 Coded by David! |
|---|
| 17 |
[Flaws] |
|---|
| 18 |
Something about the scroll bar isn't good! |
|---|
| 19 |
Feel free to use it! |
|---|
| 20 |
*///////////////////////////////////////////////////////////////////////////// |
|---|
| 21 |
// CEditEx window |
|---|
| 22 |
class CEditEx : public CEdit |
|---|
| 23 |
{ |
|---|
| 24 |
// Construction |
|---|
| 25 |
public: |
|---|
| 26 |
CEditEx(); |
|---|
| 27 |
// Attributes |
|---|
| 28 |
private: |
|---|
| 29 |
BOOL m_bIsFocused; |
|---|
| 30 |
BOOL m_bMouseOver; |
|---|
| 31 |
|
|---|
| 32 |
CBrush brHot; |
|---|
| 33 |
CBrush br; |
|---|
| 34 |
public: |
|---|
| 35 |
|
|---|
| 36 |
// Operations |
|---|
| 37 |
public: |
|---|
| 38 |
|
|---|
| 39 |
// Overrides |
|---|
| 40 |
// ClassWizard generated virtual function overrides |
|---|
| 41 |
//{{AFX_VIRTUAL(CEditEx) |
|---|
| 42 |
//}}AFX_VIRTUAL |
|---|
| 43 |
|
|---|
| 44 |
// Implementation |
|---|
| 45 |
public: |
|---|
| 46 |
virtual ~CEditEx(); |
|---|
| 47 |
|
|---|
| 48 |
// Generated message map functions |
|---|
| 49 |
protected: |
|---|
| 50 |
//{{AFX_MSG(CEditEx) |
|---|
| 51 |
afx_msg void OnSetFocus(CWnd* pOldWnd); |
|---|
| 52 |
afx_msg void OnMouseMove(UINT nFlags, CPoint point); |
|---|
| 53 |
afx_msg void OnKillFocus(CWnd* pNewWnd); |
|---|
| 54 |
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor); |
|---|
| 55 |
afx_msg void OnVscroll(); |
|---|
| 56 |
afx_msg void OnPaint(); |
|---|
| 57 |
//}}AFX_MSG |
|---|
| 58 |
DECLARE_MESSAGE_MAP() |
|---|
| 59 |
}; |
|---|
| 60 |
|
|---|
| 61 |
///////////////////////////////////////////////////////////////////////////// |
|---|
| 62 |
|
|---|
| 63 |
//{{AFX_INSERT_LOCATION}} |
|---|
| 64 |
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|---|
| 65 |
|
|---|
| 66 |
#endif // !defined(AFX_EDITEX_H__5DDBDABE_2E27_11D6_B925_0000E8B03E24__INCLUDED_) |
|---|