Mr. Rao.
many thanks for the explanation. You can see that I get ( nCount : -2 ), this means that I release the font more times than I create or use, but how you say, I only create one time and release one time.
Maybe my problems is that I change the say's fonts of the dialogs without defined (redefine) it
DEFINE DIALOG .....
ACTIVATE DIALOG oSelf:oForm CENTER NOWAIT;
ON INIT FindControlsById( oSelf:oForm, oApp():oFont6B )
......
//------------------------------------------------------------------------------
function FindControlsById( oDlg, oFont )
//----------------------------------------------------------------------------//GW_HWNDNEXT END
LOCAL hCtrl := GetWindow( oDlg:hWnd, GW_CHILD ), hdc
//TVM_SETTEXTCOLOR
WHILE hCtrl != 0
IF GetClassName( hCtrl ) == "Static" .AND. GetWindowLong( hCtrl, GWL_ID ) == 65535
SendMessage( hCtrl, WM_SETFONT, oFont:hFont )
hdc = GetDC( hCtrl )
SetTextColor( hdc, RGB(255,0,0) )
RELEASEDC( hCtrl, hdc )
//SetBkColor(hdc, CLR_BLUE )
SendMessage( hCtrl, 312, RGB(255,0,0) )
ENDIF
hCtrl := GetWindow( hCtrl, GW_HWNDNEXT )
ENDDO
Other question, how you can see, I try to change the color too, but can I only change the font type, not the color, are there the option to do than without define (redefine) the controls (says)
Regards
Marcelo VÃa