How to create a <spec.> Buttonbar 9.04 ( Symbols included )

How to create a <spec.> Buttonbar 9.04 ( Symbols included )

Postby ukoenig » Fri May 22, 2009 6:47 pm

Hello,

the answer to Rick for the bar-design ( some calculations needed ) :
The Buttonbar uses Alpha-Blended BMP's !!!

Image

Code: Select all  Expand view

...
...
DEFINE WINDOW oWnd TITLE "A new Buttonbar"  MDI  MENU TMenu():New()  

SET MESSAGE OF oWnd TO "A new Buttonbar" ;
CENTERED CLOCK KEYBOARD 2007

@ 0, 0 IMAGE oImage SIZE 150, 150 OF oWnd ADJUST
oImage:Progress( .f. )
oImage:LoadBmp( "BACKGROUND.JPG" )

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON INIT B_BAR() ;  
ON PAINT ( DRAWBITMAP( hdc, oImage:hbitmap, 0, 0, ;
                    oWnd:nWidth(), oWnd:nHeight() ) )

RETURN NIL

// ------- You can add Prompts if You like -----------------------

FUNCTION B_BAR()
LOCAL oDlg, oBtn50, oBtn51, oBtn52, oBtn53, oBtn54
LOCAL nWidth := GetSysMetrics(0), nHeight := GetSysMetrics(1)
LOCAL nTop := GetSysMetrics(30)

nStyle = nOR( WS_OVERLAPPED | WS_VISIBLE )

DEFINE DIALOG oDlg FROM 0, 0  TO 100, 100 OF oWnd STYLE nSTYLE PIXEL TRANSPARENT

@ 0, 0 BTNBMP oBtn50 OF oDlg ;
SIZE 32 , 40  ;
FONT oBTFont1 TOP FILENAME "A_Write.bmp" ;  
NOBORDER ;
ACTION  ( Tools(oWnd) )  
oBtn50:lTransparent = .T.
oBtn50:cTooltip := "Background" + CRLF + "Edit"

@ 40, 0 BTNBMP oBtn51 OF oDlg ;
SIZE 32 , 40  ;
FONT oBTFont1 TOP FILENAME "A_Write.bmp" ;
NOBORDER ;
ACTION MAKE_EXE()  
oBtn51:lTransparent := .T.
oBtn51:cTooltip := "New EXE-File"

@ 80, 0 BTNBMP oBtn52 OF oDlg ;
SIZE 32 , 40  ;
FONT oBTFont1 TOP FILENAME "A_Image.bmp" ;
NOBORDER ;
ACTION MsgInfo("Hello")
oBtn52:lTransparent := .T.
oBtn52:cTooltip := "Background" + CRLF + "Edit"

@ 120, 0 BTNBMP oBtn53 OF oDlg ;
SIZE 32 , 40  ;
FONT oBTFont1 TOP FILENAME "A_Help.bmp" ;
NOBORDER ;
ACTION  IIF( FILE( "BackgrdHelp.exe" ), Winexec("BackgrdHelp.exe"), ;
                      MsgAlert( "No HelpFile : BackgrdHelp.exe", "Error" ) )
oBtn53:lTransparent := .T.
oBtn53:cTooltip := "Help" + CRLF + "Edit"

@ 160, 0 BTNBMP oBtn54 OF oDlg ;
SIZE 32 , 40  ;
FONT oBTFont1 TOP FILENAME "A_Stop.bmp" ;
NOBORDER ;
ACTION oWnd:End()
oBtn54:lTransparent := .T.
oBtn54:cTooltip := "Quit"

ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
ON INIT oDlg:Move( 20, nWidth - 65, 70, nHeight - 75, .f. ) ;
ON PAINT ( GRADBAR( hDC, oDlg ), ;
                GradientBrush( oDlg, { { 0.1, 10389063, 16777215 },{ 0.1, 16777215, 10389063 } }, .F. ) )

