I saw bmptxt.prg sample
Howe I can modify the font to insert a big text ?
Falconi Silvio
I saw bmptxt.prg sample
Howe I can modify the font to insert a big text ?
I can't find that sample in latest FWH.
EMG
you must see well !!
CMq I revolve i thanks
I confirm: a file called bmptxt.prg doesn't exists in FWH.
EMG
I have one in my FWH 8.01 sample folder.
Size 558 03-04-1996
Its name is bmptext.prg not bmptxt.prg. That's why I did not find it.
EMG
Silvio wrote:I saw bmptxt.prg sample
Howe I can modify the font to insert a big text ?
Quanto la fai difficile : ti ho detto che ho risolto..!!!
Enrico,
I tried your suggestion but this does not work.
Regards,
Otto
// Placing text on top of a bitmap
static oWnd
//----------------------------------------------------------------//
function Main()
local oBmp, oFntGross
//oFntGross:= ChooseFont()
DEFINE FONT oFntGross NAME "MS Sans Serif" SIZE 10,15 BOLD
DEFINE WINDOW oWnd TITLE "Text on a bitmap"
@ 1, 1 BITMAP oBmp FILENAME "..\bitmaps\fw.bmp" OF oWnd
oBmp:bPainted = { || SetBkMode( oBmp:hDC, TRANSPARENT ),;
TextOut( oBmp:hDC, 15, 15, "Hello",oFntGross ) }
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------//
NO you must this
holdfnt:=selectobject( hdc,ofont:hfont)
and the you can use texout
bye
Silvio, could you provide a working sample.
Thanks in advance
Otto
oBmp:bPainted := { |hDC| OnPaint( hDC, "BOLD TEXT", oFntGross ) }
.......
.......
static function OnPaint( hDC, cMsg, oFont )
local hOldFont
hOldFont := SelectObject( hDC, oFont:hFont )
SetBkMode( hDC, TRANSPARENT )
TextOut( hDC, 5, 5, cMsg )
SelectObject( hDC, hOldFont )
return nilThank you NageswaraRao,
I miss something:
Error description: Error BASE/1004 No exported method: HFONT
Regards,
Otto
// Placing text on top of a bitmap
static oWnd
//----------------------------------------------------------------//
function Main()
Local oBmp, oFont
DEFINE FONT oFont
oFont := ChooseFont()
DEFINE WINDOW oWnd TITLE "Text on a bitmap"
@ 1, 1 BITMAP oBmp FILENAME "..\bitmaps\fw.bmp" OF oWnd
oBmp:bPainted := { |hDC| OnPaint( hDC, "BOLD TEXT", oFont ) }
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------//
static function OnPaint( hDC, cMsg, oFont )
local hOldFont
hOldFont := SelectObject( hDC, oFont:hFont )
SetBkMode( hDC, TRANSPARENT )
TextOut( hDC, 5, 5, cMsg )
SelectObject( hDC, hOldFont )
return nil
Mr Otto
First try with defining the font. like
DEFINE FONT oFntGross NAME "MS Sans Serif" SIZE 10,15 BOLD