char -> string.append problem
-
Hi! I am using the win32 api c++. I have a problem when I try to get some variables from textboxes and comboboxes.
string code; char getvalues; code.append("your values are: "); GetDlgItemText(hwnd, IDC_E1, &getvalues,20); code.append(&getvalues); code.append(" from e1- "); GetDlgItemText(hwnd, IDC_E2, &getvalues,20); code.append(&getvalues); code.append(" from e2- "); .....
Well this code works fine if there are no spaces or special characters between the values in the boxes but when there is a value like "text-decoration" or "text decoration" it gives an error. The error comes when the code.append(&getvalue) is processed. I want to use the code in a javascript generation application. Thank you very much for your answers in advance! Well... I am a beginner ... -
Hi! I am using the win32 api c++. I have a problem when I try to get some variables from textboxes and comboboxes.
string code; char getvalues; code.append("your values are: "); GetDlgItemText(hwnd, IDC_E1, &getvalues,20); code.append(&getvalues); code.append(" from e1- "); GetDlgItemText(hwnd, IDC_E2, &getvalues,20); code.append(&getvalues); code.append(" from e2- "); .....
Well this code works fine if there are no spaces or special characters between the values in the boxes but when there is a value like "text-decoration" or "text decoration" it gives an error. The error comes when the code.append(&getvalue) is processed. I want to use the code in a javascript generation application. Thank you very much for your answers in advance! Well... I am a beginner ... -
Hi! I am using the win32 api c++. I have a problem when I try to get some variables from textboxes and comboboxes.
string code; char getvalues; code.append("your values are: "); GetDlgItemText(hwnd, IDC_E1, &getvalues,20); code.append(&getvalues); code.append(" from e1- "); GetDlgItemText(hwnd, IDC_E2, &getvalues,20); code.append(&getvalues); code.append(" from e2- "); .....
Well this code works fine if there are no spaces or special characters between the values in the boxes but when there is a value like "text-decoration" or "text decoration" it gives an error. The error comes when the code.append(&getvalue) is processed. I want to use the code in a javascript generation application. Thank you very much for your answers in advance! Well... I am a beginner ...get CWnd object of your control GetWindowText(ACString); that's easier. I'm not sure but can you add more then 1 char to something defined as char somename? (better char* somename) maybe thats your mistake? I would go for the first try. CStrings are for once really managable. Good luck. "If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
-
Hi! I am using the win32 api c++. I have a problem when I try to get some variables from textboxes and comboboxes.
string code; char getvalues; code.append("your values are: "); GetDlgItemText(hwnd, IDC_E1, &getvalues,20); code.append(&getvalues); code.append(" from e1- "); GetDlgItemText(hwnd, IDC_E2, &getvalues,20); code.append(&getvalues); code.append(" from e2- "); .....
Well this code works fine if there are no spaces or special characters between the values in the boxes but when there is a value like "text-decoration" or "text decoration" it gives an error. The error comes when the code.append(&getvalue) is processed. I want to use the code in a javascript generation application. Thank you very much for your answers in advance! Well... I am a beginner ...