When i run the code for tut 5, the amount of gdi memory i have left starts go down rather quickly. It happens whenever you resize the window. Is this supposed to happen?
Posted on 2001-10-10 16:57:55 by ChimpFace9000
Someone told me it's a "feature" of Windows itself. Try other prog and see if the same thing happens when you resize the window.
Posted on 2001-10-11 19:47:31 by Iczelion
I made just a basic window that doesnt do any painting, and it doesnt have this problem.
Posted on 2001-10-11 20:38:42 by ChimpFace9000
This could be wrong, but...



invoke CreateFont, (lots of params)
invoke SelectObject, hdc, eax
mov hfont,eax
...
invoke TextOut,hdc,0,0,ADDR TestString,SIZEOF TestString
invoke SelectObject,hdc, hfont
invoke EndPaint,hWnd, ADDR ps


Maybe you forgot invoke DeleteObject, eax between the SelectObject and EndPaint?
Posted on 2001-10-11 20:59:30 by Irving W.
Heh, Irwing beat me to it (I'm excused, I was watching evangelion).
Yes, it indeed looks like the problem is not deleting the font after
use. Also, wouldn't it be better to create the font only on WM_CREATE,
and delete it on WM_DESTROY ?
Posted on 2001-10-11 21:19:03 by f0dder