Hello,
I have a problem with fonts in my METRO-aplication
Fonts defined on top
DEFINE FONT oFontLarge NAME "Arial" SIZE 0, -50 BOLD ITALIC
DEFINE FONT oFontTime NAME "Arial" SIZE 0, -25 BOLD ITALIC
DEFINE FONT oFontMed NAME "Arial" SIZE 0, -20 BOLD
DEFINE FONT oFontTiny NAME "Arial" SIZE 0, -15
DEFINE FONT oFontSys NAME "Arial" SIZE 0, -14
DEFINE FONT oFontText NAME "Arial" SIZE 0, -13
DEFINE FONT oFontTage NAME "Arial" SIZE 0, -11
IF nScreenW > 1600
DEFINE FONT oTileFont NAME "Arial" SIZE 0, -20 BOLD
ELSE
DEFINE FONT oTileFont NAME "Arial" SIZE 0, -16 BOLD
ENDIF
released at the end
oFontLarge:End() // Line 179
oFontTime:End()
oFontMed:End()
oFontTiny:End()
oFontSys:End()
oFontText:End()
oFontTage:End()
oTileFont:End() // Line 186
My 1. test NO buttons only the headline
My 2. test with 1 button
I 'm getting the following messages iside the LOG file
From the 1. test
08.04.2016 22:55:31: EXCESS RELEASE OF FONT Arial[ hFont : 0] ( nCount : 0 )
<-TFONT:END(284) <-MAIN(179)
------------------------------------------------------------
from the 2. test
08.04.2016 22:58:34: EXCESS RELEASE OF FONT Arial[ hFont : 0] ( nCount : 0 )
<-TFONT:END(284) <-MAIN(186)
------------------------------------------------------------
adding ALL buttons the log-file looks like
08.04.2016 23:15:26: EXCESS RELEASE OF FONT Arial[ hFont : 0] ( nCount : 0 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2122) <-TBTNBMP:DESTROY(912) <-TMETROBTN:DESTROY(900)
<-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733)
<-TMETROBTN:HANDLEEVENT(1766) <-_FWH(3278) <-WINRUN(0)
------------------------------------------------------------
08.04.2016 23:15:26: EXCESS RELEASE OF FONT Arial[ hFont : 0] ( nCount : -1 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2122) <-TBTNBMP:DESTROY(912) <-TMETROBTN:DESTROY(900)
<-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733)
<-TMETROBTN:HANDLEEVENT(1766) <-_FWH(3278) <-WINRUN(0)
------------------------------------------------------------
08.04.2016 23:15:26: EXCESS RELEASE OF FONT Arial[ hFont : 0] ( nCount : -2 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2122) <-TBTNBMP:DESTROY(912) <-TMETROBTN:DESTROY(900)
<-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733)
<-TMETROBTN:HANDLEEVENT(1766) <-_FWH(3278) <-WINRUN(0)
------------------------------------------------------------
08.04.2016 23:15:26: EXCESS RELEASE OF FONT Arial[ hFont : 0] ( nCount : -3 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2122) <-TBTNBMP:DESTROY(912) <-TMETROBTN:DESTROY(900)
<-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733)
<-TMETROBTN:HANDLEEVENT(1766) <-_FWH(3278) <-WINRUN(0)
------------------------------------------------------------
08.04.2016 23:15:26: EXCESS RELEASE OF FONT Arial[ hFont : 0] ( nCount : -4 )
<-TFONT:END(284) <-TCONTROL:DESTROY(2122) <-TBTNBMP:DESTROY(912) <-TMETROBTN:DESTROY(900)
<-TWINDOW:HANDLEEVENT(0) <-TCONTROL:HANDLEEVENT(1733)
<-TMETROBTN:HANDLEEVENT(1766) <-_FWH(3278) <-WINRUN(0)
...
...
48 times the same
fonts are defined on top and released at the end
Why these errors ?
the typical button
DEFINE METROBUTTON oSBtn[105] OF oMetro ;
COLOR CLR_WHITE, 255 ;
CAPTION "&Ende" ;
ALIGN "BOTTOMLEFT" ;
GROUP 3 ;
FONT oTileFont ;
BITMAP c_Pfad1 + "exit.bmp" ;
BMPALIGN "BOTTOMRIGHT" ;
SIZE 48, 48 ;
BODYTEXT "Pflegeplus; beenden" ;
TEXTALIGN "TOPLEFT" ;
ACTION oWnd:End()
oSBtn[105]:nClrCaption := CLR_WHITE
oSBtn[105]:oFont := oTileFont
oSBtn[105]:oTextFont := oTileFont
best regards
Uwe