I have found some bugs that cause GDI objects leaks.
TTreeVie.prg:
Code: Select all
METHOD SetColor( nClrText, nClrPane ) INLINE ;
Super:SetColor( nClrText, nClrPane ), TVSetColor( ::hWnd, nClrText, nClrPane )
Code: Select all
METHOD SetColor( nClrText, nClrPane ) CLASS TTreeView
Super:SetColor( nClrText, nClrPane )
IF !Empty(::hWnd) .AND. ( nClrText != ::oWnd:nClrText .OR. nClrPane != GetSysColor(COLOR_WINDOW) )
TVSetColor( ::hWnd, nClrText, nClrPane )
ENDIF
RETURN NIL
Code: Select all
METHOD Destroy() CLASS TTreeView
IF !Empty(::oImageList)
::oImageList:End()
ENDIF
RETURN Super:Destroy()
In the method LoadBitmaps there's no call to FreeBitmaps, so if you change the bitmaps at run-time it will open the new bitmaps without closing the others.
xBrowse.prg
Sometimes the method End isn't called when you close the dialog. I add a inline method destroy:
Code: Select all
METHOD Destroy() INLINE ::End()
Code: Select all
DeleteObject( ::aBitmaps[ nFor, BITMAP_PALETTE ] )
Thanks
Patrizio