By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,870 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,870 IT Pros & Developers. It's quick & easy.

Screen capture of non visible windows

P: n/a
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!
Jul 22 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Sambucus wrote in news:d3**************************@posting.google.c om:
Any help much appreciated!


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/
Jul 22 '05 #2

P: n/a
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:
Hi all!.

I'm trying to capture a screen shot of a window.
Standard C++ knows nothing of windows.
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.


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.
Jul 22 '05 #3

P: n/a
"Stewart Gordon" <sm*******@yahoo.com> wrote in message
news:c1**********@sun-cc204.lut.ac.uk

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.


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)

Jul 22 '05 #4

P: n/a
Rob Williscroft <rt*@freenet.REMOVE.co.uk> wrote in message news:<Xn**********************************@195.129 .110.200>...
Sambucus wrote in news:d3**************************@posting.google.c om:
Any help much appreciated!
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

I have done that to.
HTH.
Your welcome. Rob.

Jul 22 '05 #5

P: n/a
Stewart Gordon <sm*******@yahoo.com> wrote in message news:<c1**********@sun-cc204.lut.ac.uk>...
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:
Hi all!.

I'm trying to capture a screen shot of a window.
Standard C++ knows nothing of windows.
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.


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.

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? Stewart.

Jul 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.