No estoy muy ducho en esto de las clases de fivewin aún , pero creo que la cosa quedaria algo asi ( ojo sin probar aún ).
Code: Select all
#include "FiveMac.ch"
//----------------------------------------------------------------------------//
CLASS TBtnBmp FROM TButton
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, bAction, cFileName )
METHOD SetFileName( cFileName ) INLINE If( File( cFileName ), BtnBmpFile( ::hWnd, cFileName ),)
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, bAction, cFileName ) CLASS TBtnBmp
DEFAULT nWidth := 50, nHeight := 50, oWnd := GetWndDefault()
::hWnd = BtnBmpCreate( nTop, nLeft, nWidth, nHeight, oWnd:hWnd )
::oWnd = oWnd
::bAction = bAction
if ! Empty( cFileName )
::SetFileName( cFileName )
endif
oWnd:AddControl( Self )
return Self
//----------------------------------------------------------------------------//