Monday, November 26, 2007

Combo Box problem in MFC dialog application

Combo Box problem in MFC dialog application :
----------------------------------------------
1.I added the combo box to the dialog and added the string to the combo box using the following code...

CComboBox* combo = (CComboBox*) GetDlgItem( IDC_COMBO1 );
combo->AddString( "one" );
combo->AddString( "two" );
combo->AddString( "three" );

If I checked the count, it returns 3 But it didnt display the text "one,two,three" on screen.


Solution:
---------
Make sure you size the combo box in the resource editor so it is big enough. Click
on the little arrow and then drag the bottom handle square down. If you are doing it in
code, make sure the rect is big enough to fit the drop-down.

I opened the .rc file in a resource editor and modified the
combo box values , Now it displays the data .The problem is combo box height is not big to display
the combo box items in a drop down or drop List

Labels:

0 Comments:

Post a Comment

<< Home