How to create an application modal dialog box on a button click on Panel using Illustrator plugin development SDK ?
I show some API in AIUserSuite like OKCancelAlert, ErrorAlert, YesNoAlert, MessageAlert, MessageAlertEx, QuestionAlert.
However, I want to create my custom dialog from resource file, for that, How to get the main illustrator window's handle to pass in Win32 API 'DialogBox' to create the application modal dialogbox ?
Hi Ged, can mods also add tags to posts? Here the SDK and Scripting tags would be useful if so.
Yep we can 🙂
Nice, thank you!
Did you ever figure out a solution to this? I need to access the Adobe window handle in order to spawn a modal dialog. I also need to make this work for MacOS.
I don't have perfect solution because the Panel window can be attached to other panel window too.
Find the most parent window handle for launching the dialog:
Used GetParent() function until I get the output parent handle as null or equal to GetDesktopWindow().
However, Sometime it is possible to go to Panel window from the dialog box.
Hence, the steps:
1. Disabled all the controls on Panel Window.
2. Launch the Dialogbox using MAKEINTRESOURCE, setting the parent as found by GetParent described above.
3. Once DialogBox returns, enable all the controls on Panel window
If you find any better solution then let me know.