FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Classe TOutLook2003 como 2007
Posts: 111
Joined: Sat Jan 30, 2010 08:35 AM
Classe TOutLook2003 como 2007
Posted: Tue Mar 30, 2010 07:53 AM

Hola a todo el mundo.

Seria posible, modificar la classe TOutLook2003, con los colores de 2007 ?

Muchas gracias.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Classe TOutLook2003 como 2007
Posted: Tue Mar 30, 2010 09:36 AM
Pedro,

Al inicio del código fuente de la clase TOutLook2003 estan estas líneas:

Code (fw): Select all Collapse
#define LIGHTBLUE    nRGB(  89, 135, 214 )
#define DARKBLUE     nRGB(   3,  56, 147 )
#define LIGHTORANGE1 nRGB( 250, 227, 143 )
#define DARKORANGE1  nRGB( 238, 152, 25 )
#define LIGHTCYAN    nRGB( 203, 225, 252 )
#define DARKCYAN     nRGB( 125, 165, 224 )
#define LIGHTORANGE2 nRGB( 255, 255, 220 )
#define DARKORANGE2  nRGB( 247, 192, 91 )


Sólo tienes que modificar esos valores numéricos y recompilar outl2003.prg y enlazarlo como si fuese un PRG más de tu aplicación
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 111
Joined: Sat Jan 30, 2010 08:35 AM
Re: Classe TOutLook2003 como 2007
Posted: Tue Mar 30, 2010 04:36 PM

Muchas gracias Antonio, ya esta resuelto.

Posts: 422
Joined: Mon Aug 17, 2009 12:18 PM
Re: Classe TOutLook2003 como 2007
Posted: Wed Mar 31, 2010 10:45 AM

Hola:

¿Cuál son esos valores?.

Muchas gracias

Saludos,



Eduardo
Posts: 111
Joined: Sat Jan 30, 2010 08:35 AM
Re: Classe TOutLook2003 como 2007
Posted: Wed Mar 31, 2010 11:10 AM
No solo he modificado valores sino que he modificado la clase con una propiedad l2007.
También he cambiado Gradient por gradientfull.

No esta perfecto pero da el pego.

Los cambios me he mirado la clase "TRBtn"

en la Cabecera añadir
Code (fw): Select all Collapse
#include "Colors.ch"

// Colors Office 2007
#define BLUEBOX0     RGB( 141, 178, 227 )      
#define BLUEBOX1     RGB( 197, 210, 223 )
#define BLUEBOX2     RGB( 237, 242, 248 )
#define BLUE0        RGB( 218, 229, 243 )      
#define BLUE1        RGB( 199, 216, 237 )      
#define BLUE2        RGB( 194, 217, 240 )      
#define BLUE3        RGB( 191, 219, 255 )


En las propiedades de la Clase (TOutLook2003)
Code (fw): Select all Collapse
    DATA  l2007  INIT .F.



En el Metodo (METHOD Paint() CLASS TOutLook2003)
Declarar variable
Code (fw): Select all Collapse
Local aGrad

Donde
Code (fw): Select all Collapse
Gradient( ::hDC, { nTop, 0, nTop + 7, ::nWidth() }, DARKBLUE, LIGHTBLUE, .T. )

Reemplazar por
Code (fw): Select all Collapse
If ::l2007
   aGrad         := { {0.3, BLUE0, BLUE0 }, { 0.7, BLUE1, BLUE0 } }
   GradientFill( ::hDC, nTop , 0, nTop + 7, ::nWidth() , aGrad )
Else   
   Gradient( ::hDC, { nTop, 0, nTop + 7, ::nWidth() }, DARKBLUE, LIGHTBLUE, .T. )            
EndIf


En las propiedades de la clase TOutLook2003Group
Code (fw): Select all Collapse
   DATA   l2007     INIT .F.


En el método (METHOD Paint( lOver ) CLASS TOutLook2003Group)
Declarar variables
Code (fw): Select all Collapse
local aGrad,aGradHigh,aGradOver

Donde
Code (fw): Select all Collapse
   Gradient( hDC := oCon:GetDC(), { nTop, 0, nTop + 30, oCon:nWidth() },;
             If( lOver, If( ::lSelected, ::nClrEnd, LIGHTORANGE2 ), ::nClrStart ),;
             If( lOver, If( ::lSelected, ::nClrStart, DARKORANGE2 ), ::nClrEnd ), .T. )


Reemplazar por
Code (fw): Select all Collapse
If ::l2007
    aGrad         := { {0.3, BLUE0, BLUE0 }, { 0.7, BLUE1, BLUE0 } }
    aGradHigh     := { {1/3, nRGB( 253,212,168 ), nRGB( 251,178,99 ) }, {2/3, nRGB( 250,157,52 ), nRGB( 252,234,163 ) } }
    aGradOver     := { {1 , nRGB( 255,215,84), nRGB( 255, 253, 222 ) } }
    GradientFill( hDC := oCon:GetDC() , nTop, 0, nTop + 30, oCon:nWidth() , If( lOver, aGradOver , If( ::lSelected , aGradHigh , aGrad) ) )
Else
    Gradient( hDC := oCon:GetDC(), { nTop, 0, nTop + 30, oCon:nWidth() },;
             If( lOver, If( ::lSelected, ::nClrEnd, LIGHTORANGE2 ), ::nClrStart ),;
             If( lOver, If( ::lSelected, ::nClrStart, DARKORANGE2 ), ::nClrEnd ), .T. )            
EndIf



Espero que también te funcione mas o menos bien.

Gracias.
Pere
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Classe TOutLook2003 como 2007
Posted: Mon Apr 05, 2010 06:57 AM

Pere,

Puedes poner una imagen aqui de como ha quedado ? :-)

Usa www.imageshack.us

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 111
Joined: Sat Jan 30, 2010 08:35 AM
Re: Classe TOutLook2003 como 2007
Posted: Tue Apr 06, 2010 09:03 AM
Hola Antonio,

Aquí tienes una imagen de como ha quedado.




a ver si te parece bien.
Gracias.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Classe TOutLook2003 como 2007
Posted: Wed Apr 07, 2010 07:24 AM

Pere,

Gracias por poner la imagen,

si, se ve bien :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 422
Joined: Mon Aug 17, 2009 12:18 PM
Re: Classe TOutLook2003 como 2007
Posted: Wed Apr 07, 2010 09:45 AM

Antonio:

¿Y por qué los botones look 2007 no se ven como el azul de esa foto?.

gracias :D

Saludos,



Eduardo
Posts: 880
Joined: Fri Jan 12, 2007 08:35 PM
Re: Classe TOutLook2003 como 2007
Posted: Mon Jun 07, 2010 05:05 AM

Muy interesante :)

Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ

Continue the discussion