FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to make transparent window/dialog?
Posts: 57
Joined: Sun Apr 12, 2009 10:51 AM
How to make transparent window/dialog?
Posted: Mon Aug 10, 2015 12:17 PM
Dear Sirs,

Where is the method to make "Transparent Window/Dialog" like following picture?

attaching transparent "phone ringing" window/dialog on window bar...

http://pharmalink.kr/images/phone2.jpg

Thanks.

Y.W.Kim
Posts: 375
Joined: Tue Feb 10, 2015 09:48 AM
Re: How to make transparent window/dialog?
Posted: Mon Aug 10, 2015 01:33 PM
In this program, they set the region of the window calling SetWindowRgn, there are some functions to create a region in fivewin:
  • CreateEllipticRgn[/*:m]
  • CreateRectRgn[/*:m]
  • CreateRoundRectRgn[/*:m][/list:u]
    To create a region from a bitmap you can do something like this:
    Code (fw): Select all Collapse
       LOCAL hRgn := nil, hRgn2
       for( every opaque pixel of bitmap )
          if hRgn = nil
             hRgn := CreateRectRgn( x,y, x+1,y+1 )
          else
             hRgn2 := CreateRectRgn( x,y, x+1,y+1 )
             CombineRgn( hRgn, hRgn, hRgn2 )
             DeleteObject( hRgn2 )
          endif
       next
       SetWindowRgn( ::hWnd, ::hRgn )

    It works on every versions of windows from 2000.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to make transparent window/dialog?
Posted: Mon Aug 10, 2015 02:07 PM

Kim,

Please review FWH\samples\newhelp.prg

Press on "Help" button and then click on any control of the dialog

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 57
Joined: Sun Apr 12, 2009 10:51 AM
Re: How to make transparent window/dialog?
Posted: Mon Aug 10, 2015 10:54 PM

Thanks, Mr.AntoninoP,
Thanks, Mr.Antonio Linares

:D

Continue the discussion