I tried to use OpenPrinter/GetPrinter to check for PRINTER_STATUS_OFFLINE, but unfortunately that did help with detecting that the printer is not turned on.
CHG: RichEditor example: Added try/catch in TRichEditorApp::CePrintEnable to prevent application crash if connected printer is offline.
I have a printer attached to my computer but it is usally not turned on. When I compile the RichEditor example for 32-bit, just creating a new empty text file leads to the application displaying a "Waiting for printer connection" dialog, which if cancelled or waited long enoung, results in an unhandled exception thrown that closes the application. The exception is thrown in TRichEditorApp::CePrintEnable and is pretty easy to handle and ignore, so that the crash is prevented, but the biggest issue...
RAD Studio 13.2 Florence Is Here
By the way, that code is almost unchanged from the original BmpView example from BC5.02/OWL5, so it is very likely that the ld example would experince similar clipboard-related problems.
After the latest changes, I no longer experience the fatal crash in the app, but sometimes when I do copy/paste in other applications, I see the Clipboard Busy message box shown by TBmpViewWindow
There are usages of std::lround at the end of geometry.h
Selection and copy to clipboard not working in THexViewWnd