restrict text box
-
Why you dont set Min/Max value for editbox? After set these parameters you will be have this line: DDV_MinMaxInt(pDX, m_Test, 0, 100);
-
Why you dont set Min/Max value for editbox? After set these parameters you will be have this line: DDV_MinMaxInt(pDX, m_Test, 0, 100);
-
rajeshgupta1253 wrote:
how to restrict textbox so that it takes input only between given numbers i.e. 1-100
Spin button control[^] exists for this purpose.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
rajeshgupta1253 wrote:
how to restrict textbox so that it takes input only between given numbers i.e. 1-100
Spin button control[^] exists for this purpose.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
What you want is not what you need. Is there a reason why you would want to use the edit control only?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
how can I do I could not found any funtion or property of edit control to set these value .
Rajesh
check it in DoDataExchange Function
DDX_Control(pDX,IDC_EDIT,m_Test);
u can find something like this(example). just after this put the below written code.
DDV_MinMaxInt(pDX, m_Test, 0, 100);
-
how can I do I could not found any funtion or property of edit control to set these value .
Rajesh
You must be right click on the control and select Add variable and then set Category to Value now you can set Min/Max values.
-
Are you using MFC? Do you want the numbers validated as they are typed, when the edit control loses focus, or when the OK button is clicked?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne