Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Sun, 30 Mar 2008 20:40:06 -0700 (PDT),    group: microsoft.public.win32.programmer.gdi        back       


seethru client area   
hi,

I want to create a window where you can "see-thru" it,i.e the contents
of the window below it should be visible.
How can I do this?

Regards
Chimanrao
date: Sun, 30 Mar 2008 20:40:06 -0700 (PDT)   author:   Chimanrao

Re: seethru client area   
On Mar 30, 8:40 pm, Chimanrao  wrote:
> hi,
>
> I want to create a window where you can "see-thru" it,i.e the contents
> of the window below it should be visible.
> How can I do this?
>
> Regards
> Chimanrao


Hi,

Well... you can achieve certain kinds of transparency by using
alpha blending, which is part of GDI and GDI. So, you can use
the following APIs to accomplish that:

	CreateWindowEx()		WS_EX_TRANSPARENT

	UpdateLayeredWindow()

	SetLayeredWindowAttributes()

	SetWindowRgn()

	SetBkMode()		TRANSPARENT

	AlphaBlend()

	TransparentBlt()

http://msdn2.microsoft.com/en-us/library/ms632680.aspx

http://msdn2.microsoft.com/en-us/library/ms633556.aspx

http://msdn2.microsoft.com/en-us/library/ms633540.aspx

http://msdn2.microsoft.com/en-us/library/ms534845.aspx

http://msdn2.microsoft.com/en-us/library/ms534862.aspx

http://msdn2.microsoft.com/en-us/library/ms532324.aspx

http://msdn2.microsoft.com/en-us/library/ms532303.aspx

Kellie.
date: Mon, 31 Mar 2008 08:04:29 -0700 (PDT)   author:   Kellie Fitton

Re: seethru client area   
"Chimanrao"  wrote in message 
news:270e398a-a73b-4c7f-9b26-fae3886e2630@i29g2000prf.googlegroups.com...
> hi,
>
> I want to create a window where you can "see-thru" it,i.e the contents
> of the window below it should be visible.
> How can I do this?


If your window class responds to the WM_ERASEBKGND message and does nothing
in response except return a non-zero value, then the window's client area
will be "transparent".

Mark

-- 
Mark Salsbery
Microsoft MVP - Visual C++




>
> Regards
> Chimanrao
date: Mon, 31 Mar 2008 13:42:30 -0700   author:   Mark Salsbery [MVP] MarkSalsbery[MVP]@newsgroup.nospam

Re: seethru client area   
"Chimanrao"  wrote in message 
news:270e398a-a73b-4c7f-9b26-fae3886e2630@i29g2000prf.googlegroups.com...
> hi,
>
> I want to create a window where you can "see-thru" it,i.e the contents
> of the window below it should be visible.
> How can I do this?


If your window class responds to the WM_ERASEBKGND message and does nothing 
in response except return a non-zero value, then the window's client area 
will be "transparent".

Mark

-- 
Mark Salsbery
Microsoft MVP - Visual C++


>
> Regards
> Chimanrao
date: Mon, 31 Mar 2008 11:48:20 -0700   author:   Mark Salsbery [MVP] MarkSalsbery[MVP]@newsgroup.nospam

Re: seethru client area   
On Mar 31, 8:04 pm, Kellie Fitton  wrote:
> On Mar 30, 8:40 pm, Chimanrao  wrote:
>
> > hi,
>
> > I want to create a window where you can "see-thru" it,i.e the contents
> > of the window below it should be visible.
> > How can I do this?
>
> > Regards
> > Chimanrao
>
> Hi,
>
> Well... you can achieve certain kinds of transparency by using
> alpha blending, which is part of GDI and GDI. So, you can use
> the following APIs to accomplish that:
>
>         CreateWindowEx()                WS_EX_TRANSPARENT
>
>         UpdateLayeredWindow()
>
>         SetLayeredWindowAttributes()
>
>         SetWindowRgn()
>
>         SetBkMode()             TRANSPARENT
>
>         AlphaBlend()
>
>         TransparentBlt()
>
> http://msdn2.microsoft.com/en-us/library/ms632680.aspx
>
> http://msdn2.microsoft.com/en-us/library/ms633556.aspx
>
> http://msdn2.microsoft.com/en-us/library/ms633540.aspx
>
> http://msdn2.microsoft.com/en-us/library/ms534845.aspx
>
> http://msdn2.microsoft.com/en-us/library/ms534862.aspx
>
> http://msdn2.microsoft.com/en-us/library/ms532324.aspx
>
> http://msdn2.microsoft.com/en-us/library/ms532303.aspx
>
> Kellie.

I did use WS_EX_TRANSPARENT style, with this the window see-thru, i.e
I can see the contents of the window below it.
But I dont get paint messages till the window below my window updates.
MSDN says that this style should nto be used for top level windows.
With Layered Windows the entire window blends into the background, I
want to make the lower window visisble thru the client area.

Chimanrao
date: Mon, 31 Mar 2008 20:01:11 -0700 (PDT)   author:   Chimanrao

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us