FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Antonio - GroupBox está limpando a tela
Posts: 344
Joined: Tue Oct 11, 2005 11:33 AM
Antonio - GroupBox está limpando a tela
Posted: Fri Dec 05, 2008 04:37 PM
Olá Antonio,

Ao atualizar para versão FWH 08.10 a classe TGroup está limpando a tela:

Antes da versão 8.10:

http://rapidshare.com/files/170538314/group1.PNG.html

... e depois na 8.10

http://rapidshare.com/files/170538492/group2.PNG.html

Eu descobri que o problema está aqui (CONTROL.PRG):

     SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect


//----------------------------------------------------------------------------//

METHOD Colors( hDC ) CLASS TControl

   DEFAULT ::nClrText := GetTextColor( hDC ),;
           ::nClrPane := GetBkColor( hDC ),;
           ::oBrush   := TBrush():New( , ::nClrPane ),;
           ::lTransparent := .f.

   SetTextColor( hDC, ::nClrText )
   SetBkColor( hDC, ::nClrPane )

   if ::lTransparent
      SetBkMode( hDC, 1 ) // TRANSPARENT
      if IsAppThemed()
         if ! Empty( ::oBrush:hBitmap )
            SetBrushOrgEx( hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
            FillRect( hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
         else            //  This condition is added by RAMESH BABU P on Nov. 06, 2006
            if Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
               // DrawPBack( ::hWnd,  hDC )
               ParentImage( ::hWnd, hDC )
**TIVE QUE RETIRAR ISTO     SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect
            endif
         endif
      endif
   else
      if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO"
         DrawPBack( ::hWnd,  hDC )
      endif
   endif

return ::oBrush:hBrush

//----------------------------------------------------------------------------//


... e voltou a funcionar ok. Qual seria o código certo para se resolver isto ?
Obrigado, Regards, Saludos



Rossine.



Harbour and Harbour++
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Antonio - GroupBox está limpando a tela
Posted: Mon Dec 08, 2008 09:02 AM

Rossine,

Ese cambio se hizo debido a este problema que nos comentó Carlos Gallego, y fué la solución:

http://forums.fivetechsoft.com/viewtopic.php?t=12784

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion