FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Buttonbar disabled, if painting on BMP-background ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Buttonbar disabled, if painting on BMP-background ?
Posted: Tue Oct 28, 2008 11:36 AM
Hello,

I noticed :

If using a full-screen BMP as background ( resized to screen-resolution )
and painting a Buttonbar on top,
the Buttonbar is disabled, because of the BMP behind.



before :

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( MAKEBAR1( oWnd ) ) ;
ON PAINT SHOW_PIC0( oWnd )

// ----------------------------------------------

FUNCTION MAKEBAR1( oWnd )
LOCAL oBar1, oBtn1, oBtn2

DEFINE BUTTONBAR oBar1 OF oWnd SIZE 80, 67 2007 RIGHT 

DEFINE BUTTON oBtn1 OF oBar1 ACTION ( Tools1(oWnd) ) ;
RESOURCE "gear" PROMPT "Windows"  TOOLTIP "Windows and Dialog" 

DEFINE BUTTON oBtn2 OF oBar1 ACTION ( Tools2(oWnd) ) ;
RESOURCE "gear" PROMPT "xBrowse"  TOOLTIP "xBrowse" 

RETURN( NIL )

// ------ Full screen Background ( with Buttonbar on Top ) ------------

FUNCTION  SHOW_PIC0( oWnd )
LOCAL oImage1
LOCAL aRect := GETCLIENTRECT( oWnd:hWnd )

@ 0, 0 IMAGE oImage1 SIZE aRect[4], aRect[3] OF oWnd  ADJUST
oImage1:LoadBmp( "BRAINSTORM.BMP" )

RETURN( NIL )


If I reduce the BMP-width it works.
I had to change the line :

@ 0, 0 IMAGE oImage1 SIZE aRect[4] -80, aRect[3] OF oWnd  ADJUST


BMP-width = aRect[4]-80 ( - Buttonbar-width )

Why the Buttonbar is disabled on TOP of the Background-BMP
using the full screen-size ?

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: 445
Joined: Thu Feb 21, 2008 11:58 AM
Buttonbar disabled, if painting on BMP-background ?
Posted: Tue Oct 28, 2008 11:56 AM
Uwe,

In our system, we using into "on resize" method.

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT ( MAKEBAR1( oWnd ) ) ;
ON RESIZE SHOW_PIC0( oWnd )

// ----------------------------------------------

FUNCTION MAKEBAR1( oWnd )
LOCAL oBar1, oBtn1, oBtn2

DEFINE BUTTONBAR oBar1 OF oWnd SIZE 80, 67 2007 RIGHT

DEFINE BUTTON oBtn1 OF oBar1 ACTION ( Tools1(oWnd) ) ;
RESOURCE "gear" PROMPT "Windows"  TOOLTIP "Windows and Dialog"

DEFINE BUTTON oBtn2 OF oBar1 ACTION ( Tools2(oWnd) ) ;
RESOURCE "gear" PROMPT "xBrowse"  TOOLTIP "xBrowse"

RETURN( NIL )

// ------ Full screen Background ( with Buttonbar on Top ) ------------

FUNCTION  SHOW_PIC0( oWnd )
LOCAL oImage1
LOCAL aRect := GETCLIENTRECT( oWnd:hWnd )

@ 0, 0 IMAGE oImage1 SIZE aRect[4], aRect[3] OF oWnd  ADJUST
oImage1:LoadBmp( "BRAINSTORM.BMP" )

RETURN( NIL )
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Buttonbar
Posted: Tue Oct 28, 2008 12:14 PM

Hello JC,

I changed : ON PAINT in RESIZE
The same : the Buttonbar is disabled.

If i reduce the Background-BMP-width ( - Buttonbar-width ) it is OK.

I want the Background adjusted to the screen resolution.

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.
Posts: 445
Joined: Thu Feb 21, 2008 11:58 AM
Buttonbar disabled, if painting on BMP-background ?
Posted: Tue Oct 28, 2008 12:26 PM
Uwe,

This my source code into ON RESIZE method:
oBitmap := TBitmap():new( 0, 0, oWnd:getCliRect():nRight, oWnd:getCliRect():nBottom,,, .T., oWnd )

WITH OBJECT aSIS_DadosSistema["objeto_background"]

         :lStretch := .T.
         :setBMP( "RES_IMAGEM_NAME" )
         :center()
         :refresh( .T. )

END
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9

Continue the discussion