Interesante. Sobre todo porque permite una opción de "Mostrar sólo cambios" y sirve para ver que objetos que quedaron sin cerrar luego de por ej. abrir un dialog y cerrarlo.
Saludos.
Rolando

Patrizio wrote:Antonio Linares wrote:Patrizio,
>
TVSetColor increment by two the GDI objects (two brushes) in use without decrement when destroy the TreeView.
>
How do you know this ? How have you checked it ? Thanks
I use MSDN GDIndicator e GDIUsage : http://msdn.microsoft.com/msdnmag/issue ... /GDILeaks/
In this case GDIndicator show you the type of gdi objects used by an application.
I've check it with this sample:Code: Select all | Expand
PROC Main()
LOCAL oDlg, n
FOR n := 1 TO 5
InitDialogGDI()
SysRefresh()
HB_GCall()
MsgInfo("GDI objects:" + AllTrim(Str(GetGDIObjects(),7)))
NEXT
RETURN
PROC InitDialogGDI()
LOCAL oDlg, oTree
oDlg := TDialog():New(,,,,,"DLG_GDI")
oTree := TTreeView():ReDefine(1190,oDlg,CLR_BLUE,CLR_YELLOW,.T.,"l0")
oDlg:Activate(,,,.F.,{||.T.},.T.,,,,)
oDlg:End()
RETURN
#pragma BEGINDUMP
#include <hbapi.h>
#include <Windows.h>
#include <WinUser.h>
#include <ClipApi.h>
HB_FUNC( GETGDIOBJECTS )
{
hb_retnd( GetGuiResources( GetCurrentProcess(), 0 ) );
}
#pragma ENDDUMPCode: Select all | Expand
DLG_GDI DIALOG DISCARDABLE 0, 0, 616, 428
STYLE DS_CENTER|WS_THICKFRAME|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE
CAPTION "GDI"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "", 1190, "SysTreeView32", TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT|TVS_EDITLABELS|TVS_SHOWSELALWAYS|TVS_NOTOOLTIPS|TVS_FULLROWSELECT|WS_BORDER|WS_TABSTOP, 8, 36, 220, 312
END