RETURN( NIL )

// ------- Fills the Buttons with Gradient-Background ----------
// ------ otherwise the Buttons are displayed with a white Color --

FUNCTION GradientBrush( oDlg, aColors , lDir)
local hDC, hBmp, hBmpOld , nWidth , nHeight

DEFAULT lDir := .T.
if Empty( oDlg:oBrush:hBitmap )
      nHeight := if(lDir,oDlg:nHeight,1)
      nWidth  := if(lDir,1,oDlg:nWidth)
      hDC = CreateCompatibleDC( oDlg:GetDC() )
      hBmp = CreateCompatibleBitMap( oDlg:hDC, nWidth, nHeight )
      hBmpOld = SelectObject( hDC, hBmp )
      GradientFill( hDC, 0, 0, nHeight, nWidth, aColors,lDir )
      DeleteObject( oDlg:oBrush:hBrush )
      oDlg:oBrush:hBitmap = hBmp
      oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )
      SelectObject( hDC, hBmpOld )
      oDlg:ReleaseDC()
endif

RETURN NIL

// ---------- Fills the Bar with Gradient ---------------------

STATIC FUNCTION GRADBAR( hDC, oDlg )
local aGrad := { { 0.1, 10389063, 16777215 },{ 0.1, 16777215, 10389063 } }
GradientFill( hDC,  0, 0, oDlg:nHeight + 10, oDlg:nWidth, aGrad, .F. )

RETURN NIL
 


Regards
Uwe :lol:
Last edited by ukoenig on Mon May 25, 2009 2:06 pm, edited 9 times in total.
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: A < special > Buttonbar ( code included )

Postby Rick Lipkin » Fri May 22, 2009 6:53 pm

Uwe

