[comp.lang.pascal] Help! modal windows

gsttallet@zach.fit.edu (Joe Tallet) (04/05/91)

I've noticed that there are two methods for shutting down modal windows:

  1)  Thru a 'quit'-type button.
  2)  Thru the CLOSE-WINDOW button in the upper L.H.(ULH) corner of the 
      modal window.

My problem is that I can't figure out what event the ULH button returns.
What event does pressing this button return?
Is it possible to create a modal window without this button? I'd assume
that to do so I'd have to specialize off of the current modal window
class.
Since trapping this event would work for me, I'd be content with the 
name of the event returned.

Thanks (in advance) for any information leading to the trapping and
subsequent manipulation of this event   :)

Please respond thru e-mail (also) because my access here is
not always guaranteed.

---------------------------------------------------------
Weave a circle round him thrice,    \      /  Jot@sps.com
And close your eyes with holy dread, \    /
For he on honey-dew hath fed,         \  /
And drunk the milk of Paradise.        \/
---------------------------------------------------------

seth@wet.UUCP (Seth Olitzky) (04/10/91)

In article <2259@winnie.fit.edu> gsttallet@zach.UUCP (Joe Tallet) writes:
>
>I've noticed that there are two methods for shutting down modal windows:
>
>  1)  Thru a 'quit'-type button.
>  2)  Thru the CLOSE-WINDOW button in the upper L.H.(ULH) corner of the 
>      modal window.
>
>My problem is that I can't figure out what event the ULH button returns.
>What event does pressing this button return?
>Is it possible to create a modal window without this button? I'd assume
>that to do so I'd have to specialize off of the current modal window
>class.
>Since trapping this event would work for me, I'd be content with the 
>name of the event returned.
>
>Thanks (in advance) for any information leading to the trapping and
>subsequent manipulation of this event   :)
>
From the manual on page 332 (Turbo Vision)

cmClose 

Handled by TWindow.HandleEvent if the InfoPtr field of the event record is
nil or points to the window.  If the window is modal (such as a modal
dialog) an evCommand with a value of cmCancel is generated through PutEvent.
if the window is modeless, the window's Close method is called if the 
window supports closing (see wfClose flag).  .....

I suggest that you read carefully the manual on TWindow and on TGroup.ExecView.




Turbo Vision, bringing the power of windows without having to rely on Microsoft.

-- 
-----------------------------------------------------------------------------
Seth Olitzky             seth@wet
         ...!sun!hoptoad!wet!seth
----------------------------------------------------------------------------