Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CComboBox::GetDroppedControlRect 

Call the GetDroppedControlRect member function to retrieve the screen coordinates of the visible (dropped-down) list box of a drop-down combo box.


void GetDroppedControlRect(
   LPRECT lprect 
) const;

Parameters

lprect

Points to the RECT structure that is to receive the coordinates.

// This example move a combo box so that the upper left
// corner of the combo box is at a specific point.

// The pointer to my combo box.
extern CComboBox* pmyComboBox;
// The point to move the combo box to.
extern CPoint myPoint;

CRect r;

pmyComboBox->GetDroppedControlRect(&r);

pmyComboBox->GetParent()->ScreenToClient(&r);
r.OffsetRect(myPoint - r.TopLeft());
pmyComboBox->MoveWindow(&r);

Community Additions

ADD
Show:
© 2015 Microsoft