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: Wed, 04 Jun 2008 17:34:14 +0200,    group: microsoft.public.win32.programmer.ui        back       


Attempting to read content of Windows Vista magnification control (WC_MAGNIFIER)   
Hello,

I was advised in the past here to take advantage of Windows Vista 
Magnification API to get the area of the desktop obscured by a given 
window when on Windows Vista with DWM composition turned on.

It is indeed possible for magnification control to filter out unwanted 
windows easily by using MagSetWindowFilterList() API. However I need 
that filtered area for further processing and I am unable to "get it 
back" from magnification control. (I cannot simply use the control 
itself within my application for certain reasons).


I have tried the following so far:

- getting the window/client DC of magnification control and BitBlting 
from it. But this returns dead frame created during control's creation 
not the current content of the window.

- sending WM_PRINT/WM_PRINTCLIENT or using PrintWindow() API. None of 
these is implemented for Vista magnification control

- attemtped to hook WM_PAINT message for both magnifier control or its 
child "Hardware Magnifier" of MilMagnifierHwnd class but to no avail.

I've also attempted to provide my own MagImageScalingCallback routine, 
but it doesn't seem to work the way I'd expected it to.


So the question is: Is there a way to redirect the "magnified" output 
from magnification control to an internal buffer so I could read and 
process it as I see fit before displaying it within my window?


Thank you,
-- 
Grzegorz Wróbel
677265676F727940346E6575726F6E732E636F6D
date: Wed, 04 Jun 2008 17:34:14 +0200   author:   Grzegorz Wróbel

Re: Attempting to read content of Windows Vista magnification control (WC_MAGNIFIER)   
Grzegorz Wróbel wrote:
> Hello,
> 
> I was advised in the past here to take advantage of Windows Vista 
> Magnification API to get the area of the desktop obscured by a given 
> window when on Windows Vista with DWM composition turned on.
> 
> It is indeed possible for magnification control to filter out unwanted 
> windows easily by using MagSetWindowFilterList() API. However I need 
> that filtered area for further processing and I am unable to "get it 
> back" from magnification control. (I cannot simply use the control 
> itself within my application for certain reasons).
> 
> 
> I have tried the following so far:
> 
> - getting the window/client DC of magnification control and BitBlting 
> from it. But this returns dead frame created during control's creation 
> not the current content of the window.
> 
> - sending WM_PRINT/WM_PRINTCLIENT or using PrintWindow() API. None of 
> these is implemented for Vista magnification control
> 
> - attemtped to hook WM_PAINT message for both magnifier control or its 
> child "Hardware Magnifier" of MilMagnifierHwnd class but to no avail.
> 
> I've also attempted to provide my own MagImageScalingCallback routine, 
> but it doesn't seem to work the way I'd expected it to.
> 
> 
> So the question is: Is there a way to redirect the "magnified" output 
> from magnification control to an internal buffer so I could read and 
> process it as I see fit before displaying it within my window?

Does it create a child window in the window you give it?
Maybe you can bitblt from that?

-- 
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems
date: Wed, 04 Jun 2008 17:33:04 +0100   author:   Dean Earley

Re: Attempting to read content of Windows Vista magnification control (WC_MAGNIFIER)   
Dean Earley wrote:
>
>>
>> So the question is: Is there a way to redirect the "magnified" output 
>> from magnification control to an internal buffer so I could read and 
>> process it as I see fit before displaying it within my window?
> 
> Does it create a child window in the window you give it?

Yes, magnification control has one child window named "Hardware 
Magnifier" (MilMagnifierHwnd class).

> Maybe you can bitblt from that?
> 

Unfortunately the effect of using BitBlt() with DC obtained from that 
child is the same as in case of DC of magnification control itself: 
"dead frame" showing what was on the screen before magnification window 
was created, not the actual content of the magnification window or its 
child.


-- 
Grzegorz Wróbel
677265676F727940346E6575726F6E732E636F6D
date: Wed, 04 Jun 2008 20:05:23 +0200   author:   Grzegorz Wróbel

Re: Attempting to read content of Windows Vista magnification control (WC_MAGNIFIER)   
Grzegorz Wróbel wrote:
> Hello,
> 
> I was advised in the past here to take advantage of Windows Vista 
> Magnification API to get the area of the desktop obscured by a given 
> window when on Windows Vista with DWM composition turned on.
> 
> It is indeed possible for magnification control to filter out unwanted 
> windows easily by using MagSetWindowFilterList() API. However I need 
> that filtered area for further processing and I am unable to "get it 
> back" from magnification control. (I cannot simply use the control 
> itself within my application for certain reasons).
> 
> 
> I have tried the following so far:
> 
> - getting the window/client DC of magnification control and BitBlting 
> from it. But this returns dead frame created during control's creation 
> not the current content of the window.
> 
> - sending WM_PRINT/WM_PRINTCLIENT or using PrintWindow() API. None of 
> these is implemented for Vista magnification control
> 
> - attemtped to hook WM_PAINT message for both magnifier control or its 
> child "Hardware Magnifier" of MilMagnifierHwnd class but to no avail.
> 

Playing around with DWM APIs I could find that Vista itself can do what 
I want (DwmRegisterThumbnail(), DwmUpdateThumbnailProperties()...), but 
again I am not able to get to the bits of the client area of such 
thumbnail window.

It is completely encapsulated I can only modify/access the content of 
such windows using their limited set of existing DWM APIs, which in 
practice allows only simple scaling.

Looks like MS programmers created Desktop Window Manager that is good 
only for themselves, there is no door in for independent software 
developers.

So at this point I can only try to bug their support to get me 
WM_PRINT/WM_PRINTCLIENT/PrintWindow() implemented (at least for their 
own controls) or get myself "Doesn't work with Windows Vista" logo designed.

-- 
Grzegorz Wróbel
677265676F727940346E6575726F6E732E636F6D
date: Fri, 06 Jun 2008 20:36:39 +0200   author:   Grzegorz Wróbel

Google
 
Web ureader.com


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