Lets say i have an edit control in my program. When i run the program i can write some text in it. How can i save/convert the text that was written in the control to a CString variable ?(it should be "saved" by clicking on a button)
1) Use ClassWizard to give the edit control a variable name. Menu View --> Class Wizzard, elect the control id then Add Variable. For an edit control that will create a CString object which will be filled when UpdateData(TRUE) is called.
2) Get the CWnd* pointer to the control. GetWindowText() returns CString. In below IDC_EDIT1 is the id number of the edit control and yous might be different. Check resource.h for the correct control id or you can view it in ClassWizzard.
Yes I made an error in my code. MSDN is the official source for help on all win32 api functions. Here's the link for GetWindowText(). You should always check MSDN before using win32 api and MFC functions/classes.
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...