Winwatch Tutorial

Even when we can trick PPC applications to run on our Handhelds, dialogs are probably still 240x320 (and our screens most likely to be 640x240) and some buggy implementations may even make some windows look as useless 5x5 squares in our screens. Winwatch is my attempt to fix all of this. I'll split common problems with PPC apps into three groups:
  1. Window or Dialog is so small that I can't see (nor use) most controls.
  2. Window or Dialog is bigger than my screen
  3. Window or Dialog is completely out of my sight
Of course I'll cover some misc features like:

Window or Dialog is so small that I can't see (nor use) most controls


This is Acrobat 1.0 running on a Jornada 720 HPC. As you can see the Toolbar options seems to continue below "Zoom Out/Zoom Out Tool" but the dialog is clipped. Even when the dialog has an oversized width it obviously have an undersized height. For this, winwatch provides three functions:
  1. Fit to Content (Fix)
  2. Make Sizeable (Border)
  3. Manual Resize

Fit To Content (Win+X)

This is the most powerful feature of Winwatch. By default this function is used when you press Win+X on your PPC application while winwatch is running in the background (winwatch icon appears on your system tray).
When you press the assigned hotkey for Fit to Content winwatch will try to redimensionate the active window so EVERY control appear INSIDE of it, even if that implies making a 1000x1000 dialog that won't fit on your screen.
Calculating the size that a window must be for keeping everything visible isn't a simple task, there are some special controls that are a bit tricky to know how they'll behave and the size they need to be fully visible.
Winwatch allows you to chose the actions to be taken when attempting to resize a window. The three provided options are:
  1. Try PPC size first
  2. TabCtl PostProcess
  3. Not Only Dialogs

Try PPC Size first

When this option is enabled, Winwatch will try resizing the dialog to PPC size (240x320) and then it'll test if everything fit inside this size (most likely if it was a PPC application). If at 240x320 there are still some windows components outside the window, then Winwatch will make the proper adjustments. If this option is not selected, winwatch will try to guess the size but itself without making an initial guess.

TabCtl postProcess

Tab Controls are those provided in some applications to switch between "pages" in the current Dialog. They act as containers for grouped content.
For applications using Tab controls, winwatch let you enable the Tab Control Post processing. When Enabled Winwatch will attempt to find and resize Tab Controls AFTER resizing the dialog. Even when the standard procedure will guess the size needed for everything to fit inside the dialog, it'll only resize the dialog itself. Container elements like Tab Controls may still be at they original useless size thus limiting the visibility of some items. Try this option if your application uses tab controls.

Not Only Dialogs

This option will enable the More Than Dialogs processing.
As stated before, winwatch will ONLY resize the dialog to fit the content (and optionally resize tab controls (if present) after resizing the dialog). This option changes this behavior. Some controls may contain more controls. These are called container controls. Tab Controls provide a good example. When this option is enabled winwatch will attempt to resize EVERY container control in a dialog to fit their content (tab controls, special lists, embedded dialogs, everything that may have its own contents). With this option enabled, TabCtl PostProcess will probably not needed.
However, this behavior may be undesirable because will resize scrolled containers to fit almost the whole collection of contained items thus oversizing them.



Make Sizeable (Win+S)

This feature is very simple. When Fit to Content fails to find the better size for a Dialog, you can resize the window for yourself. Pressing the Make Sizeable hotkey, you'll force current dialog to have a "resizing" border. You can then drag and drop this border to resize the dialog at your own will.


Manual Resize (Shift+Arrows)

Another alternative for resizing a dialog is by means of the Manual Resize Hotkey.
Holding the chosen combination allows you to resize the active window with the arrow keys. The Scroll/Resize Step setting in the System tray menu has effect on the amount enlarged or reduced when you resize once.


Window or Dialog is bigger than my screen


Once we have resized the dialog to fit everything that it should contain, we'll probably have a window that is larger than our screen. In the picture you can see the same dialog as before (from Acrobat 1.0) but auto-resized with the Fit To Content Feature.
Now the dialog is obviously taller than our 640x240 screen. How winwatch will fix that? Currently offering you two more functions.
  1. Hide/Show TaskBar
  2. Windows Scrolling

Hide/Show TaskBar (Win+Z)

