We help IT Professionals succeed at work.

Run-time error 480: Can't create autoredraw image

mkaratha
mkaratha asked
on
When dealing with many or very large DC's you can get "Run-time error 480: Can't create autoredraw image". According the documentation this is caused by unsuffcient memory. However, I get this error inspite the system has sufficient RAM (and enough swap file). For some reason Win98 and Win2000 behave differently. Win2000 is able to use more pictures, before this error is raised. I suspect this has little to do with the actual system memory.

Question:

How can I estimate the total size of all DC's (in MB) that the system can handle? I want to avoid the error and I DO NOT WANT TO TRAP the error. At the point you trap the error the system is already VERY unstable. GlobalMemoryStatus will not work!


Michael from Sweden
Comment
Watch Question

Once you have created a device context, call GetDeviceCaps to retrieve device data. GetDeviceCaps provides data about a device?s color format and raster capabilities, as well as its shape, text, and line drawing capabilities. You could then have to work backwards with the screen resolutions and pixels to calculate the bits for drawing for the entire desktop, or your client area, as required.

Author

Commented:
Thanks,

There were som good examples in SDK on GetDeviceCaps. The initial test I made seems to work. I have to read more about the structure parameters though. Great idea!

Michael

Explore More ContentExplore courses, solutions, and other research materials related to this topic.