Hi,
I am creating a combobox like this:
hCombo =CreateWindowEx(WS_EX_CLIENTEDGE , WC_COMBOBOX, "",
WS_CHILD | WS_VISIBLE | CBS_HASSTRINGS| CBS_DROPDOWNLIST , X, Y, Width, 120, hOwner, NULL, NULL, NULL);
(and yes, initcommoncontrols etc are OK).
To this combobox I add strings with:
SendMessage((HWND) hCombo,(UINT) CB_ADDSTRING, (WPARAM) 0, (LPARAM) (LPCTSTR) txt);
There are two problems here:
1. The font on the combobox is the old win3.1-style bold ugly one. It is not the standard windows font and I don't understand why.
2. Even worse: If I add, say, 10 strings, the resulting combobox will be a dropdown without the vertical scroll bar. That means I can select perhaps 4 or 5 of the entires, but I can only access the other by using arrow keys (there is no way to scroll up or down the list with the mouse or the mouse wheel). What am I doing wrong? Can I force a vertical scroll bar?
I have googled quite a bit and have looked at the different styles available for the combobox. Playing around with it has not solved my problem. So, I go for the gold: Ask in Pelles C forum!
Good work, Pelle =D>
Y.