how to disable Windows close menu on a top level window 
Author Message
 how to disable Windows close menu on a top level window

hi,

does anyone know how to disable the close menu (upper left) in Windows
for a top level window.

I know about
 wm overrideredirect .x

but that removes all of the decoration frame around the top level window.

I want the decoration stuff there, just a way to disable or possibley
trap the close menu choice.

this problem is short circuting a form that needs to do cleanup when
it's own TCL dismiss button is pressed.

thanks,

Michael Charbonneau



Mon, 10 May 1999 03:00:00 GMT  
 how to disable Windows close menu on a top level window


Quote:

>I want the decoration stuff there, just a way to disable or possibley
>trap the close menu choice.

You might try 'wm transient .toplevel .'.  Also, it's easy to trap that
close with 'wm protocol WM_DELETE_WINDOW .toplevel myproc' as shown at:
        http://www.cs.uoregon.edu/research/tcl/faqs/tk/#wm/delete

--
     Jeffrey Hobbs                       office: 541.683.7891

              URL: http://www.cs.uoregon.edu/~jhobbs/



Wed, 12 May 1999 03:00:00 GMT  
 how to disable Windows close menu on a top level window

Quote:

> hi,

> does anyone know how to disable the close menu (upper left) in Windows
> for a top level window.

> I know about
>  wm overrideredirect .x

> but that removes all of the decoration frame around the top level window.

> I want the decoration stuff there, just a way to disable or possibley
> trap the close menu choice.

> this problem is short circuting a form that needs to do cleanup when
> it's own TCL dismiss button is pressed.

> thanks,

> Michael Charbonneau

Try the following line:
    wm protocol . WM_DELETE_WINDOW MyCleanUpRoutine

--
Dan Milligan



Sat, 15 May 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Configure menu command to destroy top-level window

2. How to configure menu command to destroy top-level window

3. Creating Non resizeable top level windows

4. Move a frame between top-level windows

5. top-level windows and Netscape plugin

6. top level windows.

7. A simple question about top level tcl windows

8. Sharing grab between 2 top level windows

9. Top-level windows woes...

10. deactivating top level windows

11. Query top level windows

12. multiple top level windows in tclMotif?

 

 
Powered by phpBB® Forum Software