Simple replacement for MFC CEdit class that implements numeric decimal/hex/octal/binary input with clipboard and format conversion support.
- Input numeric value as decimal, hex, octal or binary
- Convert to any other numeric format using UI context menu
- Convert to any other numeric format at runtime using ChangeMode() method
- Full clipboard support
Hex input may optionally be prefixed with "0x" and octal may optionally prefixed with "0". The control does not use PreTranslateMessage(). and can be used in both standard MFC applications and DLL projects that do not have a message loop.
The current input mode is displayed using a "cue" or watermark text.
- Add "CNumericEditControl.h" and "CNumericEditControl.cpp" to your MFC project
- If necessary, add common controls manifest (see "stdafx.h" in example project)
- #include "CNumericEditControl.h"
- Add edit control to your dialog
- Add control variable for the edit control
- Change the control variable type from CEdit to CNumericEditControl
- Use the control as normal
- Use methods AsString() or AsValue() to access value
- If necessary, call ChangeMode() to change the display mode at runtime
This software is available under the "MIT License".
https://github.com/datasynergyuk/CNumericEditControl/blob/master/LICENSE

