Hi friends
Good day. Please am writing an application, though things are going good. But am stucked in the area where l need to copy the text of what the user selected from a combo box and use that text to initialize the text field of the TC_ITEM struct to show on the tab control. l had tried many tactics. Code snippet below:
tie.mask = TCIF_TEXT;
subjecthwnd=GetDlgItem(hwnd,IDC_UNICALPTUME_SUBJECT1);//I used GetDlgItem to get the handle of the combobox, from whih the text is to be copied from.
GetWindowText(subjecthwnd,subject1tab,100);//Copy the text of what the user selected from the combobox
tie.pszText=subject1tab;
SendMessage(SubjectTabs,TCM_INSERTITEM,(WPARAM)0,(LPARAM)&tie);//add a tab
So please can someone help me on how to get the text string of selection from a combobox and use it to initialize a tab.
Thanks in advance.