bindable

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

Indicates that the property supports data binding.

  
[bindable]  
  

The bindable C++ attribute has the same functionality as the bindable MIDL attribute. You can use it on properties defined with the propget, propput, or propputref attributes, or you can manually define a bindable method.

The following MFC samples show the use of bindable:

The following code shows how you can use bindable on a property:

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

Attribute Context

Applies toInterface method
RepeatableNo
Required attributesNone
Invalid attributesNone

For more information about the attribute contexts, see Attribute Contexts.

IDL Attributes
Method Attributes
defaultbind
displaybind
immediatebind
requestedit
Attributes Samples

Show: