次の方法で共有


IVsSimpleObjectList2.GetClipboardFormat Method

Definition

Asks the given list item to renders a specific clipboard format that it supports.

public:
 int GetClipboardFormat(System::UInt32 index, System::UInt32 grfFlags, cli::array <Microsoft::VisualStudio::OLE::Interop::FORMATETC> ^ pFormatetc, cli::array <Microsoft::VisualStudio::OLE::Interop::STGMEDIUM> ^ pMedium);
int GetClipboardFormat(unsigned int index, unsigned int grfFlags, std::Array <Microsoft::VisualStudio::OLE::Interop::FORMATETC> const & pFormatetc, std::Array <Microsoft::VisualStudio::OLE::Interop::STGMEDIUM> const & pMedium);
public int GetClipboardFormat (uint index, uint grfFlags, Microsoft.VisualStudio.OLE.Interop.FORMATETC[] pFormatetc, Microsoft.VisualStudio.OLE.Interop.STGMEDIUM[] pMedium);
abstract member GetClipboardFormat : uint32 * uint32 * Microsoft.VisualStudio.OLE.Interop.FORMATETC[] * Microsoft.VisualStudio.OLE.Interop.STGMEDIUM[] -> int
Public Function GetClipboardFormat (index As UInteger, grfFlags As UInteger, pFormatetc As FORMATETC(), pMedium As STGMEDIUM()) As Integer

Parameters

index
UInt32

[in] Specifies the index of the list item of interest.

grfFlags
UInt32

[in] Specifies multi-selection. Values are taken from the _VSOBJCFFLAGS enumeration.

pFormatetc
FORMATETC[]

[in] Pointer to a FORMATETC structure containing clipboard format information.

pMedium
STGMEDIUM[]

[in] Pointer to a STGMEDIUM structure indicating the data transfer medium.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsSimpleObjectList2::GetClipboardFormat(  
   [in] ULONG         Index,   
   [in] VSOBJCFFLAGS  grfFlags,   
   [in] FORMATETC    *pFormatetc,   
   [in] STGMEDIUM    *pMedium  
);  

When the user requests a copy-paste or drag-drop operation on an item in your object list, the environment calls EnumClipboardFormats to see which formats your list supports. The environment then calls GetClipboardFormat for the item when the actual paste or drop operation happens. You then render the item in the requested format.

Applies to