While researching an issue with how different versions of Citrix servers and Citrix clients handle copy pasting between remote and local applications I found myself in need of a little app, which would show me what data formats I have in clipboard right now.
So here goes another utility, which I can't imagine anyone will find usefull.
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT 0x0610
#define UNICODE
#include <windows.h>
#define IDI_MYICON 201
int main(void)
{
wchar_t full[50000];
wchar_t *index = full;
wchar_t name[255];
unsigned int format = 0;
OpenClipboard(NULL);
do {
format = EnumClipboardFormats(format);
GetClipboardFormatName(format, name, 255);
index += wsprintf(index, L"%d : %ls\n", format, name);
} while (format != 0);
MessageBox(NULL, full, L"Clipboard formats", MB_OK);
CloseClipboard();
return 0;
}
The code quite naïvely assumes, that the output buffer won't be longer than 50 000 characters, so in case you have so many formats in clipboard, the code will overflow. :)
For convenience binary version follows clipview.zip (6.8 kB)
If you copy paste for example Excel data into clipboard and run this program, the output will look like this:
Obligatory thanks to Mark James for creating the amazing Silk icons.
2 comments:
You can use Sharp IMG Viewer 2008 application to examine clipboard formats. The .NET application can be downloaded from Sharp IMG Viewer website. You can find more detailed information reading documentation.
the principal thing to consider need being the acquiring ability while using consumer.
Post a Comment