Dear Antonio, Dear Paco,
I add on Vistamenu Class an feature to show an image trasparent at the end of vistamenu window
I take this feature from another class of our Big Friend Paco I have and I think there 's no problems to pubblished it to our community.
I add two DATA
DATA cWatermark
DATA nWTrans
the first is the name of the bitmap, the second is a numeric value to set the transparency of this logo
I add a new method METHOD DrawTraspLogo()
on the Paint method after the line FillSolidRect( hDCMem, rc, ::nClrPane )
I add this commands
if !Empty(::cWatermark )
:: DrawTraspLogo(hDCMem)
ENDIF
I add this method
METHOD DrawTraspLogo(hDCMem) CLASS TVistaMenu
Local hWater,nW,nH,nT,nB,nR
if !Empty(::cWatermark )
hWater := LoadImageEx( ::cWatermark )
if hWater != 0
nW := BmpWidth ( hWater )
nH := BmpHeight( hWater )
nT := ::nHeight - nH-1 -10
nL := ::nWidth - nW-1 -25 //????
nB := nT + nH
nR := nL + nW
DrawAlphaTransparentBitmap( hDCMem, hWater, {nT,nL,nB,nR}, ::nWTrans, RGB(255,0,255) )
DeleteObject( hWater )
endif
endif
return 0
to make a test you must add on .\samples\vistamn1.prg :
oVMenu := TVistaMenu():New( 0,0, 100, 100, oWnd )
oVMenu:nColumns := 2
oVMenu:nType := 2
oVMenu:cWatermark:=".\bitmaps\logo.bmp"
oVMenu:nWTrans :=180
It run ok only when I select a Item on Vistamenu the item not is trasparent when exit the logo at left
VistaMenu new feature
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
VistaMenu new feature
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Andrés González
- Posts: 625
- Joined: Thu Jan 19, 2006 10:45 am
- Location: Mallorca