Antonio, here a screenshot from the original test2007.prg.
Regards,
Otto
#include "FiveWin.ch"
static oWnd
function Main()
local oBar, oPopup, oBtn
SetBalloon( .T. ) // Balloon shape required for tooltips
DEFINE WINDOW oWnd TITLE "FWH - Office 2007 look in your ButtonBars, MsgBar and Menus" ;
MENU BuildMenu()
DEFINE BUTTONBAR oBar OF oWnd SIZE 60, 65 2007
DEFINE BUTTON OF oBar ACTION Print() ;
RESOURCE "attach"
DEFINE BUTTON OF oBar ACTION MsgInfo( "Calendar" ) ;
RESOURCE "calendar" PROMPT "Calendar" WHEN .F. TOOLTIP "Calendar"
MENU oPopup POPUP
MENUITEM "One" ACTION MsgInfo( 1 )
MENUITEM "Two" ACTION MsgInfo( 2 )
ENDMENU
DEFINE BUTTON oBtn OF oBar ACTION oBtn:ShowPopup() ;
RESOURCE "people" PROMPT "Clients" GROUP ;
MENU oPopup TOOLTIP "Clients"
DEFINE BUTTON OF oBar ACTION MsgInfo( "Print" ) ;
RESOURCE "print" PROMPT "Print" TOOLTIP "Print"
SET MESSAGE OF oWnd TO "Testing the ButtonBar 2007 Office look" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Do you want to end?" )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&DataBases"
MENU
MENUITEM "&Clients..." FILENAME "..\bitmaps\16x16\favorite.bmp"
MENUITEM "&Report..."
MENU
MENUITEM "&One..." DISABLED
MENUITEM "&Two..." CHECKED
MENUITEM "&Three..." WHEN .F.
ENDMENU
SEPARATOR
MENUITEM "&End" ACTION oWnd:End()
ENDMENU
MENUITEM "Edit" WHEN .F.
oMenu:AddHelp()
MENUITEM "Another item"
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function Print()
local oPrn
PRINTER oPrn PREVIEW
PAGE
oPrn:Say( 2, 2, "Hello" )
ENDPAGE
PAGE
oPrn:Say( 2, 2, "Bye" )
ENDPAGE
ENDPRINT
return nil
//----------------------------------------------------------------------------//
procedure AppSys // XBase++ requirement
return
//----------------------------------------------------------------------------//