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: Thu, 15 May 2008 12:08:13 +0200,    group: microsoft.public.win32.programmer.gdi        back       


Capture partially hidden or minimized windows   
Hi all

i remember to have seen a solution for capturing a window
that is either minimized or partailly or fully covered by
another window or outside the visible desktop.

That code i use currently only works with an active window.
It is very common code, that creates a DC, a compatible DC,
a compatible bitmap based on the given hwnd, BitBlts the bytes
into the comp-DC and finally into the comp-bitmap using
GetBitmapBits.

I am sure I've seen a solution that doesn't assume the window
is actually visible/active/non-minimized?

Any ideas?

Thx for reading,
Alex
date: Thu, 15 May 2008 12:08:13 +0200   author:   Alexander Mueller

Re: Capture partially hidden or minimized windows   
Alexander Mueller schrieb:
> Hi all
> 
> i remember to have seen a solution for capturing a window
> that is either minimized or partailly or fully covered by
> another window or outside the visible desktop.
> 
> That code i use currently only works with an active window.
> It is very common code, that creates a DC, a compatible DC,
> a compatible bitmap based on the given hwnd, BitBlts the bytes
> into the comp-DC and finally into the comp-bitmap using
> GetBitmapBits.
> 
> I am sure I've seen a solution that doesn't assume the window
> is actually visible/active/non-minimized?
> 
> Any ideas?


I found a good solution on The Code Project that
simply uses PrintWindow instead of BitBlt.
http://www.codeproject.com/KB/cs/CapturingMinimizedWindow.aspx

Nice thing for only one line needs to get changed.

Now i am facing a different problem.

I am sequentially capturing the same window for creating
a vid from it (using Windows Media SDK).
The side-effect of using PrintWindow is that the captured
window doesn't seem to get updated properly and displays
all kinds of artefacts while the sequence of "Screenshots"
continuous, looks very odd.

Any ideas, could it help to send some update-msg to the window 
before/after Printing?
I am not an expert in this Sendmessage stuff a/o core
window routines.

Any ideas again?

Thx,
Alex
date: Thu, 15 May 2008 13:33:38 +0200   author:   Alexander Mueller

Google
 
Web ureader.com


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