Export (0) Print
Expand All
MFC
Expand Minimize

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

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.

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

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;
}

Header: afxwin.h

Community Additions

ADD
Show:
© 2014 Microsoft