Jump to content
  • Advertisement
Sign in to follow this  
AndrewSterkhov

How I can get HDC in DirectX8

This topic is 5068 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

Advertisement
In DX7 (c++):
(where g_pDDSBack is your surface)

Quote:
HDC hdc;

g_pDDSBack->GetDC(&hdc);


And you get your HDC in the variable hdc.

Don't know if this works with DX8.

Share this post


Link to post
Share on other sites
You can't get a DC for a DX8 surface. If you need to do GDI operations on a texture you have 2 options:
1) Create a memory DC, do your stuff then Lock your texture and copy the result over
2) Upgrade to DX9

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!