Package Win32::GUI

Back to the Packages


Methods

AbsLeft()

[TBD]

AbsTop()

[TBD]

ArrangeIconicWindows()

Arranges all the minimized child windows of the specified parent window.

AttachThreadInput(FROM, TO, [FLAG])

[TBD]

BringWindowToTop()

[TBD]

BrowseForFolder(%OPTIONS)

[TBD]

Caption([TEXT])

[TBD]

Change(HANDLE, %OPTIONS)

Change most of the options used when the object was created.

ChangeCursor(CURSOR)

[TBD]

ChangeIcon(ICON)

Changes the default icon for a window to ICON (a Win32::GUI::Icon object). Returns the handle of the previous default icon.

ChangeSmallIcon(ICON)

Changes the default small icon for a window to ICON (a Win32::GUI::Icon object). Returns the handle of the previous default small icon.

ChooseColor(%OPTIONS)

Allowed %OPTIONS are:

 -owner
 -color

ChooseFont(%OPTIONS)

Allowed %OPTIONS are:

 -owner
 -size
 -height
 -width
 -escapement
 -orientation
 -weight
 -bold
 -italic
 -underline
 -strikeout
 -charset
 -outputprecision
 -clipprecision
 -quality
 -family
 -name
 -face (== -name)
 -color
 -ttonly
 -fixedonly
 -effects
 -script
 -minsize
 -maxsize

ClipCursor([LEFT, TOP, RIGHT, BOTTOM])

[TBD]

CloseEnhMetaFile()

[TBD]

CloseWindow()

(@)METHOD:Minimize()

CommDlgExtendedError()

Returns the common dialog library error code.

CreateEnhMetaFile(FILENAME, [DESCRIPTION])

[TBD]

DeleteEnhMetaFile(HANDLE)

[TBD]

Dialog()

[TBD]

DialogUI(HANDLE, [FLAG])

[TBD]

Disable()

[TBD]

DoEvents()

[TBD]

DoModal()

[TBD]

DrawMenuBar()

[TBD]

Enable([FLAG])

[TBD]

EnumMyWindows()

[TBD]

FindWindow(CLASSNAME, WINDOWNAME)

Returns the handle of the window whose class name and window name match the specified strings; both strings can be empty. Note that the function does not search child windows, only top level windows. If no matching windows is found, the return value is zero.

GetActiveWindow()

Returns the handle of the active window.

GetClassName()

[TBD]

GetClientRect()

[TBD]

GetCursor()

Returns the handle of the current cursor.

GetCursorPos()

[TBD]

GetDesktopWindow()

Returns the handle of the desktop window.

GetDlgItem(ID)

Returns the handle of a control in the dialog box given its ID.

GetEffectiveClientRect(HANDLE, ID)

[TBD]

GetFocus()

Returns the handle of the window that has the keyboard focus.

GetFont(FONT)

Gets the font of the window (returns an handle; use

  $Font = $W->GetFont();
  %details = Win32::GUI::Font::Info( $Font );

to get font details).

GetFontName()

[TBD]

GetForegroundWindow()

Returns the handle of the foreground window.

GetMenu()

[TBD]

GetMessage([MIN, MAX])

[TBD]

GetOpenFileName(%OPTIONS)

Allowed %OPTIONS are:

 -owner => WINDOW
     Identifies the window that owns the dialog box.
 -title => STRING
     The title for the dialog
 -directory => STRING
     Specifies the initial directory
 -file => STRING
     Specifies a name that will appear on the dialog's edit field
 -filter => ARRAY REFERENCE
     Specifies an array containing pairs of filter strings.
     The first string in each pair is a display string that describes the filter
     (for example, "Text Files"), and the second string specifies the filter pattern
     (for example, "*.TXT"). To specify multiple filter patterns for a single display
     string, use a semicolon to separate the patterns (for example, "*.TXT;*.DOC;*.BAK").
     A pattern string can be a combination of valid filename characters and the asterisk (*)
     wildcard character. Do not include spaces in the pattern string.
 -defaultextention => STRING
     Contains the default extension. GetOpenFileName append this extension to the filename if the user
     fails to type an extension. This string can be any length, but only the first three characters are
     appended. The string should not contain a period (.).
 -defaultfilter => NUMBER
     Specifies the index of the currently selected filter in the File Types control.
     The first pair of strings has an index value of 0, the second pair 1, and so on.

