I get the following exceptions when my program calls the Tcanvas.draw and Tcanvas.copyrect methods
Exception Type : EInvalidOperation
Message: Canvas does not allow drawing
Exception Type : EOutOfResources
Message: Error creating window device context
This program is distributed to many differrent users on many differrent machines. It does not occur on most machines.
There are no memory leaks in my program. I have verified this with a memory monitoring tool. Also, the reports I get show that I there is plenty of available RAM and disk space at the time the exception is raised.
The user interface uses many small offscreen Tbitmaps. None of them are bigger than 200X300. I also use some temporary Tbitmaps that are created and destroyed during Paint operations.
All of the drawing is done in the main thread of the program.
Any thoughts on what could be the cause of this problem?