Buttonbmp and image

Buttonbmp and image

Postby Wanderson » Mon Aug 30, 2010 1:57 am

Hi,

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

Thanks in advance.
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Re: Buttonbmp and image

Postby ukoenig » 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 :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Buttonbmp and image

Postby Wanderson » Tue Aug 31, 2010 4: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 :lol:


Thank you!
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests