Jump to content

Feature Request: Specifying The 'owner' Of A Dialog Box


Recommended Posts

I realize that following functions came along with AutoIt v3 when GUIs were not introduced:

FileOpenDialog()

FileSaveDialog()

FileSelectFolder()

MsgBox()

InputBox()

Nowadays, when I try to make dialog boxes created by these functions work together with other GUI windows, something annoying happens:
  • The dialog box isn't 'modal' and the backward GUI window is still responsive. Precisely, the controls themselves are responsive but no action is taken as soon as the function returns, thus make it hard to restrict behaviors of the application.
  • A taskbar button is shown, which is unnecessary for the dialog box.
I think the problem is the dialog box has no owner. I find something interesting in Win32 Programmer's Reference:

...

The OPENFILENAME structure contains information the operating system uses to initialize the system-defined Open or Save As dialog box. After the user closes the dialog box, the system returns information about the user's selection in this structure.

Members

...

hwndOwner

Identifies the window that owns the dialog box. This member can be any valid window handle, or it can be NULL if the dialog box has no owner.

...

So, is it helpful to add an extra parameter to these functions, so that we can conveniently specify an owner of the dialog box that is created? For example:

FileOpenDialog ( "title", "init dir", "filter" [, options [, "default name" [, owner]]] )

MsgBox ( flag, "title", "text" [, timeout [, owner]] )

Hope my suggestion is practical. Thanks.
Link to comment
Share on other sites

You can disable your Gui when a Dialog is called within your Gui and wait for the return. Gui's or controls are disabled in Gui's that I create.

GUISetState(@SW_DISABLE, $GUI_HANDLE)

Your proposal sets one owner(handle) where as GUISetState of GUICtrlSetState can be used many times to set the state as needed.

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