Returns the location of the dropdown portion.
C
int WINAPI SftBox_GetDroppedControlRect(HWND hwndCtl, LPRECT lpRect);
C++
int CSftBox::GetDroppedControlRect(LPRECT lpRect) const;
hwndCtl
The window handle of the combo box control.
lpRect
A pointer to a RECT structure. This structure will be updated with the location of the dropdown portion, in screen coordinates (in pixels).
The return value is 0 if the function was successful. -1 is returned if the dropdown portion is not currently shown or if the combo box is a simple combo box. In this case, an empty rectangle is returned in lpRect.
The GetDroppedControlRect function returns the location of the dropdown portion.
The location is only available while the dropdown portion of a dropdown or dropdown list combo box is shown (see GetDroppedState). The rectangle returned describes the complete window of the dropdown portion, including its border and scroll bars.
The size of the dropdown portion is calculated each time it is shown, based on the settings defined using SetDroppedHeight, SetDroppedWidth and SetDropDownOptimalWidth.
See Also C/C++ API | Categories | Notifications