Connecting Tech Pros Worldwide Forums | Help | Site Map

Screen capture of non visible windows

Sambucus
Guest
 
Posts: n/a
#1: Jul 22 '05
Hi all!.

I'm trying to capture a screen shot of a window. This works good until
the window is partly or completley hidden, then i get the graphics of
what is visible on my screen (the windows that cover my screen shot
window). I have tried this in both MCF and pure win32 but with the
same result.

I know i can set the window i want to capture to the front/top with
commands such as SetForegroundWindow() and SetWindowPos(). The
problem is however that i don't want the window to be placed on top of
other windows.

Is this even possible? I not is there any other way to get the Bitmap
or color of pixels out of hidden windows?

Any help much appreciated!

Rob Williscroft
Guest
 
Posts: n/a
#2: Jul 22 '05

re: Screen capture of non visible windows


Sambucus wrote in news:d3ddfbc0.0402230620.1e2ebb03@posting.google.c om:
[color=blue]
> Any help much appreciated![/color]

Post your question in a news group where windows/MFC programmers
hang out:

news://comp.os.ms-windows.programmer.win32
news://comp.os.ms-windows.programmer.tools.mfc

HTH.

Rob.
--
http://www.victim-prime.dsl.pipex.com/
Stewart Gordon
Guest
 
Posts: n/a
#3: Jul 22 '05

re: Screen capture of non visible windows


While it was 2/23/04 2:20 PM throughout the UK, Sambucus sprinkled
little black dots on a white screen, and they fell thus:[color=blue]
> Hi all!.
>
> I'm trying to capture a screen shot of a window.[/color]

Standard C++ knows nothing of windows.
[color=blue]
> This works good until the window is partly or completley hidden, then
> i get the graphics of what is visible on my screen (the windows that
> cover my screen shot window). I have tried this in both MCF and pure
> win32 but with the same result.[/color]

Windows, in general, keeps no record of obscured window content. This
is why, when you write a Windows program, you have to tell it how to redraw.

Stewart.

--
My e-mail is valid but not my primary mailbox, aside from its being the
unfortunate victim of intensive mail-bombing at the moment. Please keep
replies on the 'group where everyone may benefit.
John Carson
Guest
 
Posts: n/a
#4: Jul 22 '05

re: Screen capture of non visible windows


"Stewart Gordon" <smjg_1998@yahoo.com> wrote in message
news:c1d2ts$6ft$1@sun-cc204.lut.ac.uk[color=blue]
>
> Windows, in general, keeps no record of obscured window content. This
> is why, when you write a Windows program, you have to tell it how to
> redraw.[/color]

True, but this doesn't necessarily stop you from getting a screen capture of
non-visible windows. You can ask a window to draw itself into a memory
device context.


--
John Carson
1. To reply to email address, remove donald
2. Don't reply to email address (post here instead)

Sambucus
Guest
 
Posts: n/a
#5: Jul 22 '05

re: Screen capture of non visible windows


Rob Williscroft <rtw@freenet.REMOVE.co.uk> wrote in message news:<Xns949893B58B0B8ukcoREMOVEfreenetrtw@195.129 .110.200>...[color=blue]
> Sambucus wrote in news:d3ddfbc0.0402230620.1e2ebb03@posting.google.c om:
>[color=green]
> > Any help much appreciated![/color]
>
> Post your question in a news group where windows/MFC programmers
> hang out:
>
> news://comp.os.ms-windows.programmer.win32
> news://comp.os.ms-windows.programmer.tools.mfc
>[/color]
I have done that to.
[color=blue]
> HTH.
>[/color]
Your welcome.[color=blue]
> Rob.[/color]
Sambucus
Guest
 
Posts: n/a
#6: Jul 22 '05

re: Screen capture of non visible windows


Stewart Gordon <smjg_1998@yahoo.com> wrote in message news:<c1d2ts$6ft$1@sun-cc204.lut.ac.uk>...[color=blue]
> While it was 2/23/04 2:20 PM throughout the UK, Sambucus sprinkled
> little black dots on a white screen, and they fell thus:[color=green]
> > Hi all!.
> >
> > I'm trying to capture a screen shot of a window.[/color]
>
> Standard C++ knows nothing of windows.
>[color=green]
> > This works good until the window is partly or completley hidden, then
> > i get the graphics of what is visible on my screen (the windows that
> > cover my screen shot window). I have tried this in both MCF and pure
> > win32 but with the same result.[/color]
>
> Windows, in general, keeps no record of obscured window content. This
> is why, when you write a Windows program, you have to tell it how to redraw.
>[/color]
Ok, then it was as i suspected. Back to my question, is there any way
to get the graphics or pixels (pixel color at certain X,Y is what I am
after) in a hidden window by any means, get it from memory or using
any type of system hook?[color=blue]
> Stewart.[/color]
Closed Thread