0

Hello

I have create my program with mfc.
there is text box containing default value 0.
if we remove 0 from edit box, it generates error message, "Enter a Number."

Can anyone tell me how can i remove this default message box from my program?
I am too much frustrated with this. For more help please check attachment also.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Ancient Dragon
0

When you set up the edit control you told it that you wanted it to be a numeric value by checking the numeric property. When you did that MFC will not permit it to be blank -- it must have a number. If you want it to be blank then go back and deselect the numeric property of the control. Of course when you do that then you can type anything you want in the control. You can control that by adding an event handler for that control which is called on every keystroke (I forget the handler's name) and validate it yourself. You may have to subclass the control in order to do that. Here is a very good tutorial

Hint: Since you are using MFC you might want to bookmark codeproject.com because it has the largest repository of MFC code and tutorials you will find anywhere on the net. I found it to be an indespensible source of MFC information.

Edited by Ancient Dragon: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.