-2

I have dropped ComboBox on dialog form. Also I have added some text to it:

BOOL CMyAppDlg::OnInitDialog()
{

    CComboBox *combo= (CComboBox *)GetDlgItem(IDC_COMBO_TT);
    combo->AddString("s1");
    combo->AddString("s2");

//...
return TRUE;
}

When I drop down ComboBox it shows only one selection line and adds arrows to select other items. How to increase dropdown size?

vico
  • 17,051
  • 45
  • 159
  • 315
  • You are the same person who asked [this question](http://stackoverflow.com/questions/23738212/add-strings-to-mfc-combobox), with *the exact same code*. Why have you posted a new question, instead of editing the original? – Cody Gray - on strike May 19 '14 at 13:35
  • Other duplicates: [Combobox not displaying the data items](http://stackoverflow.com/questions/20350189/combobox-not-displaying-the-data-items) and [MFC Combo-Box Control is not showing the full list of items when I click the drop-down menu](http://stackoverflow.com/questions/2513263/mfc-combo-box-control-is-not-showing-the-full-list-of-items-when-i-click-the-dro) – Cody Gray - on strike May 19 '14 at 13:37
  • I have done two apps with the same code. One app DDList shows nothing while other shows one position. That is why code is the same. Now I see the problem – vico May 19 '14 at 13:42

1 Answers1

4

Click the combo button in dialog editor. You can now drag down to set the open size.

GazTheDestroyer
  • 20,722
  • 9
  • 70
  • 103