[fxruby-users] [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow
Jeroen van der Zijp
jeroen at fox-toolkit.org
Thu Jan 10 16:20:51 EST 2008
On Thursday 10 January 2008 03:03:39 pm Sander Jansen wrote:
> Ok, h
> On Jan 10, 2008 1:45 PM, Jeroen van der Zijp <jeroen at fox-toolkit.org> wrote:
> > On Thursday 10 January 2008 01:27:48 pm Melton, Ryan wrote:
> > > Thanks Jeroen,
> > >
> > > Using the SEL_CONFIGURE I can detect maximizes and minimizes. What I
> > > wanted to do was to not let a user maximize the window sometimes. Can I
> > > do this with SEL_CONFIGURE?
> > Typically, this is done by adjusting the decorations. Once you've decided
> > to show the [lets say] maximize button, it'll get handled. There's no way
> > to block it since the event is dealt with in the non-client handler of the
> > window. FOX itself never sees it.
> Well, that's not totally true, just because you're ignoring the
> message, doesn't mean you don't get it..
> How about sending SEL_MAXIMIZE, SEL_MINIMIZE, SEL_RESTORE based on
> information from the WM_SIZE message on windows:
> See the WM_SIZE documentation:
> http://msdn2.microsoft.com/en-us/library/ms632646.aspx. It tells you
> exactly what happened.
> On Linux you can do the same thing whenever the _NET_STATE changes...
> On Windows you can also intercept the maximize/minimize/restore event
> s before they're applied using the WM_SYSCOMMAND message:
> See documentation here: http://msdn2.microsoft.com/en-us/library/ms646360.aspx
It sounds like a good idea to try and intercept the messages; but you wouldn't
necessarily be able to block the maximization or minimization this way. But
at least you'd know about it when it happens.
More information about the fxruby-users