[comp.windows.x] Help on gracefull exit from DecWindows

gsk@idx.com (08/24/90)

I am new to Windows, and using the DecWindows implementation. I am trying to
test an interface to a windowing environment from a "old stype" interfacing
application. One problem I am having, and hope someone here can help with, is
understanding how to gracefully exit from windows, return to my old linear
application, and return back into a window environment.. (basically create a
windowing subroutine which is callable from the old main routine).. I have been
successful in calling the subroutine, and creating a simple window ( 2 buttons,
and three "Simple Text" widgets provided by Dec).. I am destroying the window
widget which was attached to the top_level shell.., an unmapping the
shell in the callback for the exit button, and processing the remaining events 
back in an explicit mainloop (while not_exiting or pending events,
get next app event, dispatch event type loop). I then return, and on subsequent
calls, bypass the XtToolkitInitialize and setup of the shell widget, and
just attempt to recreate the child widgets to the shell which should have been
created back on the first call.
  When I try this, the first call works fine, but subsequent calls die a
horrible death.. It seems that most windows applications are expected to exit
totally when done, rather than come back.. I can't seem to find a good
explanation of this from the Dec books, or the O'Reilly books...
  Anyone out there provide any insight?  Thanks!..


				-- George --

------------------------------------------------------------
- George Kaczowka   IDX Corp  Marlboro, MA  - gsk@idx.com -
------------------------------------------------------------