CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    1

    Draw window in Memory Device Context

    Hi,
    Does someone know about drawing a window in a Memory Device Context, I need this so I can then read pixels from a window that is behind other windows. I need this for windows XP, not Vista.
    Thx in advance.
    Last edited by seedplusplus; March 15th, 2009 at 04:14 PM.

  2. #2
    Join Date
    Jun 2007
    Location
    MA-USA
    Posts
    247

    Re: Draw window in Memory Device Context

    If you want transparent windows you need a memory dc via CreateCompatibleDC
    Also you need a bitmap via CreateCompatibleBitmap
    You will also be using BitBlt to transfer the memory with a specific raster operation.
    The idea is to blit the child rect into your bitmap then transparently blit it onto the top window.
    Read about these functions and more at msdn.

    But first master the forging skills of win32 you will.
    http://www.winprog.org/tutorial/
    Last edited by bitshifter420; March 15th, 2009 at 06:11 PM.

  3. #3
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Draw window in Memory Device Context

    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured