retreive data from text box in vc++ 6
-
how to get the input data (text) from text box in mfc dialog based application in v c++ 6
-
how to get the input data (text) from text box in mfc dialog based application in v c++ 6
-
how to get the input data (text) from text box in mfc dialog based application in v c++ 6
-
how to get the input data (text) from text box in mfc dialog based application in v c++ 6
identity_85 wrote:
how to get the input data (text) from text box in mfc dialog based application in v c++ 6
GetDlgItemText
Nibu thomas A Developer Programming tips[^] My site[^]
-
i want it as long not string?????????????
-
i want it as long not string?????????????
Take it as string convert it to long
char * str=new char[100]; GetDlgItemText (IDC_EDIT1,str,100); long l; l=atol (str);
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
i want it as long not string?????????????
Map it to some variable (ex: m_edit) While mapping it select long as its type. In the code use the following lines long val; UpdateData(); val=m_edit
-
Take it as string convert it to long
char * str=new char[100]; GetDlgItemText (IDC_EDIT1,str,100); long l; l=atol (str);
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
_AnShUmAn_ wrote:
GetDlgItemText (IDC_EDIT1,str,100);
Hey this will cause error:~ u need to modify this to
GetDlgItemText (IDC_EDIT1,(LPTSTR)str,100);
:)Dream bigger... Do bigger...Expect smaller aji
see me wrote:
Hey this will cause error
And Why so: LPTSTR-An LPWSTR if UNICODE is defined, an LPSTR otherwise. Did you try using the code that I gave.
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
see me wrote:
Hey this will cause error
And Why so: LPTSTR-An LPWSTR if UNICODE is defined, an LPSTR otherwise. Did you try using the code that I gave.
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
Yes...If unicode is not defined then ur code is ok.:) but wen unicode is defined then it will cause error.:doh: and one more thing you need to mention that, call delete of str at the end.:~
Dream bigger... Do bigger...Expect smaller aji
see me wrote:
GetWindowText (CString& rString) const
Thanks for your comment. But just have a look at your post:sigh:. Shouldn't it be: CString str; m_editBox.GetWindowText(str); No personnel issues but just to.......:-D say that we don't post the code here that is always optimized.
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_