... The error occurs in line " if IsIconic( ::oWnd:hWnd )" of PaintMeta method ( called from "on resize ::paintmeta() ). I am getting this error _occassionally_ when i click on the close button of the preview. Because I am getting it occassionally, I could not make a small self contained example. ...