windows9x app problem

windows9x app problem

I have this windows app which creates an EnhMetafile which it uses in request to the WM_PAINT message via a call to PlayEnhMetafile().
My problem is, on winNT and 2000 it works OK, however on win9x systemresources are gobbled up just by hiding and raising the window.
What might be the problem?

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Windows 9x and NT GDIs work quite differently, one of differences being total available limit for resources (IIRC only 64K on 9x, much more on NT). That, however, does not change the fact that you have resource leaks in your metafile. My guess is that you don't DeleteObjects properly (at all?) when creating metafile -- that failure "passes through" PlayEnhMetaFile. You must DeleteObject for all GDI objects you create at the end. has useful tools to detect memory leaks. I think latest version of Process Explorer can do it (I'm not sure, but check other tools).

Leave a Comment

Please sign in to add a comment. Not a member? Join today