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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Desktop DC with transparent windows

Desktop DC with transparent windows

Scheduled Pinned Locked Moved C / C++ / MFC
csshelptutoriallounge
1 Posts 1 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.
  • M Offline
    M Offline
    MAAK
    wrote on last edited by
    #1

    I work on a program that involves zooming areas under the mouse cursor from the desktop window. I capture the DC of the desktop using GetDesktopWindow() and GetWindowDC(). The problem is that when their exist a transparent window (WS_EX_LAYERED and any alpha level less than 255) under the cursor, the window does not appear in the DC and instead the windows below it appear as if does not exit. Below is general view of my code: HDC hDeskDC; HWND hDeskTop = GetDesktopWindow(); hDeskDC = GetWindowDC(hDeskTop); HDC hTempDC; //hWnd is a static control I blit the desktop dc onto hTempDC = GetDC(hWnd); //point is the mouse coordinates StretchBlt(hTempDC, 0, 0, 49, 49, hDeskDC, point.x - 3, point.y - 3, 7, 7, SRCCOPY); . . . ReleaseDC(hDeskTop, hDeskDC); I need to know how to get the desktop DC including any transparent windows on it. Some programs do it like the Accessability Magnifier comes with Win2k and WinXP.

    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