> On August 21, 2002 03:59 am, Patrik Stridvall wrote:
> > > Does anyone know WT!$@# is CBES_EX_NOSIZELIMIT supposed to do?
> >
> > CBES_EX_NOSIZELIMIT
> > Allows the ComboBoxEx control to be vertically sized smaller than
> > its contained combo box control. If the ComboBoxEx is sized smaller
> > than the combo box, the combo box will be clipped.
>
> Sorry, I should have been more explicit. Of course I know what the
> official documentation says... What I don't understand is what is this
> supposed to do, exactly?
Exactly what it says. :-)
Seriously. I'm not sure.
It might mean that the height of the height of the combobox shouldn't
be enlarged if it doesn't fit.
Look at the code below. Perhaps
if( infoPtr->himl ) {
should be changed to
if( infoPtr->himl && !(infoPtr->dwExtStyle & CBES_EX_NOSIZELIMIT) )
{
or something.
Possible should other places be changed as well. Not sure.
I don't understand what it would be useful for either. Oh well...
Does anybody have any other ideas?
---8<---
static void COMBOEX_ReSize (COMBOEX_INFO *infoPtr)
{
SIZE mysize;
UINT cy;
IMAGEINFO iinfo;
COMBOEX_GetComboFontSize (infoPtr, &mysize);
cy = mysize.cy + CBE_EXTRA;
if (infoPtr->himl) {
ImageList_GetImageInfo(infoPtr->himl, 0, &iinfo);
cy = max (iinfo.rcImage.bottom - iinfo.rcImage.top, cy);
TRACE("upgraded height due to image: height=%d\n", cy);
}
SendMessageW (infoPtr->hwndSelf, CB_SETITEMHEIGHT, (WPARAM)-1,
(LPARAM)cy);
if (infoPtr->hwndCombo)
SendMessageW (infoPtr->hwndCombo, CB_SETITEMHEIGHT,
(WPARAM) 0, (LPARAM) cy);
}