Discussion:
Combo Box Special Style
(too old to reply)
Larry
2010-02-11 11:02:50 UTC
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:

Loading Image...

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
2010-02-11 13:20:08 UTC
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
2010-02-11 17:27:39 UTC
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:
Loading Image...
Igor Tandetnik
2010-02-11 17:54:01 UTC
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
2010-02-11 17:54:20 UTC
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:
Loading...