FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index All products support FWH1111 SetDlgGradient
Posts: 27
Joined: Fri Jul 22, 2011 04:04 AM
FWH1111 SetDlgGradient
Posted: Sat Dec 17, 2011 05:49 AM
Antonio,
quando uso o SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )..... mostra o seguinte:

@ 001, 001 FOLDEREX ofld Items....:



MsgRun( "Verificando informativos...", "Espere um momento", { || AbriWebMain(oWndP...:


FWH1111[X]HARBOUR0131211.zip
FWHX 11.11 # xHarbour 1.2.1 Rev.9411 ## Borland C++ 5.8.2
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH1111 SetDlgGradient
Posted: Sat Dec 17, 2011 10:04 AM
Rogerio,

For the 1) this new Method in Class TDialog is required:

Code (fw): Select all Collapse
   METHOD SetSize( nWidth, nHeight, lRepaint ) INLINE ;
              Super:SetSize( nWidth, nHeight, lRepaint ),;
              If( aGradColors != nil, ::Gradient( aGradColors ),)


And we change Class TWindow Method Gradient() this way:
Code (fw): Select all Collapse
METHOD Gradient( aGradColors ) CLASS TWindow

   local hDC, hBmp, hBmpOld

   DEFAULT aGradColors := ::aGradColors
   
   if aGradColors == nil
      return nil
   endif   
   
   hDC = CreateCompatibleDC( ::GetDC() )
   hBmp = CreateCompatibleBitMap( ::hDC, ::nWidth, ::nHeight )
   hBmpOld = SelectObject( hDC, hBmp )

   GradientFill( hDC, 0, 0, ::nHeight, ::nWidth, aGradColors )

   ::oBrush:End()
   ::oBrush = TBrush():New()
   ::oBrush:hBitmap = hBmp
   ::oBrush:hBrush = CreatePatternBrush( hBmp )
   
   SelectObject( hDC, hBmpOld )

   ::ReleaseDC()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH1111 SetDlgGradient
Posted: Sat Dec 17, 2011 10:14 AM
Rogerio,

For the 2) this little change in required in source\function\msgrun.prg

Code (fw): Select all Collapse
     ACTIVATE DIALOG oDlg CENTER ;
          ON PAINT oDlg:Say( 11, 0, xPadC( oDlg:cMsg, nWidth ),,,, .T., .T. )


Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 27
Joined: Fri Jul 22, 2011 04:04 AM
Re: FWH1111 SetDlgGradient
Posted: Sat Dec 17, 2011 12:10 PM

incluso con los cambios en el dialog y windows... y continĂºa con el mismo error en folderEX ...

msgrun funcionaba bien ahora.

rĂ¡pidamente resuelto de la siguiente manera: // rsrs
// SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )

gracias

(obs: google tradutor)

FWHX 11.11 # xHarbour 1.2.1 Rev.9411 ## Borland C++ 5.8.2

Continue the discussion