How to create device in c++ picture box ??

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
yoes_san
Posts: 9
Joined: Mon Dec 11, 2006 7:22 am

How to create device in c++ picture box ??

Post by yoes_san »

I want to create irrlicht device in a picture box named 'pic_3d'.
But when I try to create, it returns errors:
Error 9 error C2664: 'irr::createDevice' : cannot convert parameter 7 from 'System::IntPtr' to 'irr::IEventReceiver *' d:\irr_demo\clr\min.h 119
Error 18 error C2664: 'irr::createDevice' : cannot convert parameter 7 from 'System::IntPtr' to 'irr::IEventReceiver *' d:\irr_demo\clr\min.h 119
Here's my on_load function, form name is 'min':

Code: Select all

private: System::Void min_Load(System::Object^  sender, System::EventArgs^  e) {
				
				IrrlichtDevice *device = createDevice( video::EDT_SOFTWARE2, dimension2d<s32>(this->pic_3d->Width, this->pic_3d->Height), 16, false, false, false, this->pic_3d->Handle);

			 }
	};
Am I input wrong parameters into the arguments?
Any suggestions?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

The final parameter of createDevice should be a pointer to an EventReceiver, not to what ever you're trying to pass in :lol:

Probably you want to look at the Win32 Window tutorial, might be more what you're after.
Image Image Image
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Or have a look at this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=17705
I posted there the code to run Irrlicht inside Window's Notepad... ;)
You'll see how it works to create Irrlicht inside another window by usig a handle...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

That's pretty damned cool Acki, just had to try it out! :lol:
Image Image Image
Post Reply