Bit Edit Control
-
Hello! Anybody knows how to make EditBox to accept only bitwise strings (0 and 1), something like ES_NUMBER that allows only digits to be entered into the Edit Control. SzyKam.
I don't know such a control but you can do one yourself quite easily: create a new class (CBitwisEdit for example) that inherits from the CEditCtrl. Override the OnChar function. Inside this function, check if the char entered is either '0' or '1'. If this is the case, call CEditCtrl::OnChar, otherwise don't call it.
Cédric Moonen Software developer
Charting control [Updated - v1.1] -
Hello! Anybody knows how to make EditBox to accept only bitwise strings (0 and 1), something like ES_NUMBER that allows only digits to be entered into the Edit Control. SzyKam.
hi, In order to Accept Numeric Values in the EditControl, You have to SubClass the EditControl by Creating a new CEdit Class and specify the Messages. In our Instance WM_CHAR. in the WM_Char Message check for the Only Numeric Variable. Think Clever. Uday kiran