Enrico, Thank very much
it's working now
The code, how customers can change the text-type
on the Infobar
// The 1 InfoBar-Font
//--------------------------
PRIVATE aTYPE4[4]
aTYPE4[1] := "Arial"
aTYPE4[2] := 10
aTYPE4[3] := .F.
aTYPE4[4] := .F.
// Default from INI-File
// -------------------------
oFont := TFont():New( aTYPE4[1], , aTYPE4[2], .f., ;
aTYPE4[3], , , ,aTYPE4[4] )
// Set the 1 InfoBar Font
// -----------------------------
REDEFINE SAY oSAY4 VAR e_FTYP4 ID 800 OF oDlg5
REDEFINE BUTTON oBtn7 ID 805 OF oDlg5 ;
ACTION ( oSAY4:GetFont(), oSAY4:SelFont(), ;
aTYPE4[1] := oSAY4:oFont:cFaceName, ;
aTYPE4[2] := oSAY4:oFont:nHeight, ;
aTYPE41[3] := oSAY4:oFont:lBold, ;
aTYPE4[4] := oSAY4:oFont:lItalic )
// Select 1 Radio-Button of 3 to show the new Font
// ----------------------------------------------------------------
IF e_FTYP = 1 // 1 Radio-Button of 3
oFont1 := TFont():New( aTYPE4[1], , aTYPE4[2], ;
.f.,aTYPE4[3], , , ,aTYPE4[4] )
ENDIF
// Selects the Background BITMAP 1 of 16
// -----------------------------------------------------
i := 1
FOR i := 1 TO 16
xxx := LTRIM(STR(i))
IF e_HEADPIC = i
cInfo := c_path + "\Info" + xxx +".bmp"
REDEFINE BITMAP oBmp1 ID 100 ADJUST ;
FILENAME "&cInfo" OF oDlg6
oBmp1:bPainted := { |hDC| OnPaint( hDC, ;
"INI-File Settings", oFont1 ) }
ENDIF
NEXT
oFont1:End()
.......
.......
//----------------------------------------------------------------//
STATIC FUNCTION ONPAINT( hDC, cMsg, oFont )
LOCAL hOldFont
hOldFont := SelectObject( hDC, oFont:hFont )
SetBkMode( hDC, TRANSPARENT )
IF nCOLTEXT = 1 .or. e_COLTEXT = 1
SetTextColor( hDC, CLR_WHITE )
ENDIF
IF nCOLTEXT = 2 .or. e_COLTEXT = 2
SetTextColor( hDC, CLR_BLACK )
ENDIF
IF nCOLTEXT = 3 .or. e_COLTEXT = 3
SetTextColor( hDC, CLR_GREEN )
ENDIF
IF nCOLTEXT = 4 .or. e_COLTEXT = 4
SetTextColor( hDC, CLR_BLUE )
ENDIF
IF nCOLTEXT = 5 .or. e_COLTEXT = 5
SetTextColor( hDC, CLR_BROWN )
ENDIF
IF nCOLTEXT = 6 .or. e_COLTEXT = 6
SetTextColor( hDC, CLR_RED )
ENDIF
TextOut( hDC, 10, 70, cMsg )
SelectObject( hDC, hOldFont )
RETURN NIL
Regards
Uwe