CComboBox::GetDroppedControlRect

调用 GetDroppedControlRect 成员函数检索屏幕坐标可见(拉)一个下拉组合框中的列表框。

void GetDroppedControlRect(
   LPRECT lprect 
) const;

参数

  • lprect
    指向 RECT 是接收坐标的结构。

示例

// 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);

要求

Header: afxwin.h

请参见

参考

CComboBox选件类

层次结构图

CB_GETDROPPEDCONTROLRECT