Click here to Skip to main content
15,886,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: C, Win32 API: l need help with tab control Pin
Member 1213944226-Jan-16 21:07
Member 1213944226-Jan-16 21:07 
GeneralRe: C, Win32 API: l need help with tab control Pin
bling27-Jan-16 14:15
bling27-Jan-16 14:15 
AnswerRe: C, Win32 API: l need help with tab control Pin
Richard MacCutchan26-Jan-16 22:34
mveRichard MacCutchan26-Jan-16 22:34 
QuestionRe: C, Win32 API: l need help with tab control Pin
David Crow27-Jan-16 4:27
David Crow27-Jan-16 4:27 
QuestionToo many initializers error in MSVC. Pin
Brisingr Aerowing20-Jan-16 13:02
professionalBrisingr Aerowing20-Jan-16 13:02 
SuggestionRe: Too many initializers error in MSVC. Pin
David Crow22-Jan-16 4:49
David Crow22-Jan-16 4:49 
GeneralRe: Too many initializers error in MSVC. Pin
Brisingr Aerowing22-Jan-16 5:02
professionalBrisingr Aerowing22-Jan-16 5:02 
GeneralRe: Too many initializers error in MSVC. Pin
Richard MacCutchan22-Jan-16 6:35
mveRichard MacCutchan22-Jan-16 6:35 
GeneralRe: Too many initializers error in MSVC. Pin
Brisingr Aerowing12-Feb-16 5:55
professionalBrisingr Aerowing12-Feb-16 5:55 
QuestionC++ Namespace scope bug / feature Pin
Anthony Mushrow20-Jan-16 3:00
professionalAnthony Mushrow20-Jan-16 3:00 
AnswerRe: C++ Namespace scope bug / feature Pin
Richard MacCutchan20-Jan-16 4:38
mveRichard MacCutchan20-Jan-16 4:38 
AnswerRe: C++ Namespace scope bug / feature Pin
Aescleal20-Jan-16 6:51
Aescleal20-Jan-16 6:51 
GeneralRe: C++ Namespace scope bug / feature Pin
Anthony Mushrow20-Jan-16 8:04
professionalAnthony Mushrow20-Jan-16 8:04 
QuestionNeed to communicate between two server processes Pin
Member 1227424519-Jan-16 8:57
Member 1227424519-Jan-16 8:57 
SuggestionRe: Need to communicate between two server processes Pin
David Crow19-Jan-16 9:41
David Crow19-Jan-16 9:41 
SuggestionRe: Need to communicate between two server processes Pin
Midi_Mick19-Jan-16 18:37
professionalMidi_Mick19-Jan-16 18:37 

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.