CatchFish Posted April 1, 2006 Posted April 1, 2006 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.
MHz Posted April 1, 2006 Posted April 1, 2006 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now