FWH1111 SetDlgGradient

FWH1111 SetDlgGradient

Postby roberio » Sat Dec 17, 2011 5:49 am

Antonio,
quando uso o SetDlgGradient( { { 1, RGB( 199, 216, 237 ), RGB( 237, 242, 248 ) } } )..... mostra o seguinte:

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


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

FWH1111[X]HARBOUR0131211.zip
FWHX 11.11 # xHarbour 1.2.1 Rev.9411 ## Borland C++ 5.8.2
User avatar
roberio
 
Posts: 27
Joined: Fri Jul 22, 2011 4:04 am

Re: FWH1111 SetDlgGradient

Postby Antonio Linares » Sat Dec 17, 2011 10:04 am

Rogerio,

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

Code: Select all  Expand view
  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: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42097
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: FWH1111 SetDlgGradient

Postby Antonio Linares » Sat Dec 17, 2011 10:14 am

Rogerio,

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

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


Thanks! :-)
regards, saludos

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

Re: FWH1111 SetDlgGradient

Postby roberio » 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
User avatar
roberio
 
Posts: 27
Joined: Fri Jul 22, 2011 4:04 am


Return to All products support

Who is online

Users browsing this forum: No registered users and 2 guests