I'm trying to use SimConnect_TransmitClientEvent() to set the zoom using the VIEW1_ZOOM_SET event and not having any luck.
Working from the examples given in the SimConnect SDK doc, here's my code:
My definition:
static enum EVENT_ID {
EVENT_SET_ZOOM
};
After SimConnect connects I do:
hr = SimConnect_MapClientEventToSimEvent(mhSimConnect, EVENT_SET_ZOOM, "VIEW1_ZOOM_SET");
Then upon command I issue:
hr = SimConnect_TransmitClientEvent(mhSimConnect, 0, EVENT_SET_ZOOM, 64 , SIMCONNECT_GROUP_PRIORITY_DEFAULT, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
This should set the zoom to 1x but it does nothing. hr returns as S_OK to all my functions and I know SimConnect is working as other functions work ok.
Any ideas? BTW, this is a local client application. I've tried the same code to do other things like raise or lower the gear and that's not working either, so I think it's code specific rather than to do with this particular event.
Thanks,
Si
Working from the examples given in the SimConnect SDK doc, here's my code:
My definition:
static enum EVENT_ID {
EVENT_SET_ZOOM
};
After SimConnect connects I do:
hr = SimConnect_MapClientEventToSimEvent(mhSimConnect, EVENT_SET_ZOOM, "VIEW1_ZOOM_SET");
Then upon command I issue:
hr = SimConnect_TransmitClientEvent(mhSimConnect, 0, EVENT_SET_ZOOM, 64 , SIMCONNECT_GROUP_PRIORITY_DEFAULT, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
This should set the zoom to 1x but it does nothing. hr returns as S_OK to all my functions and I know SimConnect is working as other functions work ok.
Any ideas? BTW, this is a local client application. I've tried the same code to do other things like raise or lower the gear and that's not working either, so I think it's code specific rather than to do with this particular event.
Thanks,
Si
