I'm currently programming the system switch for orbiter galaxy, which basically just means that Orbiter gets closed by a virtual keyboard input (i.e. the program "simulates" that ctrl+Q has been pressed) and started up again.
For this I copied over the code from MsssMFD, which looks like this (only the ctrl+Q thingy):
The code gets properly executed, but nothing happens. Is this method no longer possible with Orbiter 2010, or is there something wrong in that code (allthough it works quite flawlessly in MsssMFD in Orbiter 2006)? or is there an API-call for shutting Orbiter down?
For this I copied over the code from MsssMFD, which looks like this (only the ctrl+Q thingy):
Code:
keybd_event(VK_CONTROL, 0, 0, 0);
keybd_event(81, 0, 0, 0);
keybd_event(81, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_CONTROL, 0, KEYEVENTF_KEYUP, 0);