46 class CEditPlus :
public CWindowImpl<CEditPlus, CEdit>
52 DECLARE_WND_SUPERCLASS(_T(
"CEditPlus"), CEdit::GetWndClassName())
85 COLORREF m_FocusedBackColor;
86 COLORREF m_FocusedTextColor;
88 HBRUSH m_FocusedBackBrush;
90 bool m_bFloatingPointMode;
93 void UpdateBackBrushes();
97 void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
98 BOOL OnEraseBkgnd(CDCHandle dc);
99 LRESULT OnCtlColor(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
104 MSG_WM_ERASEBKGND(OnEraseBkgnd)
105 MESSAGE_HANDLER(OCM_CTLCOLORSTATIC, OnCtlColor)
106 MESSAGE_HANDLER(OCM_CTLCOLOREDIT, OnCtlColor)
107 DEFAULT_REFLECTION_HANDLER()
void EnableFloatingPointMode(bool enabled)
Change the Floating Point Mode state.
COLORREF GetFocusedBackColor() const
Default: COLOR_WINDOW.
void UnSubclassEdit()
Un-subclass the window and release GDI resources.
void SetFocusedTextColor(COLORREF value)
Select a new text color used when the control has focus.
void SetTextColor(COLORREF value)
Select a new text color used when the control does not have focus.
bool IsNotifyOnCREnabled() const
Default: true.
void SetFocusedBackColor(COLORREF value)
Select a new background color used when the control has focus.
void EnableNotifyOnCR(bool value)
Change the 'Notify on CR' state.
COLORREF GetBackColor() const
Default: COLOR_WINDOW.
COLORREF GetTextColor() const
Default: COLOR_WINDOWTEXT.
void SetBackColor(COLORREF value)
Select a new background color used when the control does not have focus.
void SubclassEdit(HWND hWnd)
Subclass an edit control and create GDI objects.
A CEdit descendant, providing custom focused and non-focused colors via WM_CTLCOLOR variants...
bool IsFloatingPointModeEnabled() const
Default: false.
COLORREF GetFocusedTextColor() const
Default: CLR_RED.