New Class TVistaMenu in FWH 11.11

New Class TVistaMenu in FWH 11.11

Postby Antonio Linares » Tue Nov 22, 2011 4:34 pm

Paco García from CanalFive has been so kind to donate his Class TVistaMenu for FWH 11.11 :-)

Thanks Paco! :-)

Image

Image

Code: Select all  Expand view
#include "fivewin.ch"

function main()
local oWnd
local oVmenu
local oItem
local oIcon

DEFINE ICON oIcon NAME "C5ICON"


DEFINE WINDOW oWnd TITLE "First test VistaMenu" ICON oIcon

    oVMenu := TVistaMenu():New( 0,0, 100, 100, oWnd )
    oVMenu:nColumns := 1
    oVMenu:nType := 2

    oItem := oVMenu:AddItem( "Sistema y mantenimiento ", ".\..\bitmaps\pngs\image1.png" )
             oItem:AddItem( "Empezar a trabajar con windows",,;
                            { | o | o := TWindow(), DestroyWindow( o:hWnd ), o:hWnd := GetDesktopWindow(), o:SaveToPng( "c:\desktop.png" ) } )
             oItem:AddItem( "Hacer una copia de seguridad del equipo" )
             oItem:AddItem( "Item 1 Item 1" )
             oItem:AddItem( "ItemItem2 ItemItem2" )
             oItem:AddItem( "ItemItemItem3 ItemItemItem3" )

    oItem := oVMenu:AddItem( "Seguridad", ".\..\bitmaps\pngs\image2.png" )
             oItem:AddItem( "Buscar actualizaciones" )
             oItem:AddItem( "Dejar pasar un programa a través de Firewall de Windows" )

    oItem := oVMenu:AddItem( "Redes e Internet", ".\..\bitmaps\pngs\image3.png" )
    oItem:lEnable := .f.
             oItem:AddItem( "Ver el estado y las tareas de red" )
             oItem:AddItem( "Configurar el uso compartido de archivos" )

    oItem := oVMenu:AddItem( "Hardware y sonido", ".\..\bitmaps\pngs\image4.png" )
             oItem:AddItem( "Reproducir un CD u otros archivos multimedia automáticamente" )
             oItem:AddItem( "Impresora" )
             oItem:AddItem( "Mouse" )

    oItem := oVMenu:AddItem( "Programas", ".\..\bitmaps\pngs\image5.png" )
             oItem:AddItem( "Desinstalar un programa" )
             oItem:AddItem( "Cambiar programas de inicio" )

    oItem := oVMenu:AddItem( "Equipo portatil", ".\..\bitmaps\pngs\image6.png" )
             oItem:AddItem( "Cambiar la configuración de la bateria" )
             oItem:AddItem( "Ajustar parametros de configuración de movilidad de uso frecuente" )

    oItem := oVMenu:AddItem( "Cuentas de usuario", ".\..\bitmaps\pngs\image7.png" )
             oItem:AddItem( "Cambiar tipo de cuenta" )

    oItem := oVMenu:AddItem( "Opciones adicionales", ".\..\bitmaps\pngs\image12.png" )

    oItem := oVMenu:AddItem( "Apariencia y personalización", ".\..\bitmaps\pngs\image8.png" )
             oItem:AddItem( "Cambiar fondo de escritorio" )
             oItem:AddItem( "Cambiar la combinación de colores" )
             oItem:AddItem( "Ajustar la resolución de pantalla" )

    oItem := oVMenu:AddItem( "Reloj, idioma y región", ".\..\bitmaps\pngs\image9.png" )
             oItem:AddItem( "Cambiar teclados u otros métodos de entrada" )
             oItem:AddItem( "Cambiar el idioma para mostrar" )

    oItem := oVMenu:AddItem( "Accesibilidad", ".\..\bitmaps\pngs\image10.png" )
             oItem:AddItem( "Permitir que Windows sugiera parametros de configuración" )
             oItem:AddItem( "Optimizar la presentación visual" )

    oWnd:oClient := oVMenu

ACTIVATE WINDOW oWnd

return 0
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New Class TVistaMenu in FWH 11.11

Postby Rimantas » Thu Nov 24, 2011 8:04 pm

Antonio Linares wrote:Paco García from CanalFive has been so kind to donate his Class TVistaMenu for FWH 11.11 :-)

Thanks Paco! :-)

Code: Select all  Expand view
#include "fivewin.ch"

function main()
local oWnd
local oVmenu
local oItem
local oIcon

DEFINE ICON oIcon NAME "C5ICON"


