ComboBox is giving me a hard time

Posted on 2003-02-25
Medium Priority
Last Modified: 2013-11-20

I had the same problem as someone before, but mine isn´t solved by creating a variable for the combobox and putting it on a number.

I still can´t see the entire list.

This is the code

CComboBox* pCombo = (CComboBox*)GetDlgItem(IDC_COMBO1);
return true;

The only thing I see when I look at my ComboBox is Combo1 and the rest isn´t there.


Question by:heiko_kw
  • 2
LVL 32

Expert Comment

ID: 8018192
I suspect you've not properly SIZED the ComboBox in the dialog editor.  If you make the EXPANDED size one line tall you will not be able to see and choice but the first one.  (It's an easy mistake to make...)

1) Open the dialog in the dialog editor.
2) Select the combo.
3) Click on the "V" of the combo.  (I.e. the DROPDOWN arrow)
4) Use the center "grab handle" to drag the EXPANDED size down so that multiple choices can be accomodated.
5) Save and the rebuild your project.
6) The combo should work as you expect.

Accepted Solution

Manirup earned 200 total points
ID: 8022934
The code that u have written doesn't seem to have any problem. I doubt, the combo-box that u have put in the dialog doesn't have the length downwards to show all the three. It will be better if u drag the length of the combo-box longer. For that u will have to click the drop down button on the combo-box. If u can't do that, then delete this combo-box, and create another and run with same code, with combo-box being created longer downwards.
If u still find the same problem, let me know.

Author Comment

ID: 8023935
Thank you very much Manirup that solves my stupid problem
LVL 32

Expert Comment

ID: 8024717
So why did you accept Manirup's answer which was posted 12 hours later?  My comment is the correct procedure.

Please explain yourself!

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month12 days, 19 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question