- // case 'xxx' is not a valid value for switch of enum 'wxDataFormat'
- #ifdef __VISUALC__
- #pragma warning(disable:4063)
- #endif // VC++
-
- static char s_szBuf[128];
- switch ( format ) {
- case CF_TEXT: return "CF_TEXT";
- case CF_BITMAP: return "CF_BITMAP";
- case CF_METAFILEPICT: return "CF_METAFILEPICT";
- case CF_SYLK: return "CF_SYLK";
- case CF_DIF: return "CF_DIF";
- case CF_TIFF: return "CF_TIFF";
- case CF_OEMTEXT: return "CF_OEMTEXT";
- case CF_DIB: return "CF_DIB";
- case CF_PALETTE: return "CF_PALETTE";
- case CF_PENDATA: return "CF_PENDATA";
- case CF_RIFF: return "CF_RIFF";
- case CF_WAVE: return "CF_WAVE";
- case CF_UNICODETEXT: return "CF_UNICODETEXT";
- case CF_ENHMETAFILE: return "CF_ENHMETAFILE";
- case CF_HDROP: return "CF_HDROP";
- case CF_LOCALE: return "CF_LOCALE";
- default:
- sprintf(s_szBuf, "clipboard format 0x%x (unknown)", format);
- return s_szBuf;
- }
-
- #ifdef __VISUALC__
- #pragma warning(default:4063)
- #endif // VC++
+ // case 'xxx' is not a valid value for switch of enum 'wxDataFormat'
+ #ifdef __VISUALC__
+ #pragma warning(disable:4063)
+ #endif // VC++
+
+ static wxChar s_szBuf[256];
+ switch ( format ) {
+ case CF_TEXT: return wxT("CF_TEXT");
+ case CF_BITMAP: return wxT("CF_BITMAP");
+ case CF_METAFILEPICT: return wxT("CF_METAFILEPICT");
+ case CF_SYLK: return wxT("CF_SYLK");
+ case CF_DIF: return wxT("CF_DIF");
+ case CF_TIFF: return wxT("CF_TIFF");
+ case CF_OEMTEXT: return wxT("CF_OEMTEXT");
+ case CF_DIB: return wxT("CF_DIB");
+ case CF_PALETTE: return wxT("CF_PALETTE");
+ case CF_PENDATA: return wxT("CF_PENDATA");
+ case CF_RIFF: return wxT("CF_RIFF");
+ case CF_WAVE: return wxT("CF_WAVE");
+ case CF_UNICODETEXT: return wxT("CF_UNICODETEXT");
+ case CF_ENHMETAFILE: return wxT("CF_ENHMETAFILE");
+ case CF_HDROP: return wxT("CF_HDROP");
+ case CF_LOCALE: return wxT("CF_LOCALE");
+
+ default:
+ if ( !::GetClipboardFormatName(format, s_szBuf, WXSIZEOF(s_szBuf)) )
+ {
+ // it must be a new predefined format we don't know the name of
+ wxSprintf(s_szBuf, wxT("unknown CF (0x%04x)"), format.GetFormatId());
+ }
+
+ return s_szBuf;
+ }
+
+ #ifdef __VISUALC__
+ #pragma warning(default:4063)
+ #endif // VC++