on all prgs I use the expression oApp():oFont to call this font
then when I close the application end the font with ::oFont:End()
------------------------------------------------------------
25/05/2016 22:17:12: EXCESS RELEASE OF FONT Ms Sans Serif[ hFont : 0] ( nCount : -2 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2132) <-TBTNBMP:DESTROY(925) <-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733) <-TBTNBMP:HANDLEEVENT(1731) <-_FWH(3288) <-WINRUN(0) <-TWINDOW:ACTIVATE(1038)
------------------------------------------------------------
29/05/2016 21:07:40: EXCESS RELEASE OF FONT ARIAL[ hFont : 0] ( nCount : 0 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2132) <-TBTNBMP:DESTROY(925) <-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733) <-TBTNBMP:HANDLEEVENT(1731) <-_FWH(3288) <-WINRUN(0) <-TWINDOW:ACTIVATE(1038)
------------------------------------------------------------
29/05/2016 23:10:26: EXCESS RELEASE OF FONT ARIAL[ hFont : 0] ( nCount : 0 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2132) <-TBTNBMP:DESTROY(925) <-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733) <-TBTNBMP:HANDLEEVENT(1731) <-_FWH(3288) <-WINRUN(0) <-TWINDOW:ACTIVATE(1038)
------------------------------------------------------------
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
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 47 guests