[gme-users] modeless dialog box

Howard, Larry P larry.p.howard at Vanderbilt.Edu
Thu Jun 24 07:54:31 CDT 2004


I can only add a little to Peter's good advise based on our use of modeless 
dialogs from GME interpreters.

As Peter points out, the life cycle of an interpreter is inconsistent with the 
life cycle of a modeless dialog.  To create a modeless dialog from an 
interpreter implies that something with a different life cycle has to hold the 
reference to the created dialog and be responsible for cleaning up after it.  
We use an add-on for the latter, with OBJEVENT_CLOSEMODEL events triggering 
the clean-up operations.  Is there now is a functioning 
GLOBALEVENT_CLOSE_PROJECT event that would serve as well?

Although a bit circuitous, this approach provides at least one way to create 
modeless dialogs from GME interpreters.  BTW, our interpreters and add-on are 
coded in Python, and so it is unlikely that sample code from us would help 
BON2 (C++ yuk!) developers.

Quoting Peter Volgyesi <peter.volgyesi at vanderbilt.edu>:

> Generally, it is not recommended to create a non-modal dialog box in your
> component:
> - in a plug-in or in an interpreter it is prohibited to create such a window
> because of the general flow of control in such components. After returning
> from your component (InvokeEx() returns) there should be no interpreter
> windows lingering around.
> - you might create a modeless window in an BON2 add-on, but I don't have too
> much experience with this
> 
> The second part of your question is not GME releated but a general MFC
> issue:
> http://www.codeproject.com/dialog/gettingmodeless.asp
> 
> --
> peter
> 
> 
> > -----Original Message-----
> > From: gme-users-bounces at list.isis.vanderbilt.edu 
> > [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf 
> > Of Rajesh Sudarsan
> > Sent: Thursday, June 24, 2004 1:41 AM
> > To: 'A list for GME users to share thoughts and discuss bugs 
> > and fixes.'
> > Subject: [gme-users] modeless dialog box
> > 
> > 
> > Hi,
> > Is it possible to create a modeless MFC dialog box using a 
> > plug-in written in BON? I am not able to instantiate a MFC 
> > dialog box as a modeless window. The only way I can 
> > instantiate it is using DoModal() method.
> > 
> > Regards,
> > Rajesh
> > 
> > _______________________________________________
> > gme-users mailing list
> > gme-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> 
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> 


-----------------------------------------------------------------
Howard, Larry P
Vanderbilt University
Email: larry.p.howard at Vanderbilt.Edu


More information about the gme-users mailing list