How to open exe from within irrlicht?
Posted: 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 is example only)
Would this code work? or is there another way?
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;
}
Would this code work? or is there another way?