Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have an issue and i m looking for your help:

I have a combobox and a ctrlList; what i wanna do is to set the ComboBox as a parent of the ListCtr using the SetParent(Cwnd *) directive.

I made a code as below :

C#
CWnd* TheWnd = GetDlgItem(IDC_INCOMBO)->GetParent();
 m_Combo_Oper.SetParent(TheWnd);


But when i run the application this latter bugs (debug assertion failed) !!

How could i put the CtrlList into the ComboBox ?? Thank you
Posted
Comments
Jochen Arndt 27-Feb-12 6:46am    
I did not really understand what you want to do. Do you want a special combo box that has a list control rather a list box? This could not be done this way.

Your first code line returns the CWnd of the dialog containing the IDC_INCOMBO control. This is probably the dialog containing your code snippet (this).
Richard MacCutchan 27-Feb-12 8:32am    
What are you trying to do? A ComboBox already contains a list control.
Pedramphhi 8-Jun-12 15:52pm    
make sure IDC_INCOMBO is defined in Resource.h

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900