MagImageScalingCallback doesn't work in secondary monitor

JunPing Li 1 Reputation point

Hi, I'm using Magnification API to capture screenshoot, and I have some problems.
When I set up my magnifier window rect same as Secondary Monitor rect (such (1920,0,3840,1080)) , I can't get rgb data from MagImageScalingCallback.
Actually , MagImageScalingCallback can work normally on the primary monitor which rect is (0,0,1920,1080).
I can't find any doc to introduce how MagImageScalingCallback working on.
Can anybody tell me how to get rgb data from Secondary Monitor with Magnification API?
ps: my magnifier host window is showed as hidden.

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,575 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Cymon Kilmer -MSFT 801 Reputation points

    From this documentation its noted that the MagImageScalingCallback was deprecated in Windows 7 and there is no replacement.

  2. JunPing Li 1 Reputation point

    Well, I wanna get the rgb data from magnifier window that show with SW_HIDE command. But I can't get data from this callback at secondary monitor

    0 comments No comments

  3. Krishandevan k 1 Reputation point

    @JunPing Li Did you get any fix for this ? Only way I see is like you have to capture secondary screen as parts and stich it.

    0 comments No comments

  4. Grey 5 Reputation points


    I test the code of webrtc, find that if you want use magnification API to capture sub screen, maybe you should satisfy following conditions:

    • make sure that the sum of left of host_window_ and magnifier_window_ is zero
    • make sure that the sum of top of host_window_ and magnifier_window_ is zero
    • make sure that the native_rect of MagSetWindowSource() equals to sub screen's position
    0 comments No comments