COlePasteSpecialDialog::AddFormat

void AddFormat( const FORMATETC& fmt, LPTSTR lpstrFormat, LPTSTR lpstrResult, DWORD flags );

void AddFormat( UINT cf, DWORD tymed, UINT nFormatID, BOOL bEnableIcon, BOOL bLink );

Parameters

fmt

Reference to the data type to add.

lpstrFormat

String that describes the format to the user.

lpstrResult

String that describes the result if this format is chosen in the dialog box.

flags

The different linking and embedding options available for this format. This flag is a bitwise combination of one or more of the different values in the OLEUIPASTEFLAG enumerated type.

cf

The clipboard format to add.

tymed

The types of media available in this format. This is a bitwise combination of one or more of the values in the TYMED enumerated type.

nFormatID

The ID of the string that identifies this format. The format of this string is two separate strings separated by a ‘\n’ character. The first string is the same that would be passed in the lpstrFormat parameter, and the second is the same as the lpstrResult parameter.

bEnableIcon

Flag that determines whether the Display As Icon check box is enabled when this format is chosen in the list box.

bLink

Flag that determines whether the Paste Link radio button is enabled when this format is chosen in the list box.

Remarks

Call this function to add new formats to the list of formats your application can support in a Paste Special operation. This function can be called to add either standard formats such as CF_TEXT or CF_TIFF or custom formats that your application has registered with the system. For more information about pasting data objects into your application, see the article Data Objects and Data Sources: Manipulation in Visual C++ Programmer’s Guide.

For more information, see the TYMED enumeration type and the FORMATETC structure in the OLE 2 Programmer’s Reference, Volume 1.

For more information, see the OLEUIPASTEFLAG enumerated type in the OLE 2.01 User Interface Library.

COlePasteSpecialDialog OverviewClass MembersHierarchy Chart

See Also   COlePasteSpecialDialog::AddStandardFormats