diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-11-19 18:29:34 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2021-11-19 18:29:34 +0100 |
| commit | 0b8eabd184ac71b778c9fab3c6161b65b616f1f5 (patch) | |
| tree | 0963458956352d7bff0a09f676457dbe58843ac1 /test/clipboard.cxx | |
| parent | 4d31c5bd4f3a45ceb36f422f99c18408fad131cc (diff) | |
Disable confusing debug info in clipboard viewer demo
Windows only, depends now on macro DEBUG_CLIPBOARD_DATA.
Diffstat (limited to 'test/clipboard.cxx')
| -rw-r--r-- | test/clipboard.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/test/clipboard.cxx b/test/clipboard.cxx index 5807c5575..ae517b988 100644 --- a/test/clipboard.cxx +++ b/test/clipboard.cxx @@ -28,9 +28,12 @@ #include <stdio.h> -#ifdef _WIN32 +// optional: display extra technical info about clipboard content if defined +// #define DEBUG_CLIPBOARD_DATA + +#if defined(_WIN32) && defined(DEBUG_CLIPBOARD_DATA) #include <windows.h> -#endif // _WIN32 +#endif // _WIN32 && DEBUG_CLIPBOARD_DATA /* Displays and follows the content of the clipboard with either image or text data */ @@ -93,8 +96,12 @@ public: return 1; char title[300]; sprintf(title, "%dx%d", cl_img->w(), cl_img->h()); // display the image original size -#ifdef _WIN32 - OpenClipboard(NULL); // display extra technical info about clipboard content + + // optional: display extra technical info about clipboard content + +#if defined(_WIN32) && defined(DEBUG_CLIPBOARD_DATA) + + OpenClipboard(NULL); // char *p = title + strlen(title); int format = EnumClipboardFormats(0); if (format && format < CF_MAX) { @@ -117,7 +124,9 @@ public: (int)lpBI->bmiHeader.biClrUsed); } CloseClipboard(); -#endif + +#endif // _WIN32 && DEBUG_CLIPBOARD_DATA + Fl_Image *oldimg = image_box->image(); delete oldimg; if (cl_img->w() > image_box->w() || cl_img->h() > image_box->h()) |
