• Advertisement
Sign in to follow this  

Can I do this with a Window Handle?

This topic is 1475 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 Guys,

 

I am currently using a very restrictive API for my game, where I am making a DLL to (hopefully) expand upon it.

 

All I can really interface with my DLL is the handle to the window, Doubles, or Strings (this is by design for the API in use).

 

I can successfully write DLL's to do calculations, add XBOX controller support etc, but now I want to take it's graphics feature set a step further.

 

Having the Window Handle, it there any way I can use this window to display my own content such as Bitmaps or AVI files? Or is the HWND not enough for this sort of task.

 

I have no access to the API's Callback or anything like that. Only really the HWND.

 

Any advice on this would be awesome smile.png

Edited by lonewolff

Share this post


Link to post
Share on other sites
Advertisement

The answer is maybe. You can use an HWND as an argument to GetDC() which will give you a device context to the client area of the window, which can be used to render to the client area. However, not every HWND has a client area, and even if there is a client area that doesn't mean that the window won't immediately wipe whatever you drew and draw something else over it as part of its rendering process.

Share this post


Link to post
Share on other sites

Awesome, thanks man! I'll give that a try.

 

But Yes, I understand from your explanation that I may still not achieve what I want to do. But thanks :)

Share this post


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

  • Advertisement