FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour PROBLEMAS DE REPINTADO EN TRBTN,, ::aGradiant
Posts: 330
Joined: Fri May 25, 2007 09:06 PM
PROBLEMAS DE REPINTADO EN TRBTN,, ::aGradiant
Posted: Wed Dec 30, 2009 11:26 AM

MASTER ANTONIO::

SEGUN VEO EL PROBLEMA DE REPINTADO DE UN TRBTN,, SE DEBE A ESTA LINEA EN EL METODO PAINT,, DE LA CLASE

  if ::lTransparent .and. ::hBack == NIL
     hCapture = MakeBkBmpEx( ::hWnd, aRect[ 1 ], aRect[ 2 ], ::nWidth, ::nHeight )

// hCapture = ParentCapture( ::hWnd, ::hDC )
::hBack := CreatePatternBrush( hCapture )
DeleteObject( hCapture )
//elseif ! ::lTransparent .and. ::hBack == NIL
elseif ! ::lTransparent .or. ::hBack == NIL // <--------------------------- DEBERIA SER ASI
hBmp = GradientBmp( Self, ::nWidth, ::nHeight, ::aGradiant )
::hBack = CreatePatternBrush( hBmp )
DeleteObject( hBmp )
endif
endif

::hBack nunca vuelve a saer un NIL despues q pasa y lo pinta la primera vez con lo que contenga ::aGradiant.
y obviamente ::lTransparent es .F.
ME INDICAS SI ES CORRECTO

GRACIAS

Posts: 330
Joined: Fri May 25, 2007 09:06 PM
Re: PROBLEMAS DE REPINTADO EN TRBTN,, ::aGradiant
Posted: Wed Dec 30, 2009 11:31 AM

AHORA .: la solucion para no mover la clase,,, seria pasarle un NIL a ::hBack junto con el ::agradiant y despues refrescar,, ,, no se si eso influira en algo mas,,

que opinas MASTER ::

GRACIAS

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: PROBLEMAS DE REPINTADO EN TRBTN,, ::aGradiant
Posted: Wed Dec 30, 2009 11:33 AM

Mantonio,

Puedes proporcionar un ejemplo que muestre el error de pintado ? gracias :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion