I observed that the height of the ComboBox is always the same one (21 pixels), and do not obtain to modify using MoveWindow(), SetWindowPos() or WM_GETMINMAXINFO...
How to make the ComboBox only with 17 pixels of height, and to remove the edge?
I use Win32 API...
One, if you're using a resource editor, you can just make it the correct height in there.
Two, if you're using CreateWindow() (or CreateWindowEx), you specify the size when you call it. Look here.
Again, for the style, do it in the resource editor or use CreateWindowEx and specify the style.
The height is fixed, always...
ComboBox = CreateWindow("COMBOBOX","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN,10,10,160,17,hwnd,(HMENU)ID_COMBOBOX,GetModuleHandle(NULL),NULL);
WPARAM Font = (WPARAM)GetStockObject(DEFAULT_GUI_FONT);
Maybe somewhere later in the code you send a message to resize it? How do you know it's ten pixels? (or is it just not very big?)
A combobox won't dynamically resize AFAIK. You need to specify its height when creating it or it won't work.
WM_SETFONT is probably adjusting the size based on the font.
>> ...and to remove the edge?
You'll have to do the drawing yourself if you don't like the default implementation.
Originally Posted by Codeplug
you need owner drawn control and then use WM_MEASUREITEM to return whatever you like.
I made and forgot to send the results. The sources are annexed...
If it will have some irregularity, inform to me...
In the Windows XP, with any active theme, it's necessary create a "XP Manifest", to the good functioning...
Is that a question or a statement?
In any case, creating a manifest allows you to use the "pretty" new controls in XP. Otherwise it has not real significance.
This is a statement... My English is very bad...