Did not see a link to download your new tool ?? :(

Rick
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: A < special > Buttonbar only 9.04 ( code included )

Postby ukoenig » Fri May 22, 2009 7:08 pm

Rick,

the new post is just the answer of Your question.
Just to show, how to do it ( no tool ).

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: How to create a <special> Buttonbar (9.04 / code included)

Postby Rick Lipkin » Fri May 22, 2009 8:54 pm

Uwe

I have successfully re-created your gradient Bar .. very nice... trying to put a PROMPT ..
Code: Select all  Expand view


@ 0, 0 BTNBMP oBTN1 RESOURCE "STATS" ;
  SIZE 32,40 adjust  ;
  NOBORDER ;
  PROMPT "Data Entry" BOTTOM of oDLG  ;
  ACTION Msginfo( "test" )

 


and the caption "Data Entry" does not show up ?? Just curious if you can confirm that ??

Thanks
Rick
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: How to create a <special> Buttonbar (9.04 / code included)

Postby Daniel Garcia-Gil » Fri May 22, 2009 9:23 pm

Hello Rick...

Try with "Data"+CRLF+"Entry"
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: How to create a <special> Buttonbar (9.04 / code included)

Postby ukoenig » Fri May 22, 2009 9:32 pm

Hello Rick,

it works fine here :

Image

Like Daniel told You ( maybe the text doesn't fit the Button-size )
With this Buttonbar, You can work with different button-sizes, that is not
possible using the normal Buttonbar.
A button with 2 Textlines can be higher than a button with just 1 Line.
I think even Buttons next each other ( 2 in 1 line ) can be done like

Button1
Button2 Button3 ( 2 small ones )
Button4

Code: Select all  Expand view

@ 40, 0 BTNBMP oBtn51 OF oDlg ;
SIZE 32 , 40  PROMPT "Create" + CRLF + "EXE-File" ;  //  2007 ;
FONT oBTFont1 TOP FILENAME "A_Write.bmp" ; // RESOURCE "magic" ;
NOBORDER ;
ACTION MAKE_EXE()  
oBtn51:lTransparent := .T.
oBtn51:cTooltip := "New EXE-File"
 


Regards
Uwe :lol:
Last edited by ukoenig on Fri May 22, 2009 9:42 pm, edited 1 time in total.
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: How to create a <special> Buttonbar (9.04 / code included)

Postby Rick Lipkin » Fri May 22, 2009 9:39 pm

Daniel

It seems that BOTTOM is the culpret .. if I substitute CENTER :

Code: Select all  Expand view

cSAY := "PCAS"+chr(10)
cSAY += "Data Entry"+chr(10)

@ 0, 0 BTNBMP oBTN1 RESOURCE "STATS" ;
  SIZE 32,40 adjust  ;
  NOBORDER ;
  PROMPT cSAY CENTER of oDLG  ;
  ACTION ( _calendar( DATE(),oWND ))
 


It works ..

I also toyed with a transparent say :

Code: Select all  Expand view

cSAY := "PCAS"+chr(10)
cSAY += "Data Entry"+chr(10)

  @ 2.5, 0 SAY cSAY OF oDlg COLOR "N/N"
         oDlg:aControls[ 2 ]:lTransparent = .t.
 


and the SAY worked alright .. but I think many people would be confused by the SAY and try to click on the caption
.. gona have to play with it some over the weekend ..

Many thanks !!

Rick
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: How to create a <special> Buttonbar (9.04 / code included)

Postby ukoenig » Fri May 22, 2009 10:14 pm

Hello Rick,

some more tests.
Inside the bar, You can do what You like.
Any Control : browser, radio's, checkboxes....
Buttons with different fonts and sizes and much more.

Image

Resizing the Bar :
Code: Select all  Expand view

ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
ON INIT oDlg:Move( 20, nWidth - 120, 140, nHeight - 75, .f. ) ;
ON PAINT ( GRADBAR( hDC, oDlg ), ;
GradientBrush( oDlg, { { 0.1, 10389063, 16777215 },{ 0.1, 16777215, 10389063 } }, .F. ) )
 

Best Regards
Uwe :lol:
Last edited by ukoenig on Fri May 22, 2009 10:26 pm, edited 2 times in total.
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: How to create a <special> Buttonbar (9.04 / code included)

Postby Rick Lipkin » Fri May 22, 2009 10:24 pm

Uwe

An unexpected side effect .. when I now put some code behind the buttons .. all my windows\dialogs shift to the vertical gradient and try to center themselves in the gradient dialog ..

Trying to work thru that .. any ideas ??

Rick
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: How to create a <special> Buttonbar (9.04 / code included)

Postby ukoenig » Fri May 22, 2009 10:36 pm

Hello Rick,

I changed all my applications, to use this bar.
There is no problem, to start any action.
This effect I haven't noticed.

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: How to create a <special> Buttonbar (9.04 / code included)

Postby Rick Lipkin » Fri May 22, 2009 11:12 pm

Uwe

I had to do an ON INIT ( oDLG:Move( 60, 15 )) .. to get my dialog's to line up with the MDI frame ..

Rick
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: How to create a <special> Buttonbar (9.04 / code included)

Postby ukoenig » Sat May 23, 2009 12:21 am

Hallo Rick,

It works fine, but I have done some small changes like
adjustment of the Bar, und changed the 2. oDlg in oDlg1 ( double define )

Static FUNC _utilmenu( oDlg, oBtn_1 )
LOCAL oWndChild, oDlg1, oBtn1, oBTN2, oBTN3, oBTN4, oBTN5, oBTN6
...
...
DEFINE DIALOG oDlg1 RESOURCE "UTILMENU" ; // OF oWndChild ;
TITLE "Utility Menu"


The bar now fits exactly the space between top and bottom.
ON INIT oDlg:Move( 40, nWidth - 65, 70, nHeight - 95, .f. ) ;

oBtn1 changed to oBtn_1

Code: Select all  Expand view

#INCLUDE "FIVEWIN.CH"

STATIC  oWInd                 // main mdi window
STATIC  oBmap                 // mdi window .bmp
STATIC  lExitPgm := .F.
STATIC xMESSAGE

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

FUNC MAIN()

LOCAL cDEFA,nLEN,cFILE,cRIGHTS,SAYING,mSTART,aDIR,cRDD
LOCAL cREAD,cWRITE,cSUPER,cOLDDEFA,cADMIN
LOCAL nPOS,cLOGIN,dEXE
LOCAL nYEAR,nSCR1,nSCR2,aVER
LOCAL oICO, oRs, cSQL, oErr, cPROG
LOCAL lOK, oDLG, cINIFILE, cERR
LOCAL TEXT_EOF, BYTES_READ,cTEXT,nHANDLE
LOCAL oSAY, cSAY

PUBLIC xVOL := "C:", xREAD,xWRITE,xLOGIN,xSUPER,xADMIN
PUBLIC xPROVIDER, xSOURCE, xCATALOG, xUSERID, xPASSWORD, xPROGID
PUBLIC xTABLE, xHOLD_TABLE, xQUE_TABLE

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

PARAMETERS xTEXT

REQUEST DBFCDX
rddsetdefault ( "DBFCDX" )

xREAD   := " "
xWRITE  := " "
xLOGIN  := " "
xSUPER  := " "
xPROGID := " "
xADMIN  := " "

xPROVIDER := "SQLOLEDB"
*xSOURCE   := "MSSQL01"
xSOURCE   := "LWMWEBDB01"
xCATALOG  := "PCAS"
xUSERID   := "pcasuser"
xPASSWORD := "pcas"

nSCR1 := GetSysMetrics(0)
nSCR2 := GetSysMetrics(1)

//-- get timestamp on .exe //

cFILE := GetModuleFileName( GetInstance() )
aDIR  := DIRECTORY( cFILE )
dEXE  := aDIR[1] [3]

// where .exe started from is default directory //

mSTART := RAT( "\", cFILE )
cDEFA  := SUBSTR(cFILE,1,mSTART-1)

aDIR := NIL

SET DEFA to ( cDEFA )
cOLDDEFA := cDEFA

cRDD := xPROVIDER+"
on "+xSOURCE+" 32 bit -b x86"

SET DELETED on
SET CENTURY on
SET 3DLOOK on

nYEAR := ( year( DATE() )-5 )
SET EPOCH to ( nYEAR )

// test for TEXT mode /NL      for no logo

IF EMPTY( xTEXT )
   xTEXT := "
"
ENDIF

xTEXT := ALLTRIM( UPPER(xTEXT))


xLOGIN := WNetGetUser()      // FiveWin function
xLOGIN := UPPER( xLOGIN )
xLOGIN := xLOGIN+SPACE(8)
xLOGIN := SUBSTR(xLOGIN,1,8)


xWRITE := 'Y'
xSUPER := 'Y'
xADMIN := 'Y'

cRIGHTS := _Rights()

//----- main menu -------//

xMESSAGE :=  "
User  "+xLOGIN+"    Rights  "+cRIGHTS+        ;
      "
    Default= "+cDEFA+"      Rdd= "+cRDD+            ;
      "
    Revision  "+DTOC(dEXE)+;
      "
 -r"+str(nSCR1,4)+" x "+STR(nSCR2,4)

*DEFINE ICON oICO RESOURCE "
COUPLE"

DEFINE WINDOW oWind                                          ;
   FROM 0,2 to 28,78                                         ;
   TITLE "
PCAS Time and Data entry Program"                  ;
   MENU BuildMenu(); //cOLDDEFA,dEXE,cRDD,nSCR1,nSCR2,oWind)      ;
   MDI

  DEFINE BITMAP oBMAP FILENAME (cOLDDEFA+"
\PCAS.BMP") of oWind

SET MESSAGE OF oWind                                          ;
   to xMESSAGE CLOCK


ACTIVATE WINDOW oWind                                         ;
   MAXIMIZED ;
   ON PAINT ( _BackGround( hDC, oBmap, nSCR1, nSCR2, oWind, xTEXT ) );
   ON INIT ( _Bar( oWind ) ) ;
   VALID ( IF( !lExitPgm, ExitPgm( .T. ) , .F. ) )

RETURN( NIL )

//--------------------------
Static Func _BackGround( hDC, oBmap, nSCR1, nSCR2, oWind, xTEXT )

IF xTEXT = "
/NL"
ELSE
   PalBmpDraw( hDC, 0,0, oBMAP:hBitmap, oBMAP:hPalette, nSCR1, nSCR2 )
ENDIF

RETURN(NIL)

//--------------------------
Static Func _Bar( oWnd )

LOCAL aGRAD, oDLG, oBTN_1, oBTN2, oSAY, cSAY
LOCAL nWIDTH, nHEIGHT, nTOP

nWidth  := GetSysMetrics(0)
nHeight := GetSysMetrics(1)
nTop    := GetSysMetrics(30)

cSAY := "
PCAS"+chr(10)
cSAY += "
Data Entry"+chr(10)

DEFINE DIALOG oDLG ;
       FROM 0,0 to 100,100 of oWnd ;
       STYLE nOR( WS_OVERLAPPED | WS_VISIBLE ) PIXEL TRANSPARENT

@ 20, 0 BTNBMP oBTN_1 RESOURCE "
STATS" ;
  SIZE 32,40 adjust  ;
  NOBORDER ;
  PROMPT cSAY CENTER of oDLG  ;
  ACTION ( oBTN_1:Hide(), _Utilmenu(oDlg, oBTN_1 ))

*  ACTION ( _calendar( DATE(),oWND, oBTN1 ))

  oBtn_1:lTransparent = .T.
  oBtn_1:cTooltip := "
PCAS Data Entry"

  cSAY := "
PCAS"+chr(10)
  cSAY += "
Data Entry"+chr(10)

*  @ 2.5, 0 SAY cSAY OF oDlg COLOR "
N/N"
*         oDlg:aControls[ 2 ]:lTransparent = .t.

*aGrad :=  { { 0.1, 10389063, 16777215 },{ 0.1, 16777215, 10389063 } }  // blue
 aGRAD := {{ 1.0, 16777215,7518392},{ 1.00, 7518392, 16777215 }}   // yellow


*  @ 5,0 BUTTON oBTN2 PROMPT "
Test" of oDLG ;
*  SIZE 32,40 ;
*  ACTION MsgInfo( "
test" )


ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
         ON INIT oDlg:Move( 40, nWidth - 65, 70, nHeight - 95, .f. ) ;
         ON PAINT ( GRADBAR( hDC, oDlg ), ;
            GradientBrush( oDlg, aGrad, .F. ) )

RETURN( NIL )

// ------- Fills the Buttons with Gradient-Background ----------
// ------ otherwise the Buttons are displayed with a white Color --

Static FUNCTION GradientBrush( oDlg, aColors , lDir)

local hDC, hBmp, hBmpOld , nWidth , nHeight

DEFAULT lDir := .T.
if Empty( oDlg:oBrush:hBitmap )
      nHeight := if(lDir,oDlg:nHeight,1)
      nWidth  := if(lDir,1,oDlg:nWidth)
      hDC = CreateCompatibleDC( oDlg:GetDC() )
      hBmp = CreateCompatibleBitMap( oDlg:hDC, nWidth, nHeight )
      hBmpOld = SelectObject( hDC, hBmp )
      GradientFill( hDC, 0, 0, nHeight, nWidth, aColors,lDir )
      DeleteObject( oDlg:oBrush:hBrush )
      oDlg:oBrush:hBitmap = hBmp
      oDlg:oBrush:hBrush = CreatePatternBrush( hBmp )
      SelectObject( hDC, hBmpOld )
      oDlg:ReleaseDC()
endif

RETURN NIL

// ---------- Fills the Bar with Gradient ---------------------

STATIC FUNCTION GRADBAR( hDC, oDlg )

local aGrad

*aGrad :=  { { 0.1, 10389063, 16777215 },{ 0.1, 16777215, 10389063 } }  // blue
aGRAD := {{ 1.0, 16777215,7518392},{ 1.00, 7518392, 16777215 }}

GradientFill( hDC,  0, 0, oDlg:nHeight + 10, oDlg:nWidth, aGrad, .F. )  // yellow

RETURN NIL

//
ACTIVATE WINDOW oWind                                         ;
   MAXIMIZED ;
   ON PAINT ( IF( xTEXT = "
/NL", ,PalBmpDraw( hDC, 0,0, oBMAP:hBitmap, oBMAP:hPalette, nSCR1, nSCR2 )));
   ON INIT ( IF( xTEXT = "
/NL", , MSGLOGO( cDEFA+"\SPLASH.BMP",2 )),               ;
             oWIND:Select(),  oWIND:Refresh() )               ;
   VALID ( IIF( !lExitPgm, ExitPgm( .T. ) , .F. ))

RETURN( NIL )

//---------------------------
Static Func _Rights()

LOCAL cREAD,cWRITE,cSUPER,cADMIN,cRIGHTS

STORE "
" to cWRITE,cSUPER,cADMIN

cREAD := "
R"

IF xWRITE = 'Y'
   cWRITE := "
W"
ENDIF
IF xSUPER = "
Y"
   cSUPER := "
S"
ENDIF
IF xADMIN = "
Y"
   cADMIN := "
A"
ENDIF

IF cWRITE = "
" .and. cSUPER = " " .and. cADMIN = " "
   cRIGHTS := "
(READ)"
ELSE
   cRIGHTS := "
("+cREAD+cWRITE+cSUPER+cADMIN+")"
ENDIF

RETURN( cRIGHTS )

//--------------------------//
Static FUNC BuildMenu() // cOLDDEFA, dEXE, cRDD,nSCR1,nSCR2,oWnd )

LOCAL oMenu, cRIGHTS, cDEFA

cDEFA := SET(7)

MENU oMenu

      MENUITEM "
             "

      /*
      MENUITEM "
&Pcas Data Entry ..."                ;
            ACTION Msginfo( "
Menu 1")                ;
            MESSAGE "
PCAS Data Entry"

      MENUITEM "
&Reports ..."                        ;
            ACTION( _Rptmenu( oWnd ))                ;
           MESSAGE "
Report Menu"

      MENUITEM "
&Utilities..."                       ;
            ACTION(  _UTILmenu( oWnd ) )             ;
            MESSAGE "
Utilities Programs"

      MENUITEM "
&Coordinator.."                      ;
            ACTION Msginfo( "
Menu 4")                ;
            MESSAGE "
Coordinators Menu"

      MENUITEM "
&Login Diff User .."                 ;
             ACTION Msginfo( "
Menu 5")               ;
             MESSAGE "
Login as a different User"

      MENUITEM "
&Intranet PCAS Manual .."            ;
            ACTION Msginfo( "
Menu 6")                ;
            MESSAGE "
PCAS Help on the DHECNET"

      MENUITEM "
&Quit"                               ;
            ACTION oWiND:END()                       ;
            MESSAGE "
End this Program"
      */

ENDMENU

RETURN( oMenu )

//-----------------------
Static FUNCTION ExitPgm( lCLEAN )

IF lCLEAN = .T.
   lExitPgm := .T.
   SET RESOURCES to
   SysReFresh()
ENDIF

RETURN( lExitPgm )


//----------------------------------
Static FUNC _utilmenu( oDlg, oBtn_1 )

LOCAL oWndChild, oDlg1, oBtn1, oBTN2, oBTN3, oBTN4, oBTN5, oBTN6
LOCAL oBTN7, oBTN8, oICO, aGrad

aGrad := { { 1.0, 16777215, nRGB(4,53,107) },{ 1.0, nRGB(4,53,107), 16777215 } }


   DEFINE DIALOG oDlg1 RESOURCE "
UTILMENU" ; // OF oWndChild ;
          TITLE "
Utility Menu"            

   REDEFINE BUTTON oBtn1 ID 101 OF oDlg1   ;
      ACTION ( Msginfo( "
Indexing not required for SQL" ))

   REDEFINE BUTTON oBtn2 ID 102 OF oDlg1   ;
      ACTION ( MsgInfo( "
Menu 2" )) // , _UtilBrow( oWnd ) )

   REDEFINE BUTTON oBtn3 ID 103 OF oDlg1   ;
      ACTION ( MsgInfo( "
Menu 3" )) //,_empbrow( oWnd ) )

   REDEFINE BUTTON oBtn4 ID 104 OF oDlg1   ;
      ACTION ( MsgInfo( "
Menu 3" )) //, _grpbrow( oWnd ) )

   REDEFINE BUTTON oBtn5 ID 105 OF oDlg1   ;
      ACTION ( MsgInfo( "
Menu 4" )) //,_FyppBrow( oWnd ) )

   REDEFINE BUTTON oBtn6 ID 106 OF oDlg1  ;
      ACTION( MsgInfo( "
Menu 5" )) //,_Purge() )

   REDEFINE BUTTON oBtn7 ID 107 OF oDlg1   ;
      ACTION( MsgInfo( "
Menu 6" )) //, _HoliBrow(oWnd) )

   REDEFINE BUTTON oBtn8 ID 108 OF oDlg1  ;
      ACTION( oDlg1:End(), dbCloseAll(), oBtn_1:Show() )


   ACTIVATE DIALOG oDlg1 NOWAIT ;
       ON PAINT GradientFill( hDC, 0, 0, oDlg1:nHeight, oDlg1:nWidth, aGrad, .T. ) ;
       ON INIT oDlg1:Move( 100 , 400, oDlg1:nWidth, oDlg1:nHeight, .f. )
   *   VALID  ( oDlg:End(), .t. )


RETURN(NIL)

//-- END


// end main.prg


I hope it works now

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: How to create a <special> Buttonbar (9.04 / code included)

Postby Rick Lipkin » Sat May 23, 2009 1:25 am

Uwe

Thank you for all your help .. this particular program I am working on is used to report the time and activity for about 90 percent of our Agency .. prox 4k users.

A very high visibility program that is in need of a UI over-haul .. Alpha blend, gradients and txbrowse .. proving to be an interesting challenge.

Have already got some early feedback on the menu changes .. very positive!!

Thanks again
Rick Lipkin
SC Dept of Health, USA
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: How to create a <special> Buttonbar (9.04 / code included)

Postby ukoenig » Sat May 23, 2009 1:26 pm

Hello Rick,

Symbols ( with color ) You asked for :
( I make a Zip-file )

Image

Any symbols missing ?
You also need the PNG-Files as Alpha-Blended BMP ?

Best Regards
Uwe :lol:
Last edited by ukoenig on Sat May 23, 2009 1:29 pm, edited 1 time in total.
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: How to create a <special> Buttonbar (9.04 / code included)

Postby Rick Lipkin » Sat May 23, 2009 1:28 pm

Uwe

I tried some of the 'stock' .png's from the FWH904 samples .. and I can not seem to load them into a resource .. I can do it manually thru the test file .. but when I try to compile it to .res .. it fails.

Any ideas on how load load a .png to resource and compile ?

Thanks
Rick
User avatar
Rick Lipkin
 
Posts: 2618
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

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