i wrote my first real custom made window without using one single
readymade feature like WS_CAPTION or something like this... it's
also interesting because it's a mixture between a non-transparent
working area and a transparent header-window (like winamp)...
everything works ok but somewhere there is a memory-leak hidden
and i don't find it, now i'm sitting 3 days in a row on this problem...
when i resize the window for 2-3 minutes everythings goes to hell.
so i posted the whole thing and maybe one of you guys is able to
fix this dumb bug, in my opinion everything is 100% correct, i closed
all pen/brush/device/whatever - handles, my respones to window
messages should be also right and i prereserved edi esi and ebx...
so what the heck... :confused:
Posted on 2002-08-26 16:27:33 by mob
Hi mob,

I reccomend NuMega SmartCheck, it is an excellent utility for testing on memory leaks etc.

This is what it returns on your program:
API failure: GetPixel returned 0xFFFFFFFF
Invalid Argument: EndPaint, argument 1, HWND 0x00000004
Invalid Argument: InvalidateRect, HWND 0x00000AD8
API failure: InvalidateRect returned 0x00000000
Resource Leak: allocated by CreatePatternBrush in DP2P.EXE!00001668, HANDLE: 0x000018AA

Seems to be your background brush:

Posted on 2002-08-26 17:13:55 by Guerrilla
the patternbrush is created once, but i bet it's because
"HWND" should be "hWnd"... that means that everytime i received
a wm_paint msg i didn't closed the device-context... silly me...

yeah, tried it out, it works now...

INVOKE EndPaint,HWND,ADDR ps ...
is wrong... or better said HWND is wrong... very strange that MASM
didn't give me a compiler error because i didn't even declared a var
called "HWND", the one i use is named "hWnd"... however, WM_PAINT
is executed everytime i resize my window so it's like a loop.

wow, smartcheck seems to be really cool, will check it out...
oh and thank you very very much :)
Posted on 2002-08-26 17:22:43 by mob