Detecting Window's Maximize Window Click

Ken Ray kray at sonsothunder.com
Mon May 29 15:51:56 EDT 2006


On 5/29/06 10:19 AM, "Rob Cozens" <rcozens at pon.net> wrote:

> So how to differentiate between the two?  Once one knows the answer,
> it's obvious; but I was in the process of asking when the light dawned:
>   when the box is clicked, the window dimensions have not changed.  So
> to help others avoid playing the foole...
> 
> on resizeStack newWidth,newHeight,oldWidth,oldHeight
> if newWidth = oldWidth and newHeight = oldHeight then -- Maximize Box
> was clicked


Actually this doesn't work on Windows, Rob... the way resizing is handled is
different between platforms - even just simply resizing the stack by
dragging the bottom right corner is different (Mac sends resizeStack when
you release the mouse; Windows sends it constantly as you're resizing the
stack while the mouse is down).

There's a way to tell the rect of the stack against the windowboundingrect,
but you'd have to subtract the height of the stack's titlebar (which on
Windows is up to the end user).

I'll root around and see if I can find some code to help...


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com




More information about the use-livecode mailing list