FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Grupos transparentes en una ventana
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Grupos transparentes en una ventana
Posted: Sat Jul 11, 2009 01:09 PM
Un ejemplo funcionando:
Code (fw): Select all Collapse
#include "fivewin.ch"


function Main()

  local oWnd, oGrp1, oGrp2, oBrush

  OnDlg()

  DEFINE BRUSH oBrush STYLE 'TILED'
  DEFINE WINDOW oWnd ;
     TITLE 'Transparent Groups' BRUSH oBrush
     // Try with and without brush

  @ 20, 20 GROUP oGrp1 TO 120,220 PIXEL ;
     PROMPT 'Transparent' OF oWnd ;
     TRANSPARENT

  oGrp1:bEraseBkGnd = { | hDC | SetBrushOrgEx( hDC, 8 - oGrp1:nLeft() % 8, 8 - oGrp1:nTop() % 8 ), FillRect( hDC, GetClientRect( oGrp1:hWnd ), oBrush:hBrush ), 1 }
  
  @ 20,240 GROUP oGrp2 TO 120,440 PIXEL ;
     PROMPT 'Opaque' OF oWnd

  ACTIVATE WINDOW ownd ;
     VALID ( oBrush:End(), .t. )

return nil

function OnDlg()

  local oDlg, oGrp1, oGrp2, oBrush


  DEFINE BRUSH oBrush STYLE 'TILED'
  DEFINE DIALOG oDlg SIZE 460,140 PIXEL ;
     TITLE 'Transparent Groups' BRUSH oBrush


  @ 10, 10 GROUP oGrp1 TO 60,110 PIXEL ;
     PROMPT 'Transparent' OF oDlg ;
     TRANSPARENT
     
  @ 10,120 GROUP oGrp2 TO 60,220 PIXEL ;
     PROMPT 'Opaque' OF oDlg

  ACTIVATE DIALOG oDlg CENTERED ;
     VALID ( oBrush:End(), .t. )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 330
Joined: Fri May 25, 2007 09:06 PM
Re: Grupos transparentes en una ventana
Posted: Sat Jul 11, 2009 01:25 PM

SON GENIALES ANTONIO, QUEDA MUY BIEN,,

AHORA UN SOLO COMENTARIO.. SE PODRIA HACER Q FUERAN DESDE OPACOS A TRANSPARENTE.. O SEA DE 0 A 100,, POR ENDE TAMBIEN UNO PODRIA DARLE UN EFECTO DE TRASLUCIDO,,

ALGO ASI COMO LOS EFECTOS DE VIACORAL::

ESPERO TUS COMENTARIOS::

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Grupos transparentes en una ventana
Posted: Sat Jul 11, 2009 05:39 PM

FWH te proporciona la función ABPaint() para pintar con el nivel de transparencia que quieras :-)

Revisa samples\TestAB.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion