Modal dialogs in plug-in with QT


hi,

 

we trying create modal dialog in illustrator cs6 plug-in using qt.

but when call qdialog::exec() method, dialog appears not modal, can interact panels (move them, select colors palette , on).

the code using looks like:

 

static hwnd mainhwnd = ::findwindow(null, l"adobe illustrator cs6");

mydialog *dialog = new mydialog(new qwinwidget(mainhwnd));

dialog->exec();

or simply

qmessagebox::about(new qwinwidget(mainhwnd), "title", "text");

 

in both cases dialog , message box not modal.

 

the way create custom modal dialog have found using flash, not acceptable us.

could suggest how qt?

 

thanks!

you need make sure you're parenting off right handle. main window want parent off called 'illustrator'. have code goes looking first time it's requested , after caches handle since isn't going anywhere until illustrator closes.

 

this how figured out handle use:

 

  1. fire spy++ , find illustrator family of handles.
  2. put breakpoint in code create mydialog object , try different handles read manually spy++.
  3. when find 1 works, figure out how use win32 calls right handle. can verify again using spy++.


More discussions in Illustrator SDK


adobe

Comments

Popular posts from this blog

Thread: Can not create raid array: mdadm: no raid-devices specified.

Thread: HOW TO: Package and theme GTK+ / Gtkmm apps in Linux for Windows

Thread: Twinview issues