if ! Empty( ::cCaption )
DEFAULT ::nLayOut := 1
do case
...
...
case ::nLayOut == 2 // left
nTxtTop := ::nHeight / 2 - ( ::nGetChrHeight() * nLine ) / 2
if ::lAdjust
nTxtLeft := 4
else
if !empty( hBmp )
nTxtLeft := nBmpLeft + nBmpWidth + 4
nLayOut := 4
else
nTxtLeft := 4
endif
endif
...
...
function TryThis()
local oDlg, oFont, oBtn, oBrush
DEFINE BRUSH oBrush FILE "penguins.jpg" RESIZE // use any jpg
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-20 BOLD
DEFINE DIALOG oDlg SIZE 500,400 PIXEL BRUSH oBrush
@ 60,30 BTNBMP oBtn SIZE 200,20 PIXEL OF oDlg TRANSPARENT
oBtn:bPainted := { || oBtn:Say( 4,10,"Button Prompt", CLR_YELLOW, nil, oFont, .t., .t. ) }
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RELEASE BRUSH oBrush
return nil
Is BTNBMP.prg from directory /source different to the compiled release ( libs ) ?
#include "fivewin.ch"
STATIC c_path, c_path1
FUNCTION MAIN()
local oDlg, oFont, oBtn, oBrush
SETBALLOON( .T. )
c_path := cFilePath(GetModuleFileName( GetInstance() ) )
c_path1 := c_Path + "BITMAPS\"
DEFINE BRUSH oBrush FILE c_path1 + "Picture3.jpg" RESIZE // use any jpg
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-20 BOLD
DEFINE DIALOG oDlg SIZE 500,400 PIXEL BRUSH oBrush TITLE " FiveWin Version: " + FWVERSION
@ 60,30 BTNBMP oBtn SIZE 200,20 PIXEL OF oDlg TRANSPARENT
oBtn:bPainted := { || oBtn:Say( 4,10,"Button Prompt", CLR_YELLOW, nil, oFont, .t., .t. ) }
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RELEASE BRUSH oBrush
RETURN NIL
METHOD PaintCaption() CLASS TBtnBmp
..
..
if ! Empty( ::cCaption )
If ::nLayOut == LAYOUT_LEFT
nStyle := DT_LEFT + DT_WORDBREAK + DT_TOP
elseif ::nLayOut == LAYOUT_RIGHT
nStyle := DT_RIGHT + DT_WORDBREAK + DT_TOP
endif
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot], Willi Quintana and 17 guests