Silvio.Falconi wrote:
it's possible with current menu class ?
Silvio.Falconi wrote:I can see color bar but not vertical image
sample:
MENUITEM "Datos ( 2013 )" FILE "..\icons\search2.ico" //"bitmaps\16x16\menu.bmp"
MENU FONT oFont 2013 ;
COLORMENU CLR_WHITE, CLR_BLUE ;
COLORSELECT METRO_STEEL, METRO_STEEL, RGB( 0, 0, 1 ) ;
COLORLEFT CLR_WHITE ;
COLORRIGHT CLR_WHITE ;
COLORSEPARATOR METRO_OLIVE ; // NOINHERIT ; // FACTOR 4 ;
LEFTWIDTH 24 ; //HEIGHT 1.0 * 2 ; // RIGHTSPACE 10 ; // ADJUST ;
LOGOMENU "..\bitmaps\fivetechv.png" ; //identify.bmp" ; //
IMGMENU "..\bitmaps\AlphaBmp\lock.bmp" ;//fivewing.bmp"
BRUSH "..\bitmaps\backgrnd\confetti.bmp"
// Autor: Cristobal Navarro
// Fecha: 18/06/2015
// Pruebas de Menus
#include "FiveWin.ch"
#include "wcolors.ch"
#define GWL_STYLE -16
#define SM_TABLETPC 86
#define SM_DIGITIZER 94
#define SM_MAXIMUMTOUCHES 95
#define SM_IMMENABLED 82
#define SM_CYMENUSIZE 55
//----------------------------------------------------------------------------//
static oWnd
static oMru1
static oMru2
Static cColorPan
Static oFontMenu
//----------------------------------------------------------------------------//
function Main()
local oBar, oBar1, oBar2
local cTitle, x
Local cFont := "Segoe UI Symbol" //"Calibri"
Local cFontH := -14 //-16 //-20 //-18 //-14 //-10 //-12
Local aFonts
FW_SetUnicode( .T. )
SetResDebug( .T. )
if !IsWin8() .and. !IsWindows10()
cFont := "Calibri"
endif
DEFINE FONT oFontMenu NAME cFont SIZE 0, -14 WEIGHT 300
cTitle := " Menus: " + if( !Empty( oFontMenu ), oFontMenu:cFaceName, "" ) +;
if( !Empty( oFontMenu ), Str( oFontMenu:nHeight ), "" )
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 MDI ;
TITLE cTitle MENU MBuildMenu( oWnd ) COLOR CLR_WHITE, CLR_WHITE //RGB( 116, 149, 193 )
oWnd:SetFont( oFontMenu )
SET MESSAGE OF oWnd TO "Prueba de Controles" FONT oFontMenu ;
COLORS RGB( 10, 10, 10 ), CLR_WHITE ; // , RGB( 116, 149, 193 ) ; //RGB( 31, 117, 70 ) ;
NOINSET CLOCK DATE KEYBOARD NOBORDER 2015
ACTIVATE WINDOW oWnd MAXIMIZED ON INIT MenuDlg( oWnd )
//Hb_GCall(.t.)
//CLEAR MEMORY
While oFontMenu:nCount > 0
oFontMenu:End()
Enddo
if File( "checkres.txt" )
FErase( "checkres.txt" )
endif
CheckRes()
return nil
//----------------------------------------------------------------------------//
function MBuildMenu( oW )
local oMenu
local oMruConnections
local oMruDBFs
local cClrDegrIni, cClrDegrFin
local cClrSelIni , cClrSelFin , cClrSelTxt, cClrSelBor
local cClrMenu , cClrMenuTxt
DEFAULT oW := oWnd
cClrMenu := CLR_RED //WHITE
cClrMenuTxt := CLR_WHITE //CLR_BLACK
cClrDegrFin := CLR_WHITE
cClrDegrIni := CLR_WHITE
cColorPan := CLR_GRAY //LightColor( 150, cClrDegrFin )
cClrSelFin := CLR_HGRAY //RGB(128,128,192)
cClrSelIni := CLR_HGRAY //RGB(128,128,192)
cClrSelTxt := CLR_BLACK
cClrSelBor := CLR_GRAY //CLR_WHITE //CLR_GRAY //CLR_BLACK
MENU oMenu ;
COLORMENU METRO_OLIVE, CLR_WHITE ;
COLORPNEL METRO_OLIVE, CLR_WHITE ;
COLORLEFT CLR_WHITE, METRO_OLIVE ;
COLORSELECT METRO_OLIVE, METRO_OLIVE, CLR_WHITE ;
FONT oFontMenu 2013 NOBORDER
MENUITEM "NoClient" RESOURCE "dialog"
MENU ;
COLORBMP METRO_OLIVE, METRO_CRIMSON COLORSEPARATOR CLR_GRAY ;
COLORPNEL METRO_OLIVE, CLR_WHITE
//FONT oFontMenu 2013 //RESOURCE "eye"
MENUITEM "IsTablet" + "..." CHARICON 57696
MENUITEM "Browse Properties NonClient" CHECKED
MENUITEM FWString( "Sample MRU Recent files" ) CHARICON 57697
MENU ;
COLORLEFT CLR_WHITE, METRO_OLIVE ;
COLORPNEL CLR_WHITE, METRO_TAUPE 2013
MRU oMruDBFs ;
FILENAME GetEnv( "APPDATA" ) + "\FiveDBU.ini" ;
SECTION "Recent DBF files" ; //
MESSAGE FWString( "Open this file" ) ;
SIZE 10
ENDMENU
SEPARATOR
MENUITEM FWString( "Change Color BLUE" ) + "..." CHARICON 57698
//ACTION CCOLORSUBMENU( oWnd:hWnd, CLR_BLUE )
MENUITEM FWString( "Sample MRU ADO connections" ) CHARICON 57699
MENU ;
COLORLEFT METRO_TAUPE, METRO_MAUVE ;
COLORRIGHT CLR_WHITE, METRO_TAUPE 2013
MRU oMruConnections ;
FILENAME GetEnv( "APPDATA" ) + "\FiveDBU.ini" ; // .INI to manipulate
SECTION FWString( "Recent ADO connections strings" ) ;
MESSAGE FWString( "Connect to this ADO database" ) ; // The message for all of them
SIZE 10
ENDMENU
SEPARATOR
MENUITEM FWString( "Change System Menu" ) + "..." ;
ACTION MsgInfo("Prueba" ) CHARICON 57695
SEPARATOR
MENUITEM FWString( "Exit" ) ACTION oWnd:End() CHARICON 57694
ENDMENU
oMenu:AddEdit()// { CLR_WHITE, CLR_BLACK, CLR_WHITE, CLR_WHITE, CLR_HGRAY, CLR_HGRAY, CLR_BLACK, CLR_GRAY } )
oMenu:AddFile()// { CLR_YELLOW, CLR_BLACK, CLR_WHITE, CLR_WHITE, CLR_HGRAY, CLR_HGRAY, CLR_BLACK, CLR_GRAY } )
oMenu:AddMdi()
oMenu:AddHelp( "Pruebas Menus", "(c) FiveTech Software 2015" )
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
Function MenuDlg( oW )
Local oMenu
REDEFINE SYSMENU oMenu OF oW FONT oFontMenu ;
COLORBMP CLR_YELLOW, METRO_STEEL ;
COLORRIGHT CLR_YELLOW, METRO_STEEL 2013
SEPARATOR
MENUITEM "Primer Item" CHARICON 57605// ACTION ( oW:SetColor( , CLR_BLUE ), oW:Refresh() )
SEPARATOR
MENUITEM "Segundo Item" ACTION MsgInfo( Len( oW:oSysMenu:aMenuitems ) ) CHARICON 57696
MENUITEM "Tercer Item" ACTION MsgInfo( Len( oW:oSysMenu:aMenuitems ) ) CHARICON 57736
SEPARATOR
MENUITEM "&Reset Menu" ACTION oMenu:Reset()
ENDSYSMENU
Return oMenu
//----------------------------------------------------------------------------//
#include "Fivewin.ch"
//----------------------------------------------------------------------------//
//
// Test Menus
//
//----------------------------------------------------------------------------//
Static oWnd
Static oFont
Static oFont1
Static nHFont
Static cFont
Static nWFont
Static oItem
Static oMenu
Function Main()
local oBr
local cBrush := "..\bitmaps\backgrnd\confetti.bmp"
cFont := "Segoe UI"
nHFont := 16
DEFINE FONT oFont NAME cFont SIZE 0, -nHFont
DEFINE FONT oFont1 NAME "Verdana" SIZE 0, -24
DEFINE BRUSH oBr FILE cBrush //RESIZE
DEFINE WINDOW oWnd ;
TITLE "Test Menu" + " - Ver.: " + FWVERSION + if( IsExe64(), ;
" ( 64", " ( 32" ) + " bits ) - " + FWString( "User" ) + ;
": " + WNetGetUser() + " - " + hb_Compiler() ;
MENU MenuSal() BRUSH oBr
ACTIVATE WINDOW oWnd MAXIMIZED
RELEASE FONT oFont, oFont1
RELEASE BRUSH oBr
Return nil
//----------------------------------------------------------------------------//
Function MenuSal()
local oMnu
local oMnu1
local oIt
MENU oMnu 2015 ;
NOBORDER ;
ROUND 6 FONT oFont ; // HEIGHT 3 ;
UPPERMNU ADJUST //NOCENTER //Add or Remove clausule and look height of menu bar and items
MENUITEM "Test 0"
MENU oMenu //NOINHERIT //COLORMENU CLR_WHITE
MENUITEM "Exit" BOLD ACTION oWnd:End() FILE "..\bitmaps\16x16\exit2.bmp"
SEPARATOR
MENUITEM "Item 3"
ENDMENU
MENUITEM "Test" FILE "..\icons\fivewin.ico" //+ CRLF + "Line 2"
MENU 2007 NOINHERIT // Remove for inherit clausule ADJUST of MENU BAR
MENUITEM "File" CHECKED
SEPARATOR
MENUITEM "Png" FILE "\fwh\bitmaps\pngs\image2.png"
MENUITEM "Jpg" FILE "\Fwh\bitmaps\pngs\pan_setting1.jpg"
MENUITEM "AlphaBmp Res" RESOURCE "files"
MENUITEM "AlphaBmp File" FILE "\fwh\bitmaps\alphabmp\pocketpc.bmp"
MENUITEM "Ico" FILE "\fwh\icons\bitmap.ico"
MENU
MENUITEM "File" FILE "\fwh\bitmaps\fivetech.bmp"
MENUITEM "Next" WHEN .F.
ENDMENU
MENUITEM "MultiIcon File" FILE "\fwh\icons\hires\back.ico"
SEPARATOR
MENUITEM "SEPARATOR" SEPARATOR BOLD
MENUITEM "16char" FILE "\fwh\bitmaps\16char.bmp"
MENUITEM "b20_open" FILE "\fwh\bitmaps\b20_open.bmp"
MENUITEM "16clip" FILE "\fwh\bitmaps\16clip.bmp"
MENUITEM "Calendar2" FILE "\fwh\bitmaps\calendar2.bmp"
MENUITEM "Chart" FILE "\fwh\bitmaps\chart.bmp"
MENUITEM "CharIcon" CHARICON 57731
SEPARATOR
MENUITEM "Character" CHARICON "K"
MENUITEM "Bold" BOLD
MENUITEM "Find2" FILE "\fwh\bitmaps\preview2.bmp" WHEN .F.
MENUITEM "Italic" ITALIC
MENUITEM "Find2" FILE "\fwh\bitmaps\find2.bmp"
ENDMENU
//MENUITEM " "
MENUITEM "With Font" FILE "..\icons\write2.ico"
MENU 2010 FONT oFont NOINHERIT // Remove for inherit clausule ADJUST of MENU BAR
MENUITEM "File" CHECKED WHEN .F.
SEPARATOR
MENUITEM "Png" FILE "\fwh\bitmaps\pngs\image2.png" WHEN .F.
MENUITEM "Jpg" FILE "\Fwh\bitmaps\pngs\pan_setting1.jpg"
MENUITEM "AlphaBmp" FILE "\fwh\bitmaps\alphabmp\visa.bmp"
MENUITEM "Ico" FILE "\fwh\icons\bitmap.ico"
MENU //
MENUITEM "File" FILE "\fwh\bitmaps\fivetech.bmp"
MENUITEM "Next" WHEN .F.
ENDMENU
MENUITEM "MultiIcon File" FILE "\fwh\icons\hires\back.ico" WHEN .F.
MENUITEM "SEPARATOR" SEPARATOR BOLD
MENUITEM "16char" FILE "\fwh\bitmaps\16char.bmp"
MENUITEM "b20_open" FILE "\fwh\bitmaps\b20_open.bmp"
MENUITEM "16clip" FILE "\fwh\bitmaps\16clip.bmp"
MENUITEM "Calendar2" FILE "\fwh\bitmaps\calendar2.bmp" WHEN .F.
MENUITEM "Chart" FILE "\fwh\bitmaps\chart.bmp"
MENUITEM "CharIcon" CHARICON 57731 WHEN .F.
SEPARATOR
MENUITEM "Character" CHARICON "K"
MENUITEM "Bold" BOLD
MENUITEM "Find2" FILE "\fwh\bitmaps\preview2.bmp"
MENUITEM "Italic" ITALIC
MENUITEM "Find2" FILE "\fwh\bitmaps\find2.bmp"
ENDMENU
MENUITEM "Datos ( 2013 )" FILE "..\icons\search2.ico" //"bitmaps\16x16\menu.bmp"
MENU FONT oFont 2013 ;
COLORMENU CLR_WHITE, CLR_BLUE ;
COLORSELECT METRO_STEEL, METRO_STEEL, RGB( 0, 0, 1 ) ;
COLORLEFT CLR_WHITE ;
COLORRIGHT CLR_WHITE ;
COLORSEPARATOR METRO_OLIVE ; // NOINHERIT ; // FACTOR 4 ;
LEFTWIDTH 24 ; //HEIGHT 1.0 * 2 ; // RIGHTSPACE 10 ; // ADJUST ;
LOGOMENU "..\bitmaps\fivetechv.png" ; //identify.bmp" ; //
IMGMENU "..\bitmaps\AlphaBmp\lock.bmp" ;//fivewing.bmp"
BRUSH "..\bitmaps\backgrnd\confetti.bmp"
MENUITEM "Proveedores" BOLD ACTION MsgInfo( "Proveedores" ) CHECKED
MENUITEM "Clientes" BOLD ACTION MsgInfo( "Clientes" ) ITALIC FILE "..\bitmaps\16clip.bmp"
SEPARATOR
MENUITEM "Articulos" ACTION MsgInfo( "Articulos" ) BOLD CHARICON 57621
SEPARATOR
MENUITEM "Fichero de Zonas ( 2007 )" COLORMENU CLR_MAGENTA BOLD FILE "..\bitmaps\16code.bmp"
MENU 2007
MENUITEM "Agentes" ACTION MsgInfo( "Fichero de Agentes" )
SEPARATOR
MENUITEM "Formas de Pago"
MENUITEM "Entidades Bancarias"
ENDMENU
MENUITEM "Ficheros Auxiliares ( 2015 )" COLORMENU METRO_OLIVE BOLD
MENU 2015
MENUITEM "Agentes"
SEPARATOR
MENUITEM "Formas de Pago" CHARICON 57624
MENUITEM "Entidades Bancarias"
ENDMENU
SEPARATOR
MENUITEM "Tools ( 2015 )" BOLD
MENU 2010 COLORMENU CLR_RED
MENUITEM "Copia de Seguridad"
MENUITEM "Herramientas"
SEPARATOR
MENUITEM "Otros ( 2007 )"
MENU 2007
MENUITEM "Item 1" ACTION MsgInfo( "Item_1" )
SEPARATOR
MENUITEM "Item 2" ACTION MsgInfo( "Item_2" )
ENDMENU
ENDMENU
MENUITEM "Varios" BOLD
MENUITEM "Others" BOLD
ENDMENU
MENUITEM "Others Items ( 2015 )" FILE "..\bitmaps\16x16\people.bmp"
MENU oMnu1 2015 FONT oFont ;
COLORMENU RGB( 0, 0, 1 ), CLR_HRED ; //LEFTWIDTH 40
LEFTWIDTH 24 ;
LOGOMENU "..\bitmaps\menu4v.bmp" ;
IMGMENU "..\bitmaps\AlphaBmp\android.bmp" ;
BRUSH "..\bitmaps\backgrnd\blustone.bmp"
MENUITEM "Item 1" ACTION XBrowse( GetSizeText( oWnd:GetDC(), "Hola" ) )
MENUITEM "Change Color Gray" ACTION ( oMnu1:hImg := cColorMenu( oWnd:hWnd, , CLR_GRAY, .T., ) ) //"lock.bmp" ) )
MENUITEM "Item 3" ACTION MsgInfo( HBmpBack( oMnu1:hMenu ) ) CHARICON "P"
SEPARATOR
MENUITEM "Item 4" ACTION MsgInfo( "Item_4" ) CHECKED
MENUITEM "Item 5 ( 2010 )" ACTION MsgInfo( "Item_5" ) FILE "..\bitmaps\16clip.bmp"
MENU 2010
MENUITEM "Item 51" ACTION MsgInfo( "Item_51" )
MENUITEM "Item 52" ACTION MsgInfo( "Item_52" )
SEPARATOR
MENUITEM "Item 53" ACTION MsgInfo( "Item_53" )
MENUITEM " -> " SEPARATOR
MENUITEM "Item 54" ACTION MsgInfo( "Item_54" )
MENUITEM "Item 55" ACTION MsgInfo( "Item_55" )
ENDMENU
MENUITEM "Item 6" ACTION MsgInfo( "Item_6" )
MENUITEM "Item 7" ACTION MsgInfo( "Item_7" )
SEPARATOR
MENUITEM "Item 8" ACTION MsgInfo( "Item_8" )
MENUITEM "Item 9" ACTION MsgInfo( "Item_9" )
ENDMENU
MENUITEM "Elements" FILE "..\bitmaps\16x16\design.bmp"
MENU 2015 BRUSH METRO_OLIVE FONT oFont1 ;
IMGMENU "D:\Fwh\FwhTeam\bitmaps\olga1.jpg" //
MENUITEM "Item 31" ACTION MsgInfo( "Item_31" )
MENUITEM "Item 32" ACTION MsgInfo( "Item_32" )
SEPARATOR
MENUITEM "Item 33" ACTION MsgInfo( "Item_33" )
MENUITEM " -> " SEPARATOR
MENUITEM "Item 34" ACTION MsgInfo( "Item_34" )
MENUITEM "Item 35" ACTION MsgInfo( "Item_35" )
ENDMENU
MENUITEM FwString( "Salir" ) FILE "..\bitmaps\16x16\savedbf.bmp"
MENU 2010 COLORMENU RGB( 0, 0, 1 ), CLR_HRED ; //LEFTWIDTH 40
LOGOMENU "..\bitmaps\fivetechv.png" ;
IMGMENU "..\bitmaps\fivewin.bmp"
MENUITEM "Exit Test" BOLD ACTION oWnd:End() FILE "..\bitmaps\16x16\exit2.bmp"
SEPARATOR
MENUITEM "Historico" + Chr( 9 ) + "Ctrl + W" BOLD
MENUITEM "Simbolo del Sistema ( CMD )" + Chr( 9 ) + "Ctrl + K" BOLD
ENDMENU
ENDMENU
Return oMnu
//----------------------------------------------------------------------------//
LOGOMENU "..\bitmaps\fivetechv.png" ; //identify.bmp" ; //
Silvio.Falconi wrote:I'm afraid I cannot make the style of Menu because I have 17.12 rel
indeed I not found that files on fwh\bitmaps folder
Silvio.Falconi wrote:I tried but it is not the same ( of c5menu)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 108 guests