April 29, 200224 yr Hi Fly!SimFriends,Is there someone here, who can tell me how to use buttons in a UI window ?There is no API feature like 'APIGetUIButtonState'. The only thing I found was 'DLLEventNotice' but I couldn't made it work...Thanks for the help,Laurent
May 7, 200224 yr Hi Laurent,I was having the same sort of problem. The window gets created fine. You can do things to it (i.e., APISetUILabelText(), APIAddUIPopupItem(), etc., all work fine). Yet you never get callbacks to DLLEventNotice() for button presses and the like. It turns out that Fly! II has some interesting behaviors. For instance, if you call APICreateWindow2() passing an uninitialized SDLLObject pointer as the third parameter, Fly! II will happily create the window for you and consume all of that window's events. What you need to do is call APICreateDLLObject() just prior to calling APICreateWindow2(), as in...SDLLObject *notify = APICreateDLLObject();notify->dllObject = 0; // or a pointer to some useful structure.APICreateWindow2( '~tcA', "SimpleButton.win", notify );Just so long as notify points to a valid Fly! II DLLObject structure, you will get callbacks to DLLEventNotify().Hope this helps...Cheers, Tony
May 8, 200224 yr Thanks Tony,I will try your solution...If I can get something I will send an example code...CheerLaurent
Create an account or sign in to comment