I've written an automation plugin for photosho with Visual Studio 2005 & Photoshop SDK. When I click the menu, I want to show a non-modal dialog, which is created by ADM. Finally, when I got everything ready, and ran the plugin, the dialog appeared just fine. But when I looked inside the "module window" in VS, I couldn't find my plugin. This could cause serious trouble, cause all my callback functions are gone, too. How did this happen? Can I keep the plugin from being unloaded when the dialog is showing?
See the FAQ:
3.1.3 What can I not do with the Photoshop API?
No non-modal plug-ins. No plug-in tools. No plug-in floating windows. No plug-in palettes. No plug-in brushes. No adding or changing menus.
More info here:
Do not try to make a 'non modal dialog'.
Your only official option is via the Panel Guide.
Persistent only works for automation plug-in types. The Persistent flag is there so your automation plug-in can get callbacks from Photoshop. It is not for UI support. You will probably not get the events you need in your 'non modal dialog'. You will interfere with how events are handled in Photoshop. Your plug-in may seem to actually work but it will be very buggy and cause crashes.
We realize that developers really want to do this but at the present time there is no API to support non modal dialogs in the C/C++ Photoshop API.
You definitely want to heed Tom's warning. While you _may_ get the ADM palette up and running, from our experience you'd be looking at A BIG PILE of work to resolve all the issues associated with it, since just as Tom said PS is not really designed for this task. And then again, ADM is dead, so why bother?
I know that probably 99% of C++ programmers do not want to go to the Flash land willingly, but this seems to be the only practical way.