Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How I can handle avoid displaying of message boxes when wrong numeric format is introduced to a CNiNumEdit edit box?

When a text in wrong numeric format like "dddffd" is introduced to a CNiNumEdit edit box, a message box is displayed, containing the warning message "Type mismatch". I would like to avoid this message box, and set back the old content of the edit box if there was introduced a string in wrong numeric format.
0 Kudos
Message 1 of 2
(3,058 Views)
You can handle the Error event and set the CancelDisplay parameter of the event to true to specify that you want to cancel the "Type Mismatch" dialog, then you can handle the error however you like. If you just set the parameter to true and do nothing else, the default behavior is to set the value back to its previous value.

- Elton
0 Kudos
Message 2 of 2
(3,058 Views)