Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Please guide me on how to get textBox values from subTabControl into maintabControl. (http://www.go4expert.com/forums/guide-textbox-values-subtabcontrol-t19902/)

Alice86 27Oct2009 13:41

Please guide me on how to get textBox values from subTabControl into maintabControl.
 
Hi all,
I want to get textBox values from subTabControl into maintabControl. Follwing is my code that i written in mainTabControl:
IDC_EDITMCNO_SUB is textbox in subTabControl and MacNo_Sub is variable for IDC_EDITMCNO_SUB, i trying to get value from IDC_EDITMCNO_SUB and assign the value to textbox in mainTabControl which namely IDC_EDITMCNO_MAIN. McNo_Main is variable for IDC_EDITMCNO_MAIN.
Code: CPP

// Get text box values
CString MacNo_Sub;
GetDlgItemText(IDC_EDITMCNO_SUB ,MacNo_Sub);
CString McNo_Main = MacNo_Sub;
SetDlgItemText(IDC_EDITMCNO_MAIN, McNo_Main);

when compile this program, it succeeded and no return error. but when i run this program, it does't return any value in IDC_EDITMCNO_MAIN.
can anyone help me to get the value from IDC_EDITMCNO_SUB??
Please show me some guide to solve this problem..its very urgent for me..
I very appreciate your help..
Thanks very much .
Regards:
Alice

SaswatPadhi 27Oct2009 20:37

Re: Please guide me on how to get textBox values from subTabControl into maintabContr
 
I think, both GetDlgItemText and SetDlgItemText require 4 args ... :?

Refer :
(1) GetDlgItemText : http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx
(2) SetDlgItemText : http://msdn.microsoft.com/en-us/libr...8VS.85%29.aspx

Alice86 28Oct2009 07:43

Re: Please guide me on how to get textBox values from subTabControl into maintabContr
 
hi, thanks for your replay..
i will look through on it..:pleased:

regards :
alice


All times are GMT +5.5. The time now is 02:35.