Related to edit boxes
-
Hi, I am working with edit boxes.I have declared a member variable for it with data type as "CString" .Is there any event which rises at the time when the edit box looses the focuses(for eg stating that the range is not between 100 and -100) or alternatively I need some means to set the range for that edit box for which I have declared a variable of type "CString" . I will enter only numbers and not character type data.I will convert the entered data into integers later on.For the entered data I need to find whether it is in the range or not. Thanks in advance Taruni
-
Hi, I am working with edit boxes.I have declared a member variable for it with data type as "CString" .Is there any event which rises at the time when the edit box looses the focuses(for eg stating that the range is not between 100 and -100) or alternatively I need some means to set the range for that edit box for which I have declared a variable of type "CString" . I will enter only numbers and not character type data.I will convert the entered data into integers later on.For the entered data I need to find whether it is in the range or not. Thanks in advance Taruni
SubClass your Edit control. This may help http://www.codeproject.com/dialog/MessageHandling4.asp[^] Regards Abhishake Lahare
-
Hi, I am working with edit boxes.I have declared a member variable for it with data type as "CString" .Is there any event which rises at the time when the edit box looses the focuses(for eg stating that the range is not between 100 and -100) or alternatively I need some means to set the range for that edit box for which I have declared a variable of type "CString" . I will enter only numbers and not character type data.I will convert the entered data into integers later on.For the entered data I need to find whether it is in the range or not. Thanks in advance Taruni
You can set Min value and Max value for your control(editbox)_**
**_
whitesky
-
Hi, I am working with edit boxes.I have declared a member variable for it with data type as "CString" .Is there any event which rises at the time when the edit box looses the focuses(for eg stating that the range is not between 100 and -100) or alternatively I need some means to set the range for that edit box for which I have declared a variable of type "CString" . I will enter only numbers and not character type data.I will convert the entered data into integers later on.For the entered data I need to find whether it is in the range or not. Thanks in advance Taruni
-
You can set Min value and Max value for your control(editbox)_**
**_
whitesky
-
Hi, I am working with edit boxes.I have declared a member variable for it with data type as "CString" .Is there any event which rises at the time when the edit box looses the focuses(for eg stating that the range is not between 100 and -100) or alternatively I need some means to set the range for that edit box for which I have declared a variable of type "CString" . I will enter only numbers and not character type data.I will convert the entered data into integers later on.For the entered data I need to find whether it is in the range or not. Thanks in advance Taruni
-
Hi, I am working with edit boxes.I have declared a member variable for it with data type as "CString" .Is there any event which rises at the time when the edit box looses the focuses(for eg stating that the range is not between 100 and -100) or alternatively I need some means to set the range for that edit box for which I have declared a variable of type "CString" . I will enter only numbers and not character type data.I will convert the entered data into integers later on.For the entered data I need to find whether it is in the range or not. Thanks in advance Taruni
The EN_CHANGE notification message is sent when the user has taken an action that may have altered text in an edit control. Then you override the EN_CHANGE Event and write this code // where m_editbox is a variable associated to the edit window
char *myValue=new char[m_editbox.GetWindowTextLength ()]; m_editbox.GetWindowText(myValue,strlen(myValue)); int i=0; i=atoi(myValue); if(i>=100 || i<=-100) { AfxMessageBox("Invalid value:"); }
I hope that I understood your query correctly Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Hi, I am working with edit boxes.I have declared a member variable for it with data type as "CString" .Is there any event which rises at the time when the edit box looses the focuses(for eg stating that the range is not between 100 and -100) or alternatively I need some means to set the range for that edit box for which I have declared a variable of type "CString" . I will enter only numbers and not character type data.I will convert the entered data into integers later on.For the entered data I need to find whether it is in the range or not. Thanks in advance Taruni
Taruni wrote:
I have declared a member variable for it with data type as "CString"
You should be using
CEdit
instead. Otherwise, you'll be (incorrectly) usingUpdateData()
. See here for how/why that method can be avoided.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb