Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Setting the DropDown height of a ComboBox using the Win32 API with Common Controls 6.0

$
0
0

Prior to using Common Controls 6.0 (Windows 7) we could calcaluate the height of a ComboBox DropDown by multiplying the number of rows we wanted to be visible by the row height, adding in margins.  We then did a SendMessage to the control passing it a WM_SIZE message, SIZENORMAL, and a lparam which had the desired width height encoded into it.  This worked well.  We are now having problems with the same code under Windows 7.  The dropdown height remains unchanged no matter what we set it to (it seems to be based on the number of rows in the entire data set).

Research showed me things such as the CB_SETMINVISIBLE message, which works,  but I need to actually do something more like a CB_SETMAXVISIBLE (which doesn't exist!).  How do I under program control set the height of a ComboBox DropDown to a given number of rows ( like I would like to only see 10 out of a data set of 100, with a scrollbar to move within the data set). 

Thanks,

Don


Viewing all articles
Browse latest Browse all 15302

Trending Articles