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.
MikeR
Posts: 767 Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:
Post
by MikeR » Sun Aug 28, 2005 3:57 am
I have a button: Open that I would like to open another program from within an irrlicht app. I have been searching the web, but can't figure out how to code it.
Code: Select all
class MyEventReceiver : public IEventReceiver{public: virtual bool OnEvent(SEvent event) { if (event.EventType == EET_GUI_EVENT) { s32 id = event.GUIEvent.Caller->getID(); IGUIEnvironment* env = device->getGUIEnvironment();
switch(event.GUIEvent.EventType)
{
case EGET_BUTTON_CLICKED:
if (id == 101)
{
device->OpenDevice(myOtherApp.exe);
return true;
}
(code is example only)
Would this code work? or is there another way?
If it exists in the real world, it can be created in 3d
Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram
Guest
Post
by Guest » Sun Aug 28, 2005 4:20 am
spawnlp
Didine
Posts: 19 Joined: Wed Aug 24, 2005 1:22 pm
Location: France
Contact:
Post
by Didine » Sun Aug 28, 2005 9:15 am
system("your_app.exe");
WToma
Posts: 70 Joined: Tue Aug 09, 2005 8:38 am
Location: Szeged, Hungary
Post
by WToma » Sun Aug 28, 2005 9:58 am
I think it is very system specific. Under windows, see ShellExecuce and ShellExecuceEx API functions.
Toma
"This is not a bug, this is a feature!"
MikeR
Posts: 767 Joined: Sun Dec 26, 2004 4:03 pm
Location: Northern California USA
Contact:
Post
by MikeR » Sun Aug 28, 2005 3:00 pm
I added: system("myApp.exe"); and it compiles fine, but won't open.
I may have to go a different route.
(the exe is where it's supposed to be.)
Fixed and working. I was linking wrong. system("folder\\myApp.exe"); works great.
If it exists in the real world, it can be created in 3d
Sys specs:
AMD 3700+ 64 processor
1.0 gb ram
e-Geforce 6600 graphics 256 mb onboard ram