Flags :

 -createprompt => 0/1 (default 0)
     If the user specifies a file that does not exist, this flag causes the dialog box to prompt
     the user for permission to create the file. If the user chooses to create the file, the dialog box
     closes and the function returns the specified name; otherwise, the dialog box remains open.
     If you use this flag with the -multisel flag, the dialog box allows the user to specify
     only one nonexistent file.
 -multisel => 0/1 (default 0)
     Allow multiple file selection
     If the user selects more than one file then return filename with full path.
     If the user selects more than one file then return an array with the path
     to the current directory followed by the filenames of the selected files.
 -explorer => 0/1 (default 1)
     Explorer look.
 -extensiondifferent => 0/1 (default 0)
     Specifies that the user can typed a filename extension that differs from the extension specified by -defaultextention.
 -filemustexist => 0/1 (default 0)
     Specifies that the user can type only names of existing files in the File Name entry field.
     If this flag is specified and the user enters an invalid name, the dialog box procedure displays
     a warning in a message box.
 -hidereadonly => 0/1 (default 1)
     Hides the Read Only check box.
     If -hidereadonly is set to 0, the read only statut is return only in array context as last value.
 -nochangedir => 0/1 (default 0)
     Restores the current directory to its original value if the user changed the directory while searching for files.
 -nodeferencelinks => 0/1 (default 0)
     Directs the dialog box to return the path and filename of the selected shortcut (.LNK) file.
     If this value is not given, the dialog box returns the path and filename of the file referenced by the shortcut.
 -nonetwork  => 0/1 (default 0)
     Hides and disables the Network button
 -noreadonlyreturn => 0/1 (default 0)
     Specifies that the returned file does not have the Read Only check box checked and is not in a write-protected directory.
 -pathmustexist => 0/1 (default 0)
     Specifies that the user can type only valid paths and filenames.
     If this flag is used and the user types an invalid path and filename in the File Name entry field, the dialog box function displays a warning in a message box.
 -readonly => 0/1 (default 0)
           Causes the Read Only check box to be checked initially when the dialog box is created.

GetPerlWindow()

[TBD]

GetSaveFileName(%OPTIONS)

Allowed %OPTIONS are:

 -owner => WINDOW
     Identifies the window that owns the dialog box.
 -title => STRING
     The title for the dialog
 -directory => STRING
     Specifies the initial directory
 -file => STRING
     Specifies a name that will appear on the dialog's edit field
 -filter => ARRAY REFERENCE
     Specifies an array containing pairs of filter strings.
     The first string in each pair is a display string that describes the filter
     (for example, "Text Files"), and the second string specifies the filter pattern
     (for example, "*.TXT"). To specify multiple filter patterns for a single display
     string, use a semicolon to separate the patterns (for example, "*.TXT;*.DOC;*.BAK").
     A pattern string can be a combination of valid filename characters and the asterisk (*)
     wildcard character. Do not include spaces in the pattern string.
 -defaultextention => STRING
     Contains the default extension. GetSaveFileName append this extension to the filename if the user
     fails to type an extension. This string can be any length, but only the first three characters are
     appended. The string should not contain a period (.).
 -defaultfilter => NUMBER
     Specifies the index of the currently selected filter in the File Types control.
     The first pair of strings has an index value of 0, the second pair 1, and so on.

Flags :

 -createprompt => 0/1 (default 0)
     If the user specifies a file that does not exist, this flag causes the dialog box to prompt
     the user for permission to create the file. If the user chooses to create the file, the dialog box
     closes and the function returns the specified name; otherwise, the dialog box remains open.
     If you use this flag with the -multisel flag, the dialog box allows the user to specify
     only one nonexistent file.
 -explorer => 0/1 (default 1)
     Explorer look.
 -extensiondifferent => 0/1 (default 0)
     Specifies that the user can typed a filename extension that differs from the extension specified by -defaultextention.
 -filemustexist => 0/1 (default 0)
     Specifies that the user can type only names of existing files in the File Name entry field.
     If this flag is specified and the user enters an invalid name, the dialog box procedure displays
     a warning in a message box.
 -nochangedir => 0/1 (default 0)
     Restores the current directory to its original value if the user changed the directory while searching for files.
 -nodeferencelinks => 0/1 (default 0)
     Directs the dialog box to return the path and filename of the selected shortcut (.LNK) file.
     If this value is not given, the dialog box returns the path and filename of the file referenced by the shortcut.
 -nonetwork  => 0/1 (default 0)
     Hides and disables the Network button
 -noreadonlyreturn => 0/1 (default 0)
     Specifies that the returned file is not in a write-protected directory.
 -pathmustexist => 0/1 (default 1)
     Specifies that the user can type only valid paths and filenames.
     If this flag is used and the user types an invalid path and filename in the File Name entry field, the dialog box function displays a warning in a message box.
 -overdriveprompt => 0/1 (default 1)
     Generate a message box if the selected file already exists. The user must confirm whether to overwrite the file.

GetStockObject(OBJECT)

[TBD]

GetSystemMetrics(INDEX)

[TBD]

GetTextExtentPoint32(STRING, [FONT])

