Re: How to Disable CloseBox

new topic     » topic index » view thread      » older message » newer message

Hi Renzo,
I'm not sure if you got an answer to this one or not.

----- Original Message -----
From: "Renzo Beggia" <renzo.beggia at VSK.BE>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Wednesday, December 20, 2000 10:49 PM
Subject: How to Disable CloseBox


> Hi,
>
> Can anyone help me ?
>
> I need to draw a window (normal with icon,border,resizable,caption) but
without the maximizebox and without the Closebox .
> What ' WS_xxx' do i use ??
> I tried 420000,but then my Icon is gone.
>

Here is a type of solution. Using this method, you still see a maximizebox
and a closebox but both are disabled. Also, because the closebox is
disabled, you must provide another mechanism for the user to close the
window.

----------------------------
sequence styleflags
-- Set the default values for the window class and the window control.
styleflags = classDefaults(Window, {
        {CCwinstyle, {CS_HREDRAW, CS_VREDRAW, CS_NOCLOSE }},
        {CCflags, {  WS_CAPTION,
                     WS_SYSMENU,
                     WS_THICKFRAME,
                     WS_MINIMIZEBOX
                  }}
        })

-- Create the window.
constant mywin = create( Window, "title", 0, 0, 0, 500, 400,  0)

-- Now restore the defaults
styleflags = classDefaults(Window, styleflags)

----------------------

> By the way,can it be that '' Windows Me'' isn't 100% ok with Win32lib
v0.53??
> My programs  cause weird crashes.. (mostly after a 'openfile' dialogbox or
after pushing a button for the 2nd time)
> If anyone had these problems too, please let me know.

I've been using Windows ME since August last year and have had no problems
at all with it.

------
Derek Parnell
Melbourne, Australia
(Vote [1] The Cheshire Cat for Internet Mascot)

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu