Please guide me on how to get textBox values from subTabControl into maintabControl.

Alice86's Avatar
Newbie Member
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 .

Last edited by SaswatPadhi; 27Oct2009 at 20:30.. Reason: Code-Blocks
SaswatPadhi's Avatar, Join Date: May 2009
~ Б0ЯИ Τ0 С0δЭ ~
I think, both GetDlgItemText and SetDlgItemText require 4 args ... :?

Refer :
(1) GetDlgItemText :
(2) SetDlgItemText :

Last edited by SaswatPadhi; 29Oct2009 at 05:48.. Reason: typo
Alice86's Avatar
Newbie Member
hi, thanks for your replay..
i will look through on it..

regards :