RegisterClipboardFormat

Syntax

WORD RegisterClipboardFormat(lpFormatName)

This function registers a new clipboard format whose name is pointed to by the lpFormatName parameter. The registered format can be used in subsequent clipboard functions as a valid format in which to render data, and it will appear in the clipboard's list of formats.

Parameter Type/Description  

lpFormatName LPSTR Points to a character string that names the new format. The string must be a null-terminated character string.  

Return Value

The return value specifies the newly registered format. If the identical format name has been registered before, even by a different application, the format's reference count is increased and the same value is returned as when the format was originally registered. The return value is zero if the format cannot be registered.

Comments

The format value returned by the RegisterClipboardFormat function is within the range of 0xC000 to 0xFFFF.