Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Can I do this with a Window Handle?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 DarkRonin   Members   -  Reputation: 613

Like
0Likes
Like

Posted 05 January 2014 - 08:42 PM

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, 05 January 2014 - 08:43 PM.


Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9628

Like
2Likes
Like

Posted 05 January 2014 - 09:17 PM

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.



#3 DarkRonin   Members   -  Reputation: 613

Like
0Likes
Like

Posted 05 January 2014 - 09:25 PM

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 :)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS