Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Using MagSetImageScalingCallback

Using MagSetImageScalingCallback

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiocomtutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thanh_bkhn
    wrote on last edited by
    #1

    Hi everyone, I need to use MagSetImageScalingCallback to capture the desktop screen. But I cannot find out how to call it correctly. I know it's odd, but do you have any idea about this deprecated function?

    _ 1 Reply Last reply
    0
    • T thanh_bkhn

      Hi everyone, I need to use MagSetImageScalingCallback to capture the desktop screen. But I cannot find out how to call it correctly. I know it's odd, but do you have any idea about this deprecated function?

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      The documentation link that you provided has some lines in it that I would like to quote here -

      Quote:

      Note The MagSetImageScalingCallback function is deprecated in Windows 7 and later, and should not be used in new applications. There is no alternate functionality.

      Quote:

      This function requires Windows Display Driver Model (WDDM)-capable video cards.

      Quote:

      This function works only when Desktop Window Manager (DWM) is off.

      For screen capture, look at the following articles - Various methods for capturing the screen[^] Barry's Screen Capture[^] Not sure if this is already mentioned in the articles, but I once captured the screen using the CreateDC API used this way -

      HDC hdc = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);

      You then save the device context in hdc to a file. Read here for saving the device context - Converting Device context to images ( PNG , JPEG , BMP , GIF) , Creating PDF & Printing to the Printer[^] Saving (part of) a Device Context as a Bitmap[^]

      «_Superman_»  _I love work. It gives me something to do between weekends.

      _Microsoft MVP (Visual C++) (October 2009 - September 2013)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups