Jump to content

  • Log In with Google      Sign In   
  • Create Account


Embedding Direct3D 9 into a winform


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 littletray26   Members   -  Reputation: 267

Like
0Likes
Like

Posted 27 October 2012 - 01:31 AM

Hey GameDev

I'm creating a tile based 2D RPG and I've come to the stage where I need to create a world editor.

I don't know a great deal of programming windows or buttons and stuff so I'm looking to use Direct3D 9 in conjunction with a WinForm.

I need to be able to have a Direct3D window take up some of the WinForm, but still have space left over for my buttons or droplists.

Does anyone know a tutorial or could explain to me how I'd be able to do this? Embed a Direct3D 9 window into a winform...

If there is an easier/better way I'm all ears Posted Image Thanks GameDev

Edited by littletray26, 27 October 2012 - 01:32 AM.

The majority of Internet Explorer users don't understand the concept of a browsing application, or that there are options.
They just see the big blue 'e' and think "Internet". The thought process usually does not get much deeper than that.

Worms are the weirdest and nicest creatures, and will one day prove themselves to the world.

I love the word Clicky :)

Sponsor:

#2 Bacterius   Crossbones+   -  Reputation: 8312

Like
0Likes
Like

Posted 27 October 2012 - 04:12 AM

It can be done, but you need to create a client area within your window specifically reserved for D3D and use its handle (not the form handle) in D3D calls. Otherwise DirectX will indiscriminately draw all over your components and it'll be a mess. What is your language? C#? It might have a "canvas" component you can use... at least I could do that in D3D11. Don't know about D3D9.

The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.

 

- Pessimal Algorithms and Simplexity Analysis


#3 littletray26   Members   -  Reputation: 267

Like
0Likes
Like

Posted 27 October 2012 - 10:04 AM

It can be done, but you need to create a client area within your window specifically reserved for D3D and use its handle (not the form handle) in D3D calls. Otherwise DirectX will indiscriminately draw all over your components and it'll be a mess. What is your language? C#? It might have a "canvas" component you can use... at least I could do that in D3D11. Don't know about D3D9.


My language is C++.

How would I go about reserving a space in the form and getting it's handle?
The majority of Internet Explorer users don't understand the concept of a browsing application, or that there are options.
They just see the big blue 'e' and think "Internet". The thought process usually does not get much deeper than that.

Worms are the weirdest and nicest creatures, and will one day prove themselves to the world.

I love the word Clicky :)




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