Hi,
I have background bitmap on main app window like this :
oBitmap:=DC_GetBitmap("Raukn3.jpg",,,,{aSize[1]*0.99,(aSize[2]*0.89)-(8.5*fontnv)+6})
DCGETOPTIONS ;
BITMAP oBitmap ;
ICON ICON_EXPRESS ;
FONT fontnt ;
EVAL { || SetAppWindow(oMenuBarh), ;
oTimer1 := DC_SetTimerEvent():new( 200,{ || _UpdateStats(GetList) } )}
DCREAD GUI SETAPPWINDOW ;
TITLE "RAUKN Win"+verzia ;
OPTIONS GetOptions
When I want load big button to this place, and use DCPUSHBUTTON rounded border it is not ok, because on button place stay blank space with square corners. This look as first delete rectangle area and then load button. When button is rectangle it is ok, but when rounded then stay little pieces without bitmap area.
Because this I want swith off background bitmap when activate buttons and when close buttons , again load bitmap
How can I switch on/off loaded bitmap ?
Can I use some code block for BITMAP oBitmap ; ? to switching this ?
Bitmap switch on/off
Re: Bitmap switch on/off
Hi, Victorio.
If you post source-code, please use the "Code"-tag to highlight it. It's much better readable then.
Try something like this:
If you post source-code, please use the "Code"-tag to highlight it. It's much better readable then.
Try something like this:
Code: Select all
FUNCTION ChangeBitmap(oDlg,cBitmap)
IF !Empty(cBitmap)
oDlg:DrawingArea:options := XBP_IMAGE_SCALED
oDlg:DrawingArea:SizeRedraw := .T.
oDlg:DrawingArea:bitmap := DC_GetBitmap(cBitmap)
ELSE
oDlg:DrawingArea:bitmap := NIL
ENDIF
oDlg:DrawingArea:Configure()
RETURN NIL
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Bitmap switch on/off
I did not recognize these controls, in future I will use it ...
Thank for advice Tom.
Victorio
Thank for advice Tom.
Victorio
Re: Bitmap switch on/off
hi,
i think XPPUSHBUTTON use CreateEllipticRgn() / SetWindowRgn() which should work.
i think DCPUSHBUTTON use GRAEDGE() for round Corner which does not meet your Backgound Bitmap.Victorio wrote:When I want load big button to this place, and use DCPUSHBUTTON rounded border it is not ok, because on button place stay blank space with square corners. This look as first delete rectangle area and then load button. When button is rectangle it is ok, but when rounded then stay little pieces without bitmap area.
i think XPPUSHBUTTON use CreateEllipticRgn() / SetWindowRgn() which should work.
greetings by OHR
Jimmy
Jimmy
Re: Bitmap switch on/off
Hello
I have been using this function for years and it works very well for me
FUNCTION ChangeBitmap( oDlg, cBitMap )
local oPS, oImage
DC_PointerWait( )
if ValType(oDlg) = "O"
oDlg:lockUpdate(.T.)
oDlg:options := XBP_IMAGE_SCALED
oDlg:SizeRedraw := .T.
oDlg:bitmap := DC_GetBitmap(cBitMap)
oDlg:configure( ):invalidateRect( )
oDlg:LockUpdate(.F.)
END if
return DC_PointerArrow( )
I have been using this function for years and it works very well for me
FUNCTION ChangeBitmap( oDlg, cBitMap )
local oPS, oImage
DC_PointerWait( )
if ValType(oDlg) = "O"
oDlg:lockUpdate(.T.)
oDlg:options := XBP_IMAGE_SCALED
oDlg:SizeRedraw := .T.
oDlg:bitmap := DC_GetBitmap(cBitMap)
oDlg:configure( ):invalidateRect( )
oDlg:LockUpdate(.F.)
END if
return DC_PointerArrow( )
Victorio wrote:I did not recognize these controls, in future I will use it ...
Thank for advice Tom.
Victorio
Nolberto Paulino
Regards
Regards
Re: Bitmap switch on/off
thanks to all of you,
I must try it.
Victorio
I must try it.
Victorio