pepr
asked on
Size of the listbox of combo box (Windows)?
Hi,
I am polishing rather old GUI of the application. The window is resizable -- home made layout is programmed via MoveWindow() (created in the pre-window-layout-manager era). One of the used controls is a combo-box. The rectangle of the combo box is set to determine the desired size of the list box when the combo is dropped down. However, the rectangle goes out of the window. It overlaps also the tab rectangle and causes the frame around the tab display area to be erased even when the combo box is closed -- see the circled areas on the image and the missing tab border between the two circles.
The question is how it should be done correctly?
Thanks,
Petr
2009-03-31-160105.png
I am polishing rather old GUI of the application. The window is resizable -- home made layout is programmed via MoveWindow() (created in the pre-window-layout-manager era). One of the used controls is a combo-box. The rectangle of the combo box is set to determine the desired size of the list box when the combo is dropped down. However, the rectangle goes out of the window. It overlaps also the tab rectangle and causes the frame around the tab display area to be erased even when the combo box is closed -- see the circled areas on the image and the missing tab border between the two circles.
The question is how it should be done correctly?
Thanks,
Petr
2009-03-31-160105.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you tried it under Win 2K and seen that it doesn't work? I seem to recall that the common controls are updated when you install updated versions of IE, but perhaps I am mistaken.
You might be able to set the size yourself as itsmeandnobodyelse suggested, but you would probably have to do it in response to the CBN_DROPDOWN notification message.
http://msdn.microsoft.com/en-us/library/bb775810(VS.85).aspx
You might be able to set the size yourself as itsmeandnobodyelse suggested, but you would probably have to do it in response to the CBN_DROPDOWN notification message.
http://msdn.microsoft.com/en-us/library/bb775810(VS.85).aspx
ASKER
I did not try as I have no Win 2000 around. I will try it a bit later.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to both! It helped.
ASKER
Is it possible to implement something like CB_SETMINVISIBLE caused behaviour "easily" also for Windows 2000? Or would you prefer to capture CBN_DROPDOWN, get the handle of the listbox part and move it?