Window control module (winctrl.dll) version 1.3
17 September 2000

This module, winctrl.dll, is a LiteStep module that allows you to perform custom actions on the currently active window, as well as giving you the ability to further tweak the appearance and behaviour of application windows on your desktop. Hopefully you will find some of its features useful. The source code is included in the distribution.

Installation
Add the following to your step.rc
   LoadModule C:\litestep\winctrl.dll
assuming C:\litestep is where your litestep directory is. Make sure you are also running desktop.dll that uses hook.dll. The recent dev builds or LS24.5 should have this.

Bang commands and variables
WinctrlHotkeyOnly
   Restricts bang commands that work on active windows to hotkeys only.
   This should make it work without the core desktop.
!WinHome < x y / centered >
!WinMove < x y / centered >
   Move the active window to position x,y or centered on the current desktop.
   If no arguments are supplied, a positioning cursor appears, as in Win M from the system menu.
!WinMaxHeight
   Resize the active window to the maximum height of the desktop area.
!WinMaxWidth
   Resize the active window to the maximum width of the desktop area.
!WinGrowDown
   Resize the bottom of the active window to the bottom of the desktop area.
!WinDeltaX <dx>
   Resize active window width by dx (default dx=1). 
!WinDeltaY <dy>
   Resize active window height by dy (default dy=1).
!WinFullDrag on/off
   Turn on/off "show window contents while dragging" property.
!WinComboboxAnimate on/off 
   Turn on/off combo-box animation.
!WinMenuAnimate on/off
   Turn on/off menu animation.
!WinActiveTracking on/off
   Turn on/off active window tracking ala X.
!WinAutoRaise on/off
   Turn on/off auto raising of window under cursor.
!WinShade <on/off>
   Toggle between resizing the active window to the caption (on) or restore to normal size (off).
!WinUnshadeAll
   Unshades all shaded windows.
!WinSendToBottom
   Send the active window to the bottom of the stack of open windows.
!WinMaximize
!WinMinimize
!WinRestore
   Mimics behaviour as with the system menu Win X, Win N and Win R, respectively.
!WinAlwaysOnTop <on/off>
   Toggle between always on top window to normal.

In addition the following variables are also available for setting colors:
WinMDIBackgroundColor LSCOLOR
   Set the background color of multiple document interface windows.
WinTooltipBackgroundColor LSCOLOR
   Set the tooltip background color.
WinTooltipTextColor LSCOLOR
   Set the tooltip text color.
LSCOLOR is in the standard ls color format (XXXXXX or nn nn nn) and can be set to any color except FFOOFF.
I have since discovered that the above can be set from the display control panel (duh!), so I won't be exploring the color options any further.
For auto-positioning of dialog windows:
WinDialogsPosition <x y or centered>
   Move dialog windows to position x,y or centered on the current desktop.
   Dialogs are positioned normally if variable is not in step.rc.


Known problems
1. !Winshade will crash WinVi.
2. !WinSendToBottom and !WinUnshadeAll, if invoked by a hotkey combination Win+Shift or Ctrl sometimes has no effect on a DOS box.
3. WinDialogPosition creates a flash of window at the default position.
4. Shaded WinZip windows will partially unshade when moved.


mirul (mirul_@hotmail.com)
18 April 2000.

