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?
/Bjorn

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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.

www.systeminternals.com 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).

Jugoslav www.xeffort.com

Melden Sie sich an, um einen Kommentar zu hinterlassen.