The most humble attempt we can make for making a whole window visible is to hide the task bar.
While WindowsCE's auto-hide will make this very well isn't a comfortable way most of time. Pressing the Hide/Show TaskBar hotkey will hide (if shown) or show (if hidden) the task bar without disabling the Start Menu.


Windows Scrolling (Win+ up/down/left/right)

Obviously for a 320px tall dialog hiding the taskbar won't fix a thing, our screen is still 240px in height. In these cases Winwatch will let you scroll the window by holding the Windows Scrolling hotkey and pressing the arrow keys.


Window or Dialog is completely out of my sight

This actually will happen with some applications like (again) Acrobat Reader 1.0. Try opening the Text Find Dialog. You will see nothing happening but the Find dialog is actually there. It's just that is outside your screen.
The remaining functions offered by winwatch can solve this.
  1. Center Window
  2. Fit in Visible Area

Center Window (Win+T)

There's no much to say about this. When you press the Center Window Hotkey, the active dialog will be brought right before your eyes, completely centered on your screen.

Fit In Visible Area (Win+F)


This option is far more flexible than Centering the window. In the main Winwatch Dialog you can setup a "visible area". You'll need to write the (x,y) coordinates of the upper-left and lower-right corners of your custom "visible area".
When you press the Fit to Area hotkey, Winwatch will attempt to put every(or only active if selected) window(s) inside your defined area. You also have some options for doing so.
  1. Only to Active
  2. Fix Position
  3. Fix Size

Only to Active

By Default when you press the Fit to Area hotkey winwatch will look for EVERY single window in your screen and will attempt to fit it inside your defined visible area. When this options is enabled, Winwatch will only try to fit the ACTIVE dialog or window, that is, the one that supposes to have the Windows Focus.

Fix Position

When this option is enabled, Winwatch will try first to "move" the dialog(s) so it(they) fit inside your visible area.

Fix Size

If After moving the window (if Fix Position was selected) the dialog(s) is(are) still out of the boundaries of your defined area and this option is selected, Winwatch will then clip the dialog(s) so it(they) will completely fit inside the area you defined.



Task Bar Up

Some OS will let you put the task bar in the upper part of your screen. Selecting this option will force your taskbar to act like that. Note please that WindowsCE isn't made for having the taskbar up in the screen so you may get weird behaviors with this option. It's still nice to have the taskbar up there :)

Start Minimized and Run at Startup

Selecting the Run at Startup option, Winwatch will place a shortcut to its current location in the \Windows\Startup Folder so winwatch will be automatically run everytime WindowsCE initializes (i.e after each soft reset).

Systray Menu

When Winwatch is completely minimized on the system tray a special menu will become available. By tapping ONCE on the winwatch icon in the systray will show a menu that gives you quick access to settings change and also optional settings like "Scroll steps" (i.e the amount of pixels that a window will scroll when you press one of the arrow keys. Also applies for manual resize)

Custom hotkeys and Toggle Keys

You can edit the key combinations used to trigger every action that winwatch performs.
For each function (except Scroll and Manual Resize) you can setup a HOLD key and an ACTION key. For Manual Resize and Scroll just the HOLD key is customizable.
The HOLD key is the one you must hold while pressing the ACTION key in order to execute the function.
If you are using a device without keyboard, you won't probably be able to "hold" a key while pressing another one. For those cases winwatch will show again a special behavior.
Keys that can actually be held are Win, Control, Alt and Shift. If you setup a key OTHER than one of them Winwatch will make it act like a Toggle Key. That means that whenever you press that key Winwatch will prepare to execute the function at the press of the action key. As long as you don't press the toggle key again that function will be available.
Let's see an example:
Let's say you setup the Window Scrolling hotkey to be Z+arrows. Of course "Z" isn't a "holdable" key. Once we have changed the hotkey, minimize Winwatch and run the PPC application with the dialog you wish to scroll. Then press the "Z" key. You have just entered the SCRL Mode. You can check if there's any toggle mode active in the systray menu. Now that you are in the SCRL mode, you can scroll the window by pressing the arrow keys (yes, without holding a thing). They'll left their original functionality and'll become scrolling keys. Pressing "Z" again will disable this mode and the Systray menu will show Toggle:NONE. Now when you press the arrow keys they'll execute their normal function again.

You may of course wish to set a single key to activate a function. Nothing of holding. In those cases just set the HOLD key to the one you desire for triggering the function and the ACTION key to None.