Site Navigation

User Guide

Reference

Packages

 

DESCRIPTION

This is the main container of a regular GUI; also known as "top level window".

METHODS

Common methods apply to most windows, controls and resources.

new

new(%OPTIONS)

Creates a new Window object.

Class specific %OPTIONS are:

  -accel => Win32::GUI::Accelerator
  -accelerators => Win32::GUI::Accelerator
  -acceleratortable => Win32::GUI::Accelerator
    Associate accelerator table to Window
  -minsize => [X, Y]
    Specifies the minimum size (width and height) in pixels;
    X and Y must be passed in an array reference
  -maxsize => [X, Y]
    Specifies the maximum size (width and height) in pixels;
    X and Y must be passed in an array reference
  -minwidth  => N
  -minheight => N
  -maxwidht  => N
  -maxheight => N
    Specify the minimum and maximum size width and height, in pixels
  -hasmaximize => 0/1
  -maximizebox => 0/1
    Set/Unset maximize box.
  -hasminimize => 0/1
  -minimizebox => 0/1
    Set/Unset minimize box.
  -sizable => 0/1
  -resizable => 0/1
    Set/Unset tick frame style.
  -sysmenu => 0/1
  -menubox => 0/1
  -controlbox => 0/1
    Set/Unset system menu style.
  -titlebar => 0/1
    Set/Unset caption style.
  -helpbutton => 0/1
  -helpbox => 0/1
  -hashelp => 0/1
    Set/Unset help context extended style.
  -toolwindow => 0/1
    Set/Unset tool window extended style.
  -appwindow => 0/1
    Set/Unset app window extended style.
  -topmost => 0/1 (default 0)
    The window "stays on top" even when deactivated
  -controlparent => 0/1 (default 0)
    Set/Unset control parent extended style.
  -noflicker => 0/1 (default 0)
    Set to 1 to enable anti-flicker. This will eliminate all flicker from
    your window, but may prevent things like Graphic objects from showing
    correctly.
  -dialogui => 0/1
    Act as a dialog box.

See also the common options.

AddAnimation

AddAnimation(%OPTIONS)

See new Win32::GUI::Animation().

AddButton

AddButton(%OPTIONS)

See new Win32::GUI::Button().

AddCheckbox

AddCheckbox(%OPTIONS)

See new Win32::GUI::Checkbox().

AddCombobox

AddCombobox(%OPTIONS)

See new Win32::GUI::Combobox().

AddComboboxEx

AddComboboxEx(%OPTIONS)

See new Win32::GUI::ComboboxEx().

AddDateTime

AddDateTime(%OPTIONS)

See new Win32::GUI::DateTime().

AddGraphic

AddGraphic(%OPTIONS)

See new Win32::GUI::Graphic().

AddGroupbox

AddGroupbox(%OPTIONS)

See new Win32::GUI::Groupbox().

AddHeader

AddHeader(%OPTIONS)

See new Win32::GUI::Header().

AddLabel

AddLabel(%OPTIONS)

See new Win32::GUI::Label().

AddListbox

AddListbox(%OPTIONS)

See new Win32::GUI::Listbox().

AddListView

AddListView(%OPTIONS)

See new Win32::GUI::ListView().

AddMenu

AddMenu()

See new Win32::GUI::Menu().

AddMonthCal

AddMonthCal(%OPTIONS)

See new Win32::GUI::MonthCal().

AddNotifyIcon

AddNotifyIcon(%OPTIONS)

See new Win32::GUI::NotifyIcon().

AddProgressBar

AddProgressBar(%OPTIONS)

See new Win32::GUI::ProgressBar().

AddRadioButton

AddRadioButton(%OPTIONS)

See new Win32::GUI::RadioButton().

AddRebar

AddRebar(%OPTIONS)

See new Win32::GUI::Rebar().

AddRichEdit

AddRichEdit(%OPTIONS)

See new Win32::GUI::RichEdit().

AddSlider

AddSlider(%OPTIONS)

See new Win32::GUI::Slider().

AddSplitter

AddSplitter(%OPTIONS)

See new Win32::GUI::Splitter().

AddStatusBar

AddStatusBar(%OPTIONS)

See new Win32::GUI::StatusBar().

AddTabStrip

AddTabStrip(%OPTIONS)

See new Win32::GUI::TabStrip().

AddTextfield

