Jump to content

Autogui Resize Crash!


Recommended Posts

Is it possible to create a resizable GUI? I tried using the style and exStyle from Windows notepad (on XP Pro sp1).

I also tried just using $WS_MAXIMIZEBOX style. This didn't crash but, the edit control disappeared when I clicked the maximize button :whistle:

$title = "foo1"

GUICreate($title,0,0,0,0, 0x04CF0000, 0x00000110)
;Settings based on the styles of Notepad from WinXP Pro sp1
;Use 0 height and width so that window has no minimum size!

;;;GUICreate($title,0,0,0,0, 0x00010000)
;If you use this GUI instead, then the edit control simply disappears...

WinMove($title,"", 10, 10, 400, 200)
WinActivate("")

GUISetControl("edit", "Crash if try to resize/maximize window", 0, 0)
GUIWaitClose()

I really like the GUI features!

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

definetly a bug. :whistle:

I design so the first gui be the minimum size.

That look strange to me to put a control on a non defined place.

At a time I have the idea to refuse the creation of a control which cannot be put on the dialog box. I think I will implement this check.

Can you agree on this approach?

Link to comment
Share on other sites

I did some more testing and this seems to work:

$title = "foo1"

GUICreate($title,1,1,0,0, 0x04CF0000, 0x00000110)
;Settings based on the styles of Notepad from WinXP Pro sp1
;Use 1 height and width so that window has no minimum size!

WinMove($title,"", 10, 10, 400, 200)
WinActivate("")

GUISetControl("edit", "Seems to work...", 0, 0, 300, 150)

GUIShow()
While GuiMsg(0) <> -3
   sleep(100)
   ControlMove ($title, "", "Edit1", 10, 10, 300, 150)
WEnd

1. GUICreate only crashed when height=0 and width=0

2. The controls must be moving to the wrong place when the window is resized. I overcome this by using ControlMove in the loop. Do I need to define GUISetControlEx resizing or something?

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

I did some more testing and this seems to work:

$title = "foo1"

GUICreate($title,1,1,0,0, 0x04CF0000, 0x00000110)
;Settings based on the styles of Notepad from WinXP Pro sp1
;Use 1 height and width so that window has no minimum size!

WinMove($title,"", 10, 10, 400, 200)
WinActivate("")

GUISetControl("edit", "Seems to work...", 0, 0, 300, 150)

GUIShow()
While GuiMsg(0) <> -3
   sleep(100)
   ControlMove ($title, "", "Edit1", 10, 10, 300, 150)
WEnd

1.  GUICreate only crashed when height=0 and width=0

2.  The controls must be moving to the wrong place when the window is resized.  I overcome this by using ControlMove in the loop.  Do I need to define GUISetControlEx resizing or something?

I know the crash reason. That's due to the w=h=0 as you find out.

I need to know if you agree that the first gui opening is with the minimum size. only growth allowed?

That's the way I have designed the resizing. All controls move from the place where they were created. The resizing options are aimed to control moving/resizing.

See the GuiInputbox.au3 example.

Link to comment
Share on other sites

I know the crash reason. That's due to the w=h=0 as you find out.

I need to know if you agree that the first gui opening is with the minimum size. only growth allowed?

That's the way I have designed the resizing. All controls move from the place where they were created. The resizing options are aimed to control moving/resizing.

See the GuiInputbox.au3 example.

JP, is this auto-resizing stuff an option which can be turned off? If not, then hint hint.
Link to comment
Share on other sites

JP, is this auto-resizing stuff an option which can be turned off?  If not, then hint hint.

Every controls can be put in a noresizing mode.

By default the dialog box is not sizeable so nothing can occur.

Link to comment
Share on other sites

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...