DEFINE WINDOW oWnd TITLE "First test VistaMenu" ICON oIcon

    oVMenu := TVistaMenu():New( 0,0, 100, 100, oWnd )
    oVMenu:nColumns := 1
    oVMenu:nType := 2

    oItem := oVMenu:AddItem( "Sistema y mantenimiento ", ".\..\bitmaps\pngs\image1.png" )
             oItem:AddItem( "Empezar a trabajar con windows",,;
                            { | o | o := TWindow(), DestroyWindow( o:hWnd ), o:hWnd := GetDesktopWindow(), o:SaveToPng( "c:\desktop.png" ) } )
             oItem:AddItem( "Hacer una copia de seguridad del equipo" )
             oItem:AddItem( "Item 1 Item 1" )
             oItem:AddItem( "ItemItem2 ItemItem2" )
             oItem:AddItem( "ItemItemItem3 ItemItemItem3" )

    oItem := oVMenu:AddItem( "Seguridad", ".\..\bitmaps\pngs\image2.png" )
             oItem:AddItem( "Buscar actualizaciones" )
             oItem:AddItem( "Dejar pasar un programa a través de Firewall de Windows" )

    oItem := oVMenu:AddItem( "Redes e Internet", ".\..\bitmaps\pngs\image3.png" )
    oItem:lEnable := .f.
             oItem:AddItem( "Ver el estado y las tareas de red" )
             oItem:AddItem( "Configurar el uso compartido de archivos" )

    oItem := oVMenu:AddItem( "Hardware y sonido", ".\..\bitmaps\pngs\image4.png" )
             oItem:AddItem( "Reproducir un CD u otros archivos multimedia automáticamente" )
             oItem:AddItem( "Impresora" )
             oItem:AddItem( "Mouse" )

    oItem := oVMenu:AddItem( "Programas", ".\..\bitmaps\pngs\image5.png" )
             oItem:AddItem( "Desinstalar un programa" )
             oItem:AddItem( "Cambiar programas de inicio" )

    oItem := oVMenu:AddItem( "Equipo portatil", ".\..\bitmaps\pngs\image6.png" )
             oItem:AddItem( "Cambiar la configuración de la bateria" )
             oItem:AddItem( "Ajustar parametros de configuración de movilidad de uso frecuente" )

    oItem := oVMenu:AddItem( "Cuentas de usuario", ".\..\bitmaps\pngs\image7.png" )
             oItem:AddItem( "Cambiar tipo de cuenta" )

    oItem := oVMenu:AddItem( "Opciones adicionales", ".\..\bitmaps\pngs\image12.png" )

    oItem := oVMenu:AddItem( "Apariencia y personalización", ".\..\bitmaps\pngs\image8.png" )
             oItem:AddItem( "Cambiar fondo de escritorio" )
             oItem:AddItem( "Cambiar la combinación de colores" )
             oItem:AddItem( "Ajustar la resolución de pantalla" )

    oItem := oVMenu:AddItem( "Reloj, idioma y región", ".\..\bitmaps\pngs\image9.png" )
             oItem:AddItem( "Cambiar teclados u otros métodos de entrada" )
             oItem:AddItem( "Cambiar el idioma para mostrar" )

    oItem := oVMenu:AddItem( "Accesibilidad", ".\..\bitmaps\pngs\image10.png" )
             oItem:AddItem( "Permitir que Windows sugiera parametros de configuración" )
             oItem:AddItem( "Optimizar la presentación visual" )

    oWnd:oClient := oVMenu

ACTIVATE WINDOW oWnd

return 0
 


It's not working with MinGW + harbour 3.1 ... Buildg vistamn1 - return errors .

Regards ,
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: New Class TVistaMenu in FWH 11.11

Postby Antonio Linares » Thu Nov 24, 2011 9:11 pm

Rimantas,

Fixed, we email you the modified libs :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New Class TVistaMenu in FWH 11.11

Postby Rimantas » Fri Nov 25, 2011 6:40 pm

Antonio Linares wrote:Rimantas,

Fixed, we email you the modified libs :-)


Thanks Antonio ! Wonderfull menu , very fine ! But ... with new libs appears other problem - TFolderEx isn't working . It return error :

Code: Select all  Expand view

Harbour 3.1.0dev (Rev. 17025)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'testfx1.prg' and generating preprocessed output to 'testfx1.ppo'...
Lines 4253, Functions/Procedures 5
Generating C source output to 'testfx1.c'... Done.
\hrb\lib\win\mingw/libhbct.a(ctmath2.o):ctmath2.c:(.text+0x0): multiple definiti
on of `HB_FUN_FLOOR'
.\..\lib/fivehgc.lib(C5CNEW.o):C5CNEW.C:(.text+0x5442): first defined here
collect2: ld returned 1 exit status
* Link errors *


How to fix that ? I don't know how it's with new libs , but brush in folders with MinGW and Harbour 3.1 isn't working .

With best regards,
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: New Class TVistaMenu in FWH 11.11

Postby Antonio Linares » Fri Nov 25, 2011 6:43 pm

Rimantas,

Fixed! I am sending you the new libs :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New Class TVistaMenu in FWH 11.11

Postby Rimantas » Fri Nov 25, 2011 6:54 pm

Antonio Linares wrote:Rimantas,

Fixed! I am sending you the new libs :-)


Many thanks Antonio ! Now it build OK , samples are working . It leave such trifle ... how about brush on folders ? :)
Rimantas U.
User avatar
Rimantas
 
Posts: 437
Joined: Fri Oct 07, 2005 12:56 pm
Location: Utena , Lithuania

Re: New Class TVistaMenu in FWH 11.11

Postby scooby » Wed Jan 11, 2012 7:15 pm

Linares it´s possible to use de TVistaMenu with the RibbonBar without use a new window???
Because a need a succeeding step, when i click an any button in a ribbon menu, the system create a vista menu in main window...

Márcio Pinheiro Varjão
scooby
 
Posts: 4
Joined: Mon Jan 09, 2012 5:23 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 33 guests