James,
FWH uses a Windows standard control ("static") for the SAYs. This way standard static controls can be used from the resources editors.
I guess that TSSay implements a user defined control to solve those limitations.
James Bott wrote:Uwe,
>Like Antonio told you : You have to use ONPAINT, to solve your problem.
I think what JC is saying is that the 3rd-party product, sensitive SAY, does work without being called from ON PAINT, so it is techinically possible. He hopes that Antonio can achive the same with the native FW SAY. I hope so too.
James
#include "FiveWin.ch"
function Main()
local oDlg, oBmp, oFont
DEFINE FONT oFont NAME "Verdana" SIZE 0, -16 BOLD
DEFINE DIALOG oDlg RESOURCE "Test" COLOR "N/B"
REDEFINE BITMAP oBmp ID 100 OF oDlg FILENAME "test.bmp"
oBmp:bPainted = { | hDC | oBmp:Say( 12, 20, "Cadastro Plano de Contas",,, oFont, .T., .T. ) }
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
return nil
test DIALOG 98, 55, 185, 147
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
{
CONTROL "", 100, "TBitmap", 0 | WS_CHILD | WS_VISIBLE, 0, -1, 185, 29
DEFPUSHBUTTON "OK", 1, 67, 128, 50, 14
}
FUNCTION aplImage( oDlg, nId, cResNome, lTransparente, lStretch, cLabel )
LOCAL oBitmap
DEFAULT lTransparente := .F. , ;
cResNome := "IMG_BARRA_TOP", ;
nId := 100 , ;
lStretch := .F. , ;
cLabel := NIL
oBitmap := TBitmap():redefine( nId, cResNome,, oDlg,,,, lStretch,,,,,, lTransparente )
IF !empty( cLabel )
oBitmap:bPainted = {|hDC| oBitmap:say( 12, 20, cLabel,,, TFont():new( "Tahoma", 0, 25,, .T. ), .T., .T. ) }
ENDIF
RETURN( oBitmap )
FUNCTION aplImage( oDlg, nId, cResNome, lTransparente, lStretch, cLabel )
LOCAL oBitmap
static oFont
DEFAULT lTransparente := .F. , ;
cResNome := "IMG_BARRA_TOP", ;
nId := 100 , ;
lStretch := .F. , ;
cLabel := NIL
oBitmap := TBitmap():redefine( nId, cResNome,, oDlg,,,, lStretch,,,,,, lTransparente )
IF ! Empty( cLabel )
if oFont == nil
oFont = TFont():new( "Tahoma", 0, 25,, .T. )
endif
oBitmap:bPainted = {|hDC| oBitmap:Say( 12, 20, cLabel,,, oFont, .T., .T. ) }
ENDIF
RETURN oBitmap
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Danielmaximiliano, Google [Bot] and 51 guests