FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Buttonbmp and image
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Buttonbmp and image
Posted: Mon Aug 30, 2010 01:57 AM

Hi,

How i can change a bitmap of a buttonbmp in execution time? The bitmap are in resource file.

Thanks in advance.

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Buttonbmp and image
Posted: Mon Aug 30, 2010 11:21 PM
function FromResources()
local oDlg

DEFINE DIALOG oDlg RESOURCE "Test"

REDEFINE BUTTONBMP oBtn1 ID 10 OF oDlg ;
ACTION MsgInfo( "XP themes aware Button Bitmaps" )
oBtn1:LoadBitmap( "Alert" ) // from resource

// Button 2 changes on Action BMP of Button 1
// ----------------------------------------------------
REDEFINE BUTTONBMP oBtn2 ID 20 OF oDlg ;
ACTION ( oBtn1:LoadBitmap( "Arrow" ), oBtn1:Refresh() ) ; // from Resource
BITMAP "..\bitmaps\16x16\garrow.bmp" PROMPT "&Test" TEXTRIGHT // from Disk

ACTIVATE DIALOG oDlg

return nil

Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: Buttonbmp and image
Posted: Tue Aug 31, 2010 04:19 AM
ukoenig wrote:function FromResources()
local oDlg

DEFINE DIALOG oDlg RESOURCE "Test"

REDEFINE BUTTONBMP oBtn1 ID 10 OF oDlg ;
ACTION MsgInfo( "XP themes aware Button Bitmaps" )
oBtn1:LoadBitmap( "Alert" ) // from resource

// Button 2 changes on Action BMP of Button 1
// ----------------------------------------------------
REDEFINE BUTTONBMP oBtn2 ID 20 OF oDlg ;
ACTION ( oBtn1:LoadBitmap( "Arrow" ), oBtn1:Refresh() ) ; // from Resource
BITMAP "..\bitmaps\16x16\garrow.bmp" PROMPT "&Test" TEXTRIGHT // from Disk

ACTIVATE DIALOG oDlg

return nil

Best Regards
Uwe :-)


Thank you!

Continue the discussion