error
-
I have created an array string as CString* message. In my dialog the is a edit box where the user can type text,first problem is when enter is pressed the dialog box closes. What should I need to do to avoid that problem and on pressing enter key cursor should go to new line. The second problem is : On the edit box i have created the control variable. I use variable.GetWindowText() to fetch the text typed in the edit box. when i compile my program The error is displayed like -> 'void __thiscall CWnd::GetWindowTextA(class CString &) const' : cannot convert parameter 1 from 'class CString *' to 'class CString &' How to avoid this problem?
-
I have created an array string as CString* message. In my dialog the is a edit box where the user can type text,first problem is when enter is pressed the dialog box closes. What should I need to do to avoid that problem and on pressing enter key cursor should go to new line. The second problem is : On the edit box i have created the control variable. I use variable.GetWindowText() to fetch the text typed in the edit box. when i compile my program The error is displayed like -> 'void __thiscall CWnd::GetWindowTextA(class CString &) const' : cannot convert parameter 1 from 'class CString *' to 'class CString &' How to avoid this problem?
Why dont use of CString? and you can set Want Return to ture for edit control.
-
I have created an array string as CString* message. In my dialog the is a edit box where the user can type text,first problem is when enter is pressed the dialog box closes. What should I need to do to avoid that problem and on pressing enter key cursor should go to new line. The second problem is : On the edit box i have created the control variable. I use variable.GetWindowText() to fetch the text typed in the edit box. when i compile my program The error is displayed like -> 'void __thiscall CWnd::GetWindowTextA(class CString &) const' : cannot convert parameter 1 from 'class CString *' to 'class CString &' How to avoid this problem?
- See the FAQ[^]. You should also right-click on the control and set the property "Want return" to true (or something like that, don't remember exactly what it was). 2) Why do you pass a pointer to a CSTring object when the function accepts a reference ? The error message is pretty clear. So, just pass the object and get rid of the pointer.
Cédric Moonen Software developer
Charting control [v1.2]