Registering Clipboard Formats

Whenever an application uses a private clipboard format such as XlTable, Biff5, Biff4, Biff3, Biff, Wk1, Csv, or Rich Text Format, it must register the format before using it. Microsoft Excel registers these private clipboard formats, and your DDE application must also register any of these formats that you want to use to exchange data.

For example, to register XlTable, use the following Windows API function call:

wCBformat = RegisterClipboardFormat((LPSTR)"XlTable");

If the function call is successful, the return value is equal to the format value for the XlTable format. This format value (type WORD) is between 0xC000 and 0xFFFF, and is equal to the format value that Windows returned to Microsoft Excel when it registered XlTable. If Windows cannot register XlTable, then the function returns zero.