Open / Close Panel with MapClientEventToSimEvent()

vertigo
Posts: 40
Joined: Mon Sep 13, 2010 5:08 pm

Postby vertigo » Wed Oct 27, 2010 10:56 am

Hey Guys,



Been running some tests with opening and closing specific panels with SimConnect and not having much luck.



I'm using the following:



Code:

//Attach the client event EVENT_OPEN_MINI_PANEL to the simulation event PANEL_8 and PANEL_8.

hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_OPEN_MINI_PANEL8, "panel_8");
hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_OPEN_MINI_PANEL9, "panel_9");

hr=SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_OPEN_MINI_PANEL8, 0, SIMCONNECT_GROUP_PRIORITY_DEFAULT, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);

hr=SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_OPEN_MINI_PANEL9, 0, SIMCONNECT_GROUP_PRIORITY_DEFAULT, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);

printf("\nOpen MiniPanel result = %u", hr);




Note: hr return is S_OK



I am using similar code to reset the flight, exit ESP and many other commands but none of the "panel_n" seems to work.



Thoughts?






beatle
Posts: 88
Joined: Thu Sep 16, 2010 8:34 pm

Postby beatle » Wed Oct 27, 2010 4:06 pm

Hey Christian,



I'm looking into this in between doing other stuff. So far I have verified that it doesn't seem to work here either, just haven't tracked down why it's not working yet.



Tim

vertigo
Posts: 40
Joined: Mon Sep 13, 2010 5:08 pm

Postby vertigo » Thu Oct 28, 2010 8:11 am

Hi Tim,



Thanks for the help. Basically the feature I'm trying to incorporate is turning a couple different panels ON and OFF depending in simulation state / events. If there is another way to do this with code I'm open to any ideas.



Thanks!



Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 13 guests