Click here to Skip to main content
15,910,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: What should constructor do? Pin
Jochen Arndt27-Jan-16 4:10
professionalJochen Arndt27-Jan-16 4:10 
AnswerRe: What should constructor do? Pin
jschell27-Jan-16 9:06
jschell27-Jan-16 9:06 
GeneralRe: What should constructor do? Pin
Vaclav_27-Jan-16 16:46
Vaclav_27-Jan-16 16:46 
AnswerRe: What should constructor do? Pin
CPallini27-Jan-16 21:40
mveCPallini27-Jan-16 21:40 
AnswerRe: What should constructor do? Pin
Albert Holguin28-Jan-16 5:26
professionalAlbert Holguin28-Jan-16 5:26 
QuestionEnable/Disable Ribbon Menu Item Dynamically Pin
rajmohan 12326-Jan-16 23:13
rajmohan 12326-Jan-16 23:13 
AnswerRe: Enable/Disable Ribbon Menu Item Dynamically Pin
Jochen Arndt27-Jan-16 1:49
professionalJochen Arndt27-Jan-16 1:49 
GeneralRe: Enable/Disable Ribbon Menu Item Dynamically Pin
rajmohan 12327-Jan-16 21:14
rajmohan 12327-Jan-16 21:14 
GeneralRe: Enable/Disable Ribbon Menu Item Dynamically Pin
Jochen Arndt27-Jan-16 21:35
professionalJochen Arndt27-Jan-16 21:35 
QuestionInterview Test Question Pin
Richard Andrew x6426-Jan-16 13:18
professionalRichard Andrew x6426-Jan-16 13:18 
AnswerRe: Interview Test Question Pin
David Crow27-Jan-16 4:22
David Crow27-Jan-16 4:22 
AnswerRe: Interview Test Question Pin
Albert Holguin28-Jan-16 5:13
professionalAlbert Holguin28-Jan-16 5:13 
QuestionWin32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 12:49
Frederick J. Harris26-Jan-16 12:49 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 13:30
Frederick J. Harris26-Jan-16 13:30 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 17:18
Frederick J. Harris26-Jan-16 17:18 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt26-Jan-16 21:47
professionalJochen Arndt26-Jan-16 21:47 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris27-Jan-16 10:01
Frederick J. Harris27-Jan-16 10:01 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt27-Jan-16 21:26
professionalJochen Arndt27-Jan-16 21:26 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris28-Jan-16 4:22
Frederick J. Harris28-Jan-16 4:22 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt28-Jan-16 4:45
professionalJochen Arndt28-Jan-16 4:45 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris29-Jan-16 5:10
Frederick J. Harris29-Jan-16 5:10 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt29-Jan-16 5:34
professionalJochen Arndt29-Jan-16 5:34 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Richard MacCutchan26-Jan-16 22:27
mveRichard MacCutchan26-Jan-16 22:27 
QuestionC, Win32 API: l need help with tab control [Solved] Pin
Member 1213944226-Jan-16 11:20
Member 1213944226-Jan-16 11:20 
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:

C++
static WCHAR subject1tab[MAX_LOADSTRING]; //max_loadstring =100

INITCOMMONCONTROLSEX icce = {0};
TC_ITEM tie={0};
icce.dwICC=ICC_TAB_CLASSES;
icce.dwSize=sizeof(INITCOMMONCONTROLSEX);
InitCommonControlsEx(&icce);

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.

modified 27-Jan-16 15:09pm.

AnswerRe: C, Win32 API: l need help with tab control Pin
bling26-Jan-16 12:03
bling26-Jan-16 12:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.