Pixel date -> HDC
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Pixel date -> HDC

  1. #1
    Join Date
    Jan 2009

    Pixel date -> HDC

    I need to be able to have a drawing behind a variety of native windows controls. I really want to use OpenGL because I'm familiar with OpenGL and it's hardware accelerated. I know that I can't draw my OpenGL functions directly to my main window because OpenGL on windows requires a dedicated HWND, so I got the idea to do my OpenGL rendering to a hidden HWND and use glReadPixels to get the raw pixel data.

    Now I'm stuck. Is there a way to blit raw data onto an HDC? Or am I going to have to go through hoops to get this to work. I've been Googling for half an hour and haven't found a function to do what I want.

  2. #2
    Join Date
    Oct 2008

    Re: Pixel date -> HDC

    I'm not an OpenGL expert, but you could: 1) simply get your hidden window HDC and BitBlt it to the target HDC or 2) if you need to access raw data, you can create a divice indipendent bitmap and BitBlt the openGL window into it, modify data, then BitBlt to target HDC.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

HTML5 Development Center