January 16, 200323 yr ...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
January 18, 200323 yr 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
January 23, 200323 yr 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
January 25, 200323 yr 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
January 27, 200323 yr 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
January 28, 200323 yr 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
January 28, 200323 yr 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
Create an account or sign in to comment