Code: Select all
predicates
onPaint : window::paintResponder.
clauses
onPaint(Source, _Rectangle, GDI) :-
XYn = xynPainter::new(Source, GDI),
XYn:paint(data),
gfxImageIO::clientWin_putClipboardBMP(Source), % <== this works OK
nothing("").
predicates
onMouseUp : window::mouseUpListener.
clauses
onMouseUp(Source, _Point, _ShiftControlAlt, _Button) :-
gfxImageIO::clientWin_putClipboardBMP(Source), % <== this causes exception
/* ----------------------------------------
VPI cannot open a picture.
ExtraInfo = pict_GetFromWin: Cannot create compatible DC
error code = 6103
vpi_UnableOpenPicture (vpi)
vpi::vpiExceptionRaiser
pfc\vpi\vpi.pro(243,9)
---------------------------------------- */
succeed.