bindable

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

구문

[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") ];

요구 사항

특성 컨텍스트
적용 대상: 인터페이스 메서드
반복 가능 아니요
필수 특성 없음
잘못된 특성 없음

특성 컨텍스트에 대한 자세한 내용은 특성 컨텍스트를 참조하세요.

참고 항목

IDL 특성
메서드 특성
defaultbind
displaybind
immediatebind
requestedit