Do not attempt to draw a page during WM_PAINT if there is no active page.
Attach a file by drag & drop or click to upload