AddTextfield(%OPTIONS)

See new Win32::GUI::Textfield().

AddTimer

AddTimer(NAME, ELAPSE)

See new Win32::GUI::Timer().

AddToolbar

AddToolbar(%OPTIONS)

See new Win32::GUI::Toolbar().

AddTooltip

AddTooltip(%OPTIONS)

See new Win32::GUI::Tooltip().

AddTreeView

AddTreeView(%OPTIONS)

See new Win32::GUI::TreeView().

AddUpDown

AddUpDown(%OPTIONS)

See new Win32::GUI::UpDown().

Center

Center([Parent])

Center the window vertically and horizontally in the Parent (Default: the Desktop window). Parent can be either a Win32::GUI::Window or a hwind. Return 1 on success, else 0.

GetDC

GetDC()

Returns the DC object associated with the window.

EVENTS

Common events apply to most windows and controls.

Activate

Activate()

Sent when the window is activated.

Deactivate

Deactivate()

Sent when the window is deactivated.

InitMenu

InitMenu(MENU)

Sent when a menu is about to become active. It occurs when the user clicks an item on the menu bar or presses a menu key. This allows the application to modify the menu before it is displayed.

Maximize

Maximize()

Sent when the window is maximized.

Maximize (Win32::GUI::MDIChild)

Maximize()

Sent when the window is maximized.

Minimize

Minimize()

Sent when the window is minimized.

Minimize (Win32::GUI::MDIChild)

Minimize()

Sent when the window is minimized.

Paint

Paint(DC)

Sent when the window needs to be repainted.

Note that you get the DC of the window object in parameter, and then Validate() the DC to inform Windows that you painted the DC area (otherwise it will continue to call the Paint event continuously). Example:

  sub Graphic_Paint {
      my $DC = shift;
      $DC->MoveTo(0, 0);
      $DC->LineTo(100, 100);
      $DC->Validate();
  }

Resize

Resize()

Sent when the window is resized.

Resize (Win32::GUI::MDIChild)

Resize()

Sent when the window is resized.

Scroll

Scroll(SCROLLBAR, OPERATION, POSITION)

Sent when one of the window scrollbars is moved. SCROLLBAR identifies which bar was moved, 0 for horizontal and 1 for vertical.

OPERATION can be compared against one of the following constants: SB_LINEUP, SB_LINELEFT, SB_LINEDOWN, SB_LINERIGHT, SB_PAGEUP SB_PAGELEFT, SB_PAGEDOWN, SB_PAGERIGHT, SB_THUMBPOSITION, SB_THUMBTRACK, SB_TOP, SB_LEFT, SB_BOTTOM, SB_RIGHT, SB_ENDSCROLL

Related messages: WM_HSCROLL, WM_VSCROLL

Scroll (Win32::GUI::MDIChild)

Scroll(SCROLLBAR, OPERATION, POSITION)

Sent when one of the window scrollbars is moved. SCROLLBAR identifies which bar was moved, 0 for horizontal and 1 for vertical.

OPERATION can be compared against one of the following constants: SB_LINEUP, SB_LINELEFT, SB_LINEDOWN, SB_LINERIGHT, SB_PAGEUP SB_PAGELEFT, SB_PAGEDOWN, SB_PAGERIGHT, SB_THUMBPOSITION, SB_THUMBTRACK, SB_TOP, SB_LEFT, SB_BOTTOM, SB_RIGHT, SB_ENDSCROLL

Related messages: WM_HSCROLL, WM_VSCROLL

Terminate

Terminate()

Sent when the window is closed. The event should return -1 to terminate the interaction and return control to the perl script; see Dialog().

Terminate (Win32::GUI::MDIChild)

Terminate()

Sent when the window is closed. The event should return -1 to terminate the interaction and return control to the perl script; see Dialog().

VERSION

Documentation for Win32::GUI v1.06 created 13 Feb 2008

This document is autogenerated by the build process. Edits made here will be lost. Edit docs/per_package.tpl instead.

SUPPORT

Homepage: http://perl-win32-gui.sourceforge.net/.

For further support join the users mailing list(perl-win32-gui-users@lists.sourceforge.net) from the website at http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users. There is a searchable list archive at http://sourceforge.net/mail/.

COPYRIGHT and LICENCE

Copyright (c) 1997..2008 Aldo Calpini. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.