바인딩할 수 있는

속성이 데이터 바인딩을 지원합니다.

[bindable]

설명

바인딩할 수 있는 C++ 특성을 동일한 기능을가지고 있는 바인딩할 수 있는 MIDL 속성.정의 된 속성을 사용할 수 있습니다의 propget, propput, 또는 propputref 특성 또는 바인딩 방법을 정의할 수 있습니다 직접.

다음 MFC 샘플 사용을 표시 바인딩할 수 있는:

예제

다음 코드에서는 사용 방법을 보여 줍니다. 바인딩할 수 있는 속성:

// cpp_attr_ref_bindable.cpp
// compile with: /LD
#include <windows.h>
[
   uuid("479B29E3-9A2C-11D0-B696-00A0C903487A"),
   dispinterface,
   helpstring("property demo Interface")
]
__interface IPropDemo : IDispatch {

   [propget, id(1), bindable, displaybind, defaultbind, requestedit] HRESULT P1([out, retval] long *nSize);
   [propput, id(1), bindable, displaybind, defaultbind, requestedit] HRESULT P1([in] long nSize);
   [id(3), bindable, propget] HRESULT Object([out, retval] IDispatch **ppObj);
   [id(3), bindable, propputref] HRESULT Object([in] IDispatch* pObj);   
   [id(-552), helpstring("method AboutBox")] HRESULT AboutBox();
};

[ module(name="PropDemoLib", uuid="479B29E2-9A2C-11D0-B696-00A0C903487A", version="1.0", helpstring="property demo") ];

요구 사항

컨텍스트 특성

적용 대상

인터페이스 메서드

반복 가능

아니요

필수 특성

없음

잘못 된 특성

없음

속성 컨텍스트에 대 한 자세한 내용은 참조 하십시오. 컨텍스트 특성.

참고 항목

참조

defaultbind

displaybind

immediatebind

requestedit

기타 리소스

IDL 특성

메서드 특성

Attributes Samples