Jump to content
  • Advertisement
Sign in to follow this  
wease

How do I use directX with a CDC?

This topic is 4879 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have this weird problem where I must use a CDC to draw to my application. I want to draw on the desktop. If I get the desktop DC, I can draw on it without any trouble. However, I am not using directx. To use directx, I tried getting the desktop HWND but when I pass it to directx's CreateDevice, it does not work properly. It will not draw on the desktop. Maybe I have to update the HWND or something but I"m not really sure. Anyway, is there someway I can use directX with a CDC instead of an HWND?

Share this post


Link to post
Share on other sites
Advertisement
I don't think you want a device context. But maybe you shouldn't be getting the desktop HWND, but one for the window you want to draw on? What currently happens - some DX rendering or nothing at all?

Share this post


Link to post
Share on other sites
nothing happens. if I switch the Hwnd with one to an actual window, it works fine. But I want to draw on the desktop (ie, on icons and they background, ect.), not on a window.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!