Page 1 of 1

Transparent say over a bitmap

PostPosted: Sun May 10, 2009 7:34 pm
by Otto
I would like to print a TRANSPARENT say over a BITMAP.
Is this possible?
Thanks in advance
Otto



Code: Select all  Expand view
@ 0,0 BITMAP oBmp FILENAME CURDIR() + "\bmp\Clip5.bmp" PIXEL   of oDlg  SIZE 60,38
@ 0,0 say oSaydemo PROMPT cText of oBmp font oFontMedium CENTERED   PIXEL  SIZE 50,12
oSaydemo:SetText(cText)
oSayDemo:refresh()
 

Re: Transparent say over a bitmap

PostPosted: Mon May 11, 2009 12:06 am
by Antonio Linares
Otto,

Use oBmp:Say( ... ) instead of placing a SAY control on top of it.

Re: Transparent say over a bitmap

PostPosted: Mon May 11, 2009 7:56 am
by Otto
Hello Antonio,

thank you for your answer.
I tried yesterday with oBmp:Say before I tried using placing a SAY control on top.

Now as you suggested oBmp:Say I tried again but there are some problems:
I would like to use the oBmp as a kind of pointer to show where I have clicked.

1) I must hide and show the bmp
2) I have to clear the text

Attached I have my test code.
The problem is that you have to click twice to show the bitmap.

And could you please show me how to clear the oBmp:say or how to repaint the bmp without text?

Thanks in advance
Otto


Code: Select all  Expand view
#include "FWCE.ch"

STATIC oBmp
STATIC oPanArt_WG

function Main()
   local oWnd

   DEFINE WINDOW oWnd TITLE "Bmp-Res"
 
 
    @ 5, 24 BITMAP oBmp FILENAME CURDIR() + "\users.bmp" SIZE 80,20 PIXEL   NOBORDER
        oBmp:hide()
 
   
   ACTIVATE WINDOW oWnd ;
      ON CLICK    neu(oWnd)

return nil


function neu(oWnd)
 
 oBmp:Say(0, 0, "*"+time(),   , , , .T., .T. )  
 oBmp:show()
 
return nil