Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can someone provide a working example of using a window

Featured Replies

...with the SDK (C++) and pressing the buttons. I just can't seem to get this to work. It obviously does as there are many programs (Squawk Box) that uses many UI windows. If I can just get ONE working example of entering text, clicking a button (with the *.win) to close the file, I know I can take it from there.Jeff

I'm using the the DLLEventNotice to capture any button presses, etc. I DO capture the Main menu clicks (such as File->Exit Fly!), but it doesn't appear to capture any my window BUTTON clicks!Also, I can display my own windows by capturing keystrokes. I can get text from a user entering data into an edit text area (using APIGetUIText or something like this...), so I know I'm on the right path.I just cannot press a button and capture it! I know it can be done, would someone simply provide an example of that? How do I capture a button press? If it's through the DLLEventNotice routine, would someone provide enough detail that I can work with?Jeff

  • Commercial Member

Hey Jeff-was my email helpful on this? If not, I can answer more questions if you have them... ;-)Cheers,

Lefteris Kalamaras - Founder

www.flightsimlabs.com

 

sig_fsldeveloper.jpg

Lefteris,Yes, you're email was very helpful! Thank you! I capture button presses now. However, I can't get the APIOpenFileDialog to close it's window!I can get the file name, etc. but the darn thing will not close!If I add a close window (X), it will close, but I doubt this is the correct way to close. This same dialog box appears when choosing a metar file, and it closes automatically after choosing a metar file.I can't get it to act the same way!I could use APICreateWindow2, which allows me to close using APICloseWindow2, but I'd have to add all the file functions (yech!).Have you any luck using APIOpenFileDialog?Cheers,Jeff

  • Commercial Member

Jeff-I've never used APIOpenFileDialog, but from what I see in the SDK, there is a SDLLObject* in the parameters. This means that the dialog must be passing a button press event to that DLLObject whenever the user presses the Open or the Cancel button. (I am thinking aloud here).This also means you could possibly get the window ID from that event, and try to close its corresponding window, which must be the dialog box.Would that work?

Lefteris Kalamaras - Founder

www.flightsimlabs.com

 

sig_fsldeveloper.jpg

Thanks Lefteris,I understand what you're saying. There are two APICloseWindow's. The first uses a pointer to the window object, the second uses a window ID. By capturing the window ID and using APICloseWindow2(long window id), I could try and close the APIOpenFileDialog window. Is this what you mean?Cheers,Jeff

  • Commercial Member

Jeff-either way - you could try getting the SDLLObject pointer from the DLLEventNotice that gets called with the button push, and see what the window ID for that is. Then, you could close it with CloseWindow() or CloseWindow2(). Try it out.

Lefteris Kalamaras - Founder

www.flightsimlabs.com

 

sig_fsldeveloper.jpg

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.