Questions tagged [ccombobox]

CComboBox class provides the functionality of a Windows combo box.

CComboBox class provides the functionality of a Windows combo box.

55 questions
2
votes
2 answers

How to change CComboBox edit control's height?

CComboBox contains one text edit window and a dropdown window. I intend to change the text edit control's height. Any suggestion is appreciated.
Hardy Feng
  • 459
  • 4
  • 13
2
votes
2 answers

C++ MFC CComboBox is empty

i've a little comboBox, and i want to fill it with 6 entries... . i wrote this code: CComboBox* dropdownList =…
Laokoon
  • 1,241
  • 4
  • 24
  • 47
2
votes
3 answers

C++ MFC add combo box string item from a widget ID

I've added a combo box in the gui editor in MSVC 2010 pro in my MFC project. I have a list of strings I am grabbing from an external source and want to add them to my combo box. I've searched for a while, and every post seems to suggest I need to…
OzBarry
  • 1,098
  • 1
  • 17
  • 44
2
votes
1 answer

Manually set MFC CComboBox Dropdown height with Horizontal Scrollbar

I have a C++ MFC CComboBox (VS 2010) which users can enter text and click a "save" button, which inserts their text into the dropdown list for later recall/use. When text is too long for the box I need to have a scrollbar, so I set WS_HSCROLL in the…
mwilliams
  • 61
  • 1
  • 5
1
vote
1 answer

Are there any Win32 functions I can use to get the count / itemdata from a CComboBoxEx control?

My parent dialog has a CComboBoxEx control (which is mapped to a derived class called CDatesComboBoxEx). In one part of the application this dialog displays a popup modal dialog. And, inside the modal dialog, it needs access to information from the…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
0 answers

MFC: CCombobox SetCursel incorrect

I have a trouble with SetCurSel of MFC. My combobox has data like this: a, b, c, shop10, shop1, c, d. I add data for combobox like that, then set cursel is…
user10543389
1
vote
1 answer

CComboBox automatically selects text after call to MoveWindow

I'm currently experiencing a very strange problem with a CComboBox used within a CFormView. After adding strings to the combobox (created with WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWN | CBS_SORT | CBS_AUTOHSCROLL), I'm…
fhe
  • 6,099
  • 1
  • 41
  • 44
1
vote
1 answer

CComboBox event for making selection by enter key?

I have a dialog with a CComboBox in the DropList style. I want it to call my function (e.g. LoadData()) when: user clicks an item in the drop list, or an item in the drop list is highlighted (either by mouse hover or keyboard), and user presses…
martin_ljchan
  • 1,063
  • 1
  • 9
  • 22
1
vote
1 answer

Working out the maximum drop-down width for a CComboBoxEx with icons

I have seen this article on CodeProject for setting the width of a CComboBox dynamically. However, I am using a CComboBoxEx: As you can see with the last entry it is cropped. So I would like to automatically widen the drop-down list. It needs to…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
1 answer

MFC/C++ ComboBox: disable drawing of Dropdown closing & opening (UI freeze)

I've just added an Item-Filter-Feature to a CComboBox derived class called ComboBoxFbp in an old MFC application. BOOL CComboBoxFbp::OnEditChange() { CString csText; if (m_wFbpMode & _FbpMode_UserTextFiltersList) { …
Soko
  • 774
  • 1
  • 7
  • 20
1
vote
0 answers

MFC CComboBoxEx select text only

I am using the CComboBoxEx control in MFC to select color for future drawing. Items in my ComboBox have small pictures – examples of color, and color names. Everything is Ok, except one annoying thing – when I select some item, not only text in…
Andrey
  • 11
  • 1
1
vote
2 answers

Windows CE - disable CComboBox highlight

I'm using Visual Studio 2008 to write an application for Windows CE 6 using C++ and MFC. I want to remove the blue highlight of a CComboBox derived class when I've selected an element. According to this MSDN article, I cannot set the style of the…
Ayak973
  • 468
  • 1
  • 6
  • 23
1
vote
1 answer

Issue updating the text value for a editable combo

I have a simple editable combo box on my dialog. It has several predefined text values in the drop list. One of those entries is: "Test 123" The combo box is mapped to a CString variable m_strNotes. If I do this: m_strNotes =…
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
1
vote
0 answers

CComboBox::SetItemHeight() increases both the Item and control height

I am using a class that is the descendant of CComboBox. The problem occurs when I call the CComboBox::SetItemHeight method to set the height of my combobox items using the following code: m_searchComboBox.SetItemHeight(0,17); It sets the height of…
Itban Saeed
  • 1,660
  • 5
  • 25
  • 38
1
vote
2 answers

Is there any way to add an object other than CString to a CComboBox in MFC?

I am trying to add an object that has a member variable CString to a CCombobox. I cannot just add the string because I am trying to interface with a tool that requires me to have another member variable other than just a string as a list item in the…
Jameswr.11
  • 70
  • 6