Shows or hides the dropdown portion.
C
BOOL WINAPI SftBox_ShowDropDown(HWND hwndCtl, BOOL fShow);
C++
BOOL CSftBox::ShowDropDown(BOOL fShow);
hwndCtl
The window handle of the combo box control.
fShow
Set to TRUE to show the dropdown portion, set to FALSE to hide the dropdown portion.
The return value is TRUE if the function was successful or if the dropdown portion is already in the requested state. FALSE is returned if the combo box is a simple combo box or if the dropdown portion cannot be shown because the combo box does not contain any items.
The ShowDropDown function shows or hides the dropdown portion of a dropdown or dropdown list combo box.
Before the dropdown portion is shown, the SFTBOXN_DROPDOWN_READY notification is sent to the parent window. An application can prevent the dropdown portion from being shown by sending a WM_CANCELMODE message to the combo box while handling this notification. In this case ShowDropDown returns TRUE, but the dropdown portion is not shown.
If the combo box does not have the input focus when the dropdown portion is shown, the input focus is set to the combo box.
The SFTBOXN_DROPDOWN notification is sent when the dropdown portion is shown, the SFTBOXN_CLOSEUP notification is sent when it is hidden.
When the dropdown portion is hidden using ShowDropDown, the SFTBOXN_SELENDOK and SFTBOXN_SELENDCANCEL notifications are not sent.
A pending request to hide the dropdown portion (see RollUpDelayed) is canceled by ShowDropDown.
The size and position of the dropdown portion are defined using SetDroppedHeight, SetDroppedWidth, SetDropDownOptimalWidth and SetDropDownPosition. GetDroppedState can be used to determine whether the dropdown portion is currently shown.
See Also C/C++ API | Categories | Notifications