Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to capture and handle maximize event?

242 views
Skip to first unread message

John Pletka

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
I'm trying to prevent the user from maximizing a window. What I want to
happen is when the user clicks on the maximize box on the window, the
window will resize itself to fill the available Workspace, but not be
truly "maximized". I tried to capture the resize event and return -1,
but when I ran it through the debugger, the window maximized itself
first, then fired the resize event.
Does anyone know how to prevent a window from being maximized
(without disabling the maximize box on the window?)


Craig Wagner

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
John Pletka <jpl...@altranet.com> wrote:
[Reply posted to group and cc: to author as a courtesy (if no 'spam guard')]
Please do not reply directly to the e-mail

You're probably going to get a lot of these, but why on earth would you want to
do that? It's totally inconsistent with every other Windows MDI application.

Having said that, I notice there's an event id called pbm_mdimaximize. I don't
know when that message it received, but it sounds promising.
---
Craig Wagner | E-mail: wag...@teleport.com
Certified PowerBuilder | Web: http://www.teleport.com/~wagnerc
Developer Professional | Phone: (503) 452-6343
and Instructor | Portland, OR USA

Bruce Armstrong [TeamPS]

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
You might check the pbm_syscommand event, as I believe that is the event
(off the top of my head) that is fired when a maximize is requested. There
is also a Windows function that allows you to set the minimum and maximum
sizes that the user can make the window.

On Mon, 29 Mar 1999 14:35:30 -0600,
in powersoft.public.powerbuilder.powerscript


John Pletka <jpl...@altranet.com> wrote:
>I'm trying to prevent the user from maximizing a window. What I want to
>happen is when the user clicks on the maximize box on the window, the
>window will resize itself to fill the available Workspace, but not be
>truly "maximized". I tried to capture the resize event and return -1,
>but when I ran it through the debugger, the window maximized itself
>first, then fired the resize event.
> Does anyone know how to prevent a window from being maximized
>(without disabling the maximize box on the window?)
>

---
Bruce Armstrong [TeamPS] | Romac/Source International
mailto:Bruce.A...@eudoramail.com | mailto:jo...@sourcela.com
| http://www.romac-source.com

Preach the gospel at all times. If necessary, use words. [Francis of Assisi]
http://www.kidbrothers.org http://www.fccwc.org
http://www.harvest.org/text/knowgod.html

Philip Salgannik

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
You'll have to map pbm_syscommand event and watch for the SC_MAXIMIZE
(61488) message
(commandtype argument of the event)

John Pletka <jpl...@altranet.com> wrote in message
news:36FFE411...@altranet.com...

John Pletka

unread,
Mar 29, 1999, 3:00:00 AM3/29/99
to
That did it. Thanks!
0 new messages