Jump to content
  • Advertisement
Sign in to follow this  

Dereferencing handles (managed c++)

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

So, first off: How in the world do I create a project in VC++ 2005 Express that does NOT use managed code and will still let me create forms? And is it advisable to do this, or should I always use managed code when I'm working with forms (I don't see why I should, but there's a lot I don't know). Secondly, and to the point of the problem I'm struggling with right now, I can't find much on dereferencing handles to objects. More specifically, I have figured out how to dereference a single handle to object so I can use it as a pointer, but I can't figure out how to dereference a handle that's a member of a handle. For example:
public ref class myForm : public System::Windows::Forms::Form {
		System::Windows::Forms::Panel^ myPanel;

ref class Engine
		myForm^ m_MyForm;
		void* m_ptr;

	m_MyForm = gcnew myForm();
	m_ptr = m_MyForm->myPanel;

I'm trying to create a d3d device in a panel... which is close-to-brainless in c#, so i'm guessing it has to be similarly simple in managed c++ - but i just can't figure out how to give the device method an IntPtr to the panel... Any help would be greatly appreciated. Thank you.

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!