OK THANKS
but How I can make to show a line when the button is pressed and hide the line when the button is released ?
sample :
#include "fivewin.ch"
#include "constant.ch"
#include "wcolors.ch"
STATIC oDlgMain
Function Test()
Local nBottom := 22
Local nRight := 55
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
DEFINE DIALOG oDlgMain ;
TITLE "Slot" ;
SIZE nWidth, nHeight PIXEL ;
STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 )
ACTIVATE DIALOG oDlgMain CENTERED ;
ON INIT (ShowButtonLines())
return nil
//--------------------------------------------------------------------------//
Function ShowButtonLines()
Local ob[5]
Local oFont
local hsize:= 15
local Vsize:= 15
@ 150,10 BTNBMP ob[1] OF oDlgMain ;
SIZE hsize,Vsize ;
PROMPT "1" 2007 ;
FONT oFont BOTTOM ;
ACTION DRAWBOX( hDC, 160, 30, 160, 320, CLR_HRED,1 )
ob[1]:lEllipse = .T.
return nil
//-------------------------------------------------------------------------------------------------//
STATIC FUNCTION DRAWBOX( hDC, nTop, nLeft, nBottom, nRight, nColor,nTipo )
LOCAL hPen := CREATEPEN( PS_SOLID, 4, nColor )
LOCAL hOldPen := SELECTOBJECT( hDC, hPen )
do case
case nTipo = 1
MOVETO( hDC, nLeft, nTop )
LINETO( hDC, nRight, nTop )
case nTipo = 2
MOVETO( hDC, nRight, nBottom )
LINETO( hDC,nBottom, nRight )
case nTipo = 3
MOVETO( hDC,nLeft, nTop)
LINETO( hDC, nBottom, nRight )
endcase
SELECTOBJECT( hDC, hOldPen )
DELETEOBJECT( hPen )
RETURN NIL
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com