Jump to content

Window exploding!


 Share

Recommended Posts

Using the current beta, although i've seen it before a few times, when I go to move or restore a GUI window, the size of the window explodes. I have no idea how big as it seems to go on and on and on as I move it.

I'm fairly new to the GUI part of AutoIT so I may have envoked the wrong arguments or something.

Bear in mind that this happens every now and then...most of the time it is well behaved.

Here's my current code:

If $iProgress = "1" Then
        $hDialog = GUICreate($sAppTitle, 440, 95, (@DesktopWidth - 421) / 2, (@DesktopHeight - 106) / 2, $WS_MINIMIZEBOX + $WS_VISIBLE + $WS_OVERLAPPED + $WS_SYSMENU + $WS_CAPTION); + $WS_CLIPSIBLINGS)
        $cTopLabel = GUICtrlCreateLabel("Top", 10, 9, 420, 20, $SS_CENTER)
        $cProgress = GUICtrlCreateProgress(10, 30, 420, 30, $PBS_SMOOTH)
        $cMiddleLabel = GUICtrlCreateLabel("Middle", 10, 38, 420, 20, $SS_CENTER)
        GUICtrlSetFont(-1, 9, 800)
        $cBottomLabel = GUICtrlCreateLabel("Bottom", 10, 69, 420, 20, $SS_CENTER)
    EndIf

TIA

Edited by sshrum

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Link to comment
Share on other sites

I can see one potential problem. You added your styles together. They should be BitOr'd together.

Change this line:

$hDialog = GUICreate($sAppTitle, 440, 95, (@DesktopWidth - 421) / 2, (@DesktopHeight - 106) / 2, $WS_MINIMIZEBOX + $WS_VISIBLE + $WS_OVERLAPPED + $WS_SYSMENU + $WS_CAPTION); + $WS_CLIPSIBLINGS)

To this:

$hDialog = GUICreate($sAppTitle, 440, 95, (@DesktopWidth - 421) / 2, (@DesktopHeight - 106) / 2, BitOr($WS_MINIMIZEBOX, $WS_VISIBLE, $WS_OVERLAPPED, $WS_SYSMENU, $WS_CAPTION))

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...