Returns a two elements array containing the x and y size of the specified STRING in the window (eventually with the speficied FONT), or undef on errors.

GetTopWindow()

Returns the handle of the foreground window.

GetWindow(COMMAND)

Returns handle of the window that has the specified relationship (given by COMMAND) with the specified window. Available COMMANDs are:

  GW_CHILD
  GW_HWNDFIRST
  GW_HWNDLAST
  GW_HWNDNEXT
  GW_HWNDPREV
  GW_OWNER

Example:

    $Button->GetWindow(GW_OWNER);

GetWindowLong(INDEX)

Retrieves a windows property; for more info consult the original API documentation.

GetWindowRect()

[TBD]

GetWindowThreadProcessId()

Returns a two elements array containing the thread and the process identifier for the specified window.

Height([HEIGHT])

[TBD]

Hide()

[TBD]

Hook(MSG,CODEREF)

Assigns a handler to a window message. Returns the previous handler code reference or undef if no previous perl handler was defined.

InvalidateRect(...)

[TBD]

IsEnabled()

[TBD]

IsIconic()

Returns TRUE if the window is minimized, FALSE otherwise.

IsVisible()

[TBD]

IsWindow()

[TBD]

IsZoomed()

[TBD]

Left([LEFT])

[TBD]

Maximize()

Maximizes a window.

MessageBox([HANDLE], TEXT, [CAPTION], [TYPE])

[TBD]

Minimize()

[TBD]

Move(X, Y)

[TBD]

OpenIcon()

(@)METHOD:Restore()

PeekMessage([MIN, MAX, MESSAGE])

Inspects the window's message queue and eventually returns data about the message it contains; it can optionally check only for message identifiers in the range MIN..MAX; the last MESSAGE parameter, if specified, must be an array reference. If a message is found, the function puts in that array 7 elements containing:

  - the handle of the window to which the message is addressed
  - the message identifier
  - the wParam argument
  - the lParam argument
  - the time when message occurs
  - the x coordinate at which message occurs
  - the y coordinate at which message occurs

PlayEnhMetaFile(FILENAME)

[TBD]

PlayWinMetaFile(FILENAME)

[TBD]

PostMessage(MSG, WPARAM, LPARAM)

Posts a message to a window.

PostQuitMessage([EXITCODE])

Sends a quit message to a window, optionally with an EXITCODE; if no EXITCODE is given, it defaults to 0.

ReleaseCapture()

Releases the mouse capture.

Resize(X, Y)

[TBD]

Restore()

[TBD]

SaveBMP(handle)

(preliminary) Saves the window content to a BMP file.

ScaleHeight()

[TBD]

ScaleWidth()

[TBD]

ScreenToClient(X, Y)

[TBD]

SendMessage(MSG, WPARAM, LPARAM)

Sends a message to a window.

SendMessageTimeout(MSG, WPARAM, LPARAM, [FLAGS], TIMEOUT)

Sends a message to a window and wait for it to be processed or until the specified TIMEOUT (number of milliseconds) elapses; returns the result code of the processed message or undef on errors. If undef is returned and a call to Win32::GetLastError() returns 0, then the window timed out processing the message. The FLAGS parameter is optional, possible values are:

 0 SMTO_NORMAL
   (the calling thread can process other requests while waiting;
   this is the default setting)
 1 SMTO_BLOCK
   (the calling thread does not process other requests)
 2 SMTO_ABORTIFHUNG
   (returns without waiting if the receiving process seems to be "hung")

SetCapture()

Assigns the mouse capture to a window.

SetCursor(CURSOR)

[TBD]

SetCursorPos(X, Y)

[TBD]

SetFocus()

Activates a window.

SetFont(FONT)

Sets the font of the window (FONT is a Win32::GUI::Font object).

SetForegroundWindow()

Brings the window to the foreground.

SetIcon(ICON, [TYPE])

Sets the icon of the window; TYPE can be 0 for the small icon, 1 for the big icon. Default is the same icon for small and big.

SetMenu(MENU)

Associates the specified MENU to a window.

SetRedraw(FLAG)

Determines if a window is automatically redrawn when its content changes. FLAG can be a true value to allow redraw, false to prevent it.

SetWindowLong(INDEX, VALUE)

Sets a windows property; for more info consult the original API documentation.

Show([COMMAND])

[TBD]

Text([TEXT])

(@)METHOD:Caption([TEXT])

Top([TOP])

[TBD]

TrackMouse([TIMEOUT, EVENTS])

[TBD]

TrackPopupMenu(MENU, X, Y, [FLAGS])

[TBD]

UnHook(MSG)

;Undefines a Window Message hook.

UntrackMouse()

[TBD]

Update()

[TBD]

Version()

Returns the module version number.

Width([WIDTH])

[TBD]

WindowFromPoint(X, Y)

[TBD]