Partager via


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.

Example

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

// The point to move the combo box to.
CPoint myPoint(30, 10);

CRect r;

m_pComboBox->GetDroppedControlRect(&r);

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

Requirements

Header: afxwin.h

See Also

Reference

CComboBox Class

Hierarchy Chart

CB_GETDROPPEDCONTROLRECT