DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2104
Version: 1.3-current


(I should preface the following with the disclaimer I'm not at all familiar
with the WIN32 clipboard functions, or how it's all supposed to work.)

Regarding CF_TEXT vs. CF_UNICODETEXT, you might be right.

I just did a few more tests putting printf()s at all the OpenClipboard(),
SetClipboardData(), and GetClipboardData() calls,
and noticed the chain of events during ^C and ^V are:

   ^C -- 1) calls OpenClipboard(fl_xid(..))
         2) calls SetClipboardData(CF_TEXT), function returns NULL(!)

   ^V -- 1) calls OpenClipboard(NULL)
         2) calls GetClipboardData(CF_TEXT), which..
            2a) causes a WM_RENDERFORMAT event which..
            2b) calls SetClipboardData(CF_UNICODETEXT) which returns OK
            2c) causes GetClipboardData() to return NULL, which causes
                fltk to fail to do its paste 
                (and GetLastError() is zero..!)

So if GetClipboardData() is returning NULL because the WM_RENDERFORMAT
event it causes is first doing a SetClipboardData(CF_UNICODETEXT), that
might explain the NULL return for the CF_TEXT get request.. incompatible
data types? (would be nice if GetLastError() indicated this..!)

I definitely recommend adding printf()s to the clipboard funcs, and esp.
monitor the return values for errors.


Link: http://www.fltk.org/str.php?L2104
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to