Share via


GetClipboardFormatName (Compact 2013)

3/28/2014

This function retrieves from the clipboard the name of the specified registered format. The function copies the name to the specified buffer.

Syntax

int GetClipboardFormatName(
  UINT format, 
  LPTSTR lpszFormatName, 
  int cchMaxCount
); 

Parameters

  • format
    [in] Unsigned integer that specifies the type of format to be retrieved. This parameter must not specify any of the predefined clipboard formats.
  • lpszFormatName
    [out] Long pointer to the buffer that is to receive the format name.
  • cchMaxCount
    [in] Unsigned integer that specifies the maximum length, in characters, of the string to be copied to the buffer. If the name exceeds this limit, it is truncated.

Return Value

The length, in characters, of the string copied to the buffer indicates success. Zero indicates that the requested format does not exist or is predefined, and that the function failed. To get extended error information, call GetLastError.

Remarks

When an application registers a clipboard format name with a call to the RegisterClipboardFormat function, the system assigns an unsigned integer to the clipboard format.

To obtain the available clipboard formats for clipboard data, an application calls the EnumClipboardFormats function. This function enumerates the clipboard formats using their associated integers. An application calls GetClipboardFormatName to retrieve the name of a registered clipboard format and display it to a user.

Requirements

Header

winuser.h

Library

Clipbd.lib

See Also

Reference

Clipboard Functions
EnumClipboardFormats
RegisterClipboardFormat