MFC: To Get edit control value from other tabControl

Retrieve infomation from other tab in same control

Page 1 of 1

0 Replies - 737 Views - Last Post: 22 October 2009 - 01:51 AM Rate Topic: -----

#1 aliceyeap  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 22-October 09

MFC: To Get edit control value from other tabControl

Post icon  Posted 22 October 2009 - 01:51 AM

Hi, all..

i'm now using Visual c++ in Visual Studio 2005 for my project. i faced problem in getting other tab value in main tab ..Below are details of my problem.
In the main tab control(CTabDialogControl), i have another sub tab namely CTabFourthDialog

inside CTabFourthDialog, have a editControl namely "IDC_EDITMCNO"
DDX_Control(pDX, IDC_EDITMCNO, m_McNo)
>> this is the edit control in CTabFourthDialog.
When i retrieved value from IDC_EDITMCNO within CTabFourthDialog, below statement can work properly:
CString sMachNo;
m_McNo.GetWindowText(sMachNo);


but when i trying to retrieve the value IDC_EDITMCNO from CTabFourthDialo in CTabDialogControl , it return me a error. below shown the code i wrote in CTabDialogControl.
 CString sMachNo;
CTabFourthDialog::m_McNo.GetWindowText(sMachNo)


and i getting this error when compile the program.

Quote

Error1 error C2228: left of '.GetWindowTextA' must have class/struct/union.


Please guide me to solve this problme..
Your help i will very appreciate..
Thanks very much :)

Regards
Alice :)

Is This A Good Question/Topic? 0
  • +

Page 1 of 1