Platform SDK: Interprocess Communications

GetPriorityClipboardFormat

The GetPriorityClipboardFormat function retrieves the first available clipboard format in the specified list.

int GetPriorityClipboardFormat(
  UINT *paFormatPriorityList,  // array of clipboard formats
  int cFormats                 // number of entries in array
);

Parameters

paFormatPriorityList
[in] Pointer to an array of unsigned integers identifying clipboard formats, in priority order. For a description of the standard clipboard formats, see Standard Clipboard Formats.
cFormats
[in] Specifies the number of entries in the paFormatPriorityList array. This value must not be greater than the number of entries in the list.

Return Values

If the function succeeds, the return value is the first clipboard format in the list for which data is available. If the clipboard is empty, the return value is NULL. If the clipboard contains data, but not in any of the specified formats, the return value is –1. To get extended error information, call GetLastError.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winuser.h; include Windows.h.
  Library: Use User32.lib.

See Also

Clipboard Overview, Clipboard Functions, CountClipboardFormats, EnumClipboardFormats, GetClipboardFormatName, IsClipboardFormatAvailable, RegisterClipboardFormat