Поделиться через


CWnd::BindProperty

Binds a cursor-bound property on a data-bound control (such as a grid control) to a data-source control and registers that relationship with the MFC binding manager.

void BindProperty( 
   DISPID dwDispId, 
   CWnd * pWndDSC 
);

Parameters

  • dwDispId
    Specifies the DISPID of a property on a data-bound control that is to be bound to a data-source control.

  • pWndDSC
    Points to the window that hosts the data-source control to which the property will be bound. Call GetDlgItem with the resource ID of the DCS's host window to retrieve this pointer.

Remarks

The CWnd object on which you call this function must be a data-bound control.

Example

BindProperty might be used in the following context:

BOOL CMyDlg::OnInitDialog()
{


...


CWnd* pDSC = GetDlgItem(IDC_DATASOURCE);
CWnd* pMyBound = GetDlgItem(IDC_MYBOUNDCTRL2);
pMyBound->BindProperty(0x1, pDSC);


...


    return TRUE;
}

Requirements

Header: afxwin.h

See Also

Reference

CWnd Class

Hierarchy Chart

CWnd::GetDSCCursor

CWnd::BindDefaultProperty