Jump to content
Sign in to follow this  
Guest

UI BUTTONS

Recommended Posts

Guest

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

Share this post


Link to post
Share on other sites
Guest

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

Share this post


Link to post
Share on other sites
Guest

Thanks Tony,I will try your solution...If I can get something I will send an example code...CheerLaurent

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...