Discussion:
Combo Box Special Style
(too old to reply)
Larry
15 years ago
Permalink
Hi,

I am creating a combo box via C++ code in order to abtain the third combobox
on the right shown in the picture below:

Failed to load image: http://i.msdn.microsoft.com/Bb775791...s,VS.85%29.png

The following is the code:

HWND hvComboBox = CreateWindowEx(0,WC_COMBOBOX,NULL,
WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL |
0x00002000,
60, 62, 250, 100,
hwnd,(HMENU)IDC_COMBO1,hInst,NULL);

where I guess the 0x00002000 should give the combobox that special style
(the control was originally created with ResEdit)

Unfortunately, I am still getting a normal style like the combo in the
middle shown in the picture...what am I doing wrong?

thanks
Igor Tandetnik
15 years ago
Permalink
Post by Larry
I am creating a combo box via C++ code in order to abtain the third combobox
http://i.msdn.microsoft.com/Bb775791...s,VS.85%29.png
Your URL didn't make it into the newsgroup for some reason. What's supposed to be special about the third combobox on the right?
Post by Larry
HWND hvComboBox = CreateWindowEx(0,WC_COMBOBOX,NULL,
WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL |
0x00002000,
60, 62, 250, 100,
hwnd,(HMENU)IDC_COMBO1,hInst,NULL);
where I guess the 0x00002000 should give the combobox that special style
(the control was originally created with ResEdit)
0x00002000 is just CBS_UPPERCASE - nothing profound.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
Larry
15 years ago
Permalink
Post by Igor Tandetnik
Your URL didn't make it into the newsgroup for some reason. What's
supposed to be special about the third combobox on > the right?
I am sorry:
Failed to load image: http://i.msdn.microsoft.com/Bb775791.simplecombo%28en-us,VS.85%29.png
Igor Tandetnik
15 years ago
Permalink
Post by Larry
Post by Igor Tandetnik
Your URL didn't make it into the newsgroup for some reason. What's
supposed to be special about the third combobox on > the right?
http://i.msdn.microsoft.com/Bb775791.simplecombo%28en-us,VS.85%29.png
Are you running on Vista or Win7? That bubbly look is new with Vista.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925
Drew
15 years ago
Permalink
Post by Larry
Hi,
I am creating a combo box via C++ code in order to abtain the third
http://i.msdn.microsoft.com/Bb775791...s,VS.85%29.png
HWND hvComboBox = CreateWindowEx(0,WC_COMBOBOX,NULL,
WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL |
0x00002000,
60, 62, 250, 100,
hwnd,(HMENU)IDC_COMBO1,hInst,NULL);
Not a very descriptive ID you have there (IDC_COMBO1) are you sure it's
unique, not used by any other of the combos in the dialog?

Drew
Post by Larry
where I guess the 0x00002000 should give the combobox that special style
(the control was originally created with ResEdit)
Unfortunately, I am still getting a normal style like the combo in the
middle shown in the picture...what am I doing wrong?
thanks
Continue reading on narkive: