this sample function just presents the example to send command event into queue, this could prevent from thread unsafe problem that cause control or window crashed when you send event from a process to another,
- remember that control and window events should be processed in main thread.
- PostHICommand seems like call event handle directly, so use PostEventtoQueue is a better solution
EventRef nextEvent = NULL;
nextCmd.commandID = commandID ;
//nextCmd.menu.menuRef =0 ;
//nextCmd.menu.menuItemIndex = 0 ;