Hello,
I'm capture the screen using following code.

HDC hDesktopDc=GetDC(GetDesktopWindow());
INT iWidth=GetSystemMetrics(SM_CXSCREEN);
INT iHeight=GetSystemMetrics(SM_CYSCREEN);

HDC hClientDc=GetDC(hWnd);

BitBlt(hClientDc,0,0,iWidth,iHeight,hDesktopDc,0,0,SRCCOPY);

But I'm not getting gadgets on screen in this capture. Could anyone
please give some hint to capture the gadgets in screen shot?

Regards,
Gurmit

Re: How to capture the screen in Vista which include gadgets as well by Igor

Igor
Fri Jun 01 07:04:44 CDT 2007

"Gurmit Teotia" <gurmitsoft@gmail.com> wrote in message
news:1180698982.126122.134580@d30g2000prg.googlegroups.com
> I'm capture the screen using following code.
>
> HDC hDesktopDc=GetDC(GetDesktopWindow());

You need HDC for the screen, not the desktop window. Use GetDC(0)
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925



Re: How to capture the screen in Vista which include gadgets as well by Gurmit

Gurmit
Fri Jun 01 07:21:47 CDT 2007

On Jun 1, 5:04 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>
> news:1180698982.126122.134580@d30g2000prg.googlegroups.com
>
Hi Igor,
Thanks for your response.I tried this approach but I'm still not
getting the gadgets in screen shot.

Regards,
Gurmit

> > I'm capture the screen using following code.
>
> > HDC hDesktopDc=GetDC(GetDesktopWindow());
>
> You need HDC for the screen, not the desktop window. Use GetDC(0)
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925



Re: How to capture the screen in Vista which include gadgets as well by Igor

Igor
Fri Jun 01 07:28:10 CDT 2007

"Gurmit Teotia" <gurmitsoft@gmail.com> wrote in message
news:1180700507.793450.154970@j4g2000prf.googlegroups.com
> On Jun 1, 5:04 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
>> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>>
>> news:1180698982.126122.134580@d30g2000prg.googlegroups.com
>>
> Thanks for your response.I tried this approach but I'm still not
> getting the gadgets in screen shot.

What exactly do you mean by "gadgets"? What _do_ you get in the
screenshot?
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925



Re: How to capture the screen in Vista which include gadgets as well by Gurmit

Gurmit
Fri Jun 01 07:35:12 CDT 2007

Gadgets on Sidebar in Vista OS. I'm getting desktop wallpaper instead
of gadgets & Sidebar.


On Jun 1, 5:28 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>
> news:1180700507.793450.154970@j4g2000prf.googlegroups.com
>
> > On Jun 1, 5:04 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
> >> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>
> >>news:1180698982.126122.134580@d30g2000prg.googlegroups.com
>
> > Thanks for your response.I tried this approach but I'm still not
> > getting the gadgets in screen shot.
>
> What exactly do you mean by "gadgets"? What _do_ you get in the
> screenshot?
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925



Re: How to capture the screen in Vista which include gadgets as well by Ivan

Ivan
Fri Jun 01 11:07:53 CDT 2007

I think the O.P. means Layered Window instead of `gadgets`.
The SideBar.exe `gadgets` are implemented as layered window.
You need to add the CAPTUREBLT flag to BitBlt.
Then, you need to rethink your need to capture the screen,
becuse your performance will take a severe hit with desktop composition
active.

--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Gurmit Teotia" <gurmitsoft@gmail.com> wrote in message
news:1180701312.363505.200480@z28g2000prd.googlegroups.com...
> Gadgets on Sidebar in Vista OS. I'm getting desktop wallpaper instead
> of gadgets & Sidebar.
>
>
> On Jun 1, 5:28 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
>> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>>
>> news:1180700507.793450.154970@j4g2000prf.googlegroups.com
>>
>> > On Jun 1, 5:04 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
>> >> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>>
>> >>news:1180698982.126122.134580@d30g2000prg.googlegroups.com
>>
>> > Thanks for your response.I tried this approach but I'm still not
>> > getting the gadgets in screen shot.
>>
>> What exactly do you mean by "gadgets"? What _do_ you get in the
>> screenshot?
>> --
>> With best wishes,
>> Igor Tandetnik
>>
>> With sufficient thrust, pigs fly just fine. However, this is not
>> necessarily a good idea. It is hard to be sure where they are going to
>> land, and it could be dangerous sitting under them as they fly
>> overhead. -- RFC 1925
>
>



Re: How to capture the screen in Vista which include gadgets as well by Gurmit

Gurmit
Sat Jun 02 00:46:39 CDT 2007

Thanks a lot it worked for me.


On Jun 1, 9:07 pm, "Ivan Brugiolo [MSFT]"
<ivanb...@online.microsoft.com> wrote:
> I think the O.P. means Layered Window instead of `gadgets`.
> The SideBar.exe `gadgets` are implemented as layered window.
> You need to add the CAPTUREBLT flag to BitBlt.
> Then, you need to rethink your need to capture the screen,
> becuse your performance will take a severe hit with desktop composition
> active.
>
> --
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of any included script samples are subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm
>
> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>
> news:1180701312.363505.200480@z28g2000prd.googlegroups.com...
>
>
>
> > Gadgets on Sidebar in Vista OS. I'm getting desktop wallpaper instead
> > of gadgets & Sidebar.
>
> > On Jun 1, 5:28 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
> >> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>
> >>news:1180700507.793450.154970@j4g2000prf.googlegroups.com
>
> >> > On Jun 1, 5:04 pm, "Igor Tandetnik" <itandet...@mvps.org> wrote:
> >> >> "Gurmit Teotia" <gurmits...@gmail.com> wrote in message
>
> >> >>news:1180698982.126122.134580@d30g2000prg.googlegroups.com
>
> >> > Thanks for your response.I tried this approach but I'm still not
> >> > getting the gadgets in screen shot.
>
> >> What exactly do you mean by "gadgets"? What _do_ you get in the
> >> screenshot?
> >> --
> >> With best wishes,
> >> Igor Tandetnik
>
> >> With sufficient thrust, pigs fly just fine. However, this is not
> >> necessarily a good idea. It is hard to be sure where they are going to
> >> land, and it could be dangerous sitting under them as they fly
> >> overhead. -- RFC 1925- Hide quoted text -
>
> - Show quoted text -