views:

53

answers:

1

How to programmatically set the dropped control rect of a CComboBox?

I know I can do this in the resource editor, but how do I change it, or set it if I programmatically create a combo box?

I can acquire this information via the CB_GETDROPPEDCONTROLRECT message, but I don't see a corresponding set message/function.

+1  A: 

I'm pretty sure you just use SetWindowPos and set the size in the cy parameter (with SWP_NOZORDER | SWP_NOMOVE set). cx does need to be set correctly though.

Goz