Hallo Pete
Hope you had your holiday in January.
You helped me last to use the information generated by your FSUIPC log facility:
590140 *** EVENT: Cntrl= 66587 (0x0001041b), Param= 74070 (0x00012156) ROTOR_BRAKE
to activate a rotorswitch on the panel of the PMDG 747-400 in the following way:
{fswnd = FindWindow("FS98MAIN", NULL);
PostMessage(fswnd, WM_COMMAND, 66587, 74070);}
and it works perfectly, thank you.
However, when I turn the rotorswitch on the panel and use Microsoft Spy++ to spy on Window FS98MAIN,
the following are revealed:
<00375> 002403EC P WM_COMMAND wNotifyCode:0201 wID:1051 hwndCtl:00012156 [wParam]
Notice that the wParam:0201041B (revealed by Spy++) is not exactly the same as the wParam (0x0001041b) revealed
by your FSUIPC log facility.
Furthermore, when I push a button on the panel, the FSUIPC log reveals:
218219 *** EVENT: Cntrl= 71023 (0x0001156f), Param= 0 (0x00000000)
but when I spy on Window FS98MAIN, the wParam (or lParam) values are not revealed, only the mouse event:
<00431> 002403EC S WM_PARENTNOTIFY fwEvent:WM_LBUTTONDOWN xPos:603 yPos:591 [wParam]
<00432> 002403EC R WM_PARENTNOTIFY lResult:00000000
<00433> 002403EC S .WM_MOUSEACTIVATE hwndTopLevel:002403EC nHittest:HTCLIENT uMsg:WM_LBUTTONDOWN [wParam]
<00434> 002403EC R .WM_MOUSEACTIVATE fuActivate:MA_ACTIVATE [lResult]
<00435> 002403EC P message:0xB209 [user-defined:WM_USER+44553] wParam:00000020 lParam:00000000
How did FSUIPC get hold of the values?
I wish to test for the wParam (or lParam) values to play a voicefile when I push a button.
All the best,
Bertus