Caps Lock/NumLock/Scroll Lock monitoring utility
-------------------------------------------------

1. Introduction
2. Copyright
2. Program options
3. Bugs/succestions

1. INTRODUCTION
---------------
At first, I have to apologize my bad english:(
This program is just a simple utility sitting in the system tray and keeps track whenever you press either
the Caps Lock, Scroll Lock or Num Lock keys. I wrote this because i dont have those nice little
indicator lights on my keyboard (thanx alot Logitech for greate keyboards!!!).

2. COPYRIGHT
------------
Little bit a law stuff....just for my own protection:)

"This software is provided 'as-is', without any expressed or implied warranty. In no event will the author be
held liable for any damages arising from the use of this software. Permission is granted to anyone to use this
software for any purpose."

3. PROGRAM OPTIONS
------------------
There is nothing much to say about most of the options cause they should be pretty far self-explanatory (atleast to me:).
The only options that could cause a bit confusion is so called "User-defined icon sets" and "Password detection plugins".

a) User-defined icon sets
Its possible to use different tray icon for each key or just one for all keys. The program itself contains already
one icon set for one tray icon. To increase flexibility, You can define a base directory for Your own icon sets. This base
directory will be scanned for sub directories by the program. Each subdirectory is considered as "icon set" and must
must contain either 4 icons if separate tray icons is used or 8 icons, if one tray icon is used. The subdirectory name will
be used as "Icon set name". For best results, each icon should be 16x16 pixels and use 32bit color depth. Other formats
is(and will remain) untested. In addition, the following naming policy must be used:

Icon name       | Explanation
-----------------------------------
none.ico        | None of keys is toggled on
caps.ico        | Only Caps lock key is toggled on
num.ico         | Only Num Lock key is toggled on
scroll.ico      | Only Scroll Lock key is toggled on
capsnum.ico     | Caps Lock and Num Lock keys are toggled on (not mandatory, if separate tray icons will be used)
capsscroll.ico  | Caps Lock and Scroll Lock keys are toggled on (not mandatory, if separate tray icons will be used)
numscroll.ico   | Num Lock and Scroll Lock keys are toggled on (not mandatory, if separate tray icons will be used)
all.ico         | All three keys are toggled on (not mandatory, if separate tray icons will be used)

b) Password detection plugins
The program is able to detect the "common" windows password controls and shows warning tooltip below that control (if the 
notification option has checked). But despite the fact the Windows already provide technique to enter passwords, many applications
override this feature and use their own, customized controls for this operation. Hence there is no way to detect such controls 
on the fly. To solve the problem described above the program uses so called plugins, which are little dll libraries in certain 
directory. These libraries sould implement the functionality needed for detection of custom password controls and thus it is 
possible to extend the detection dynamically. All these dll libraries should be located in the subdirectory of program installation
directory called "PWAddins". The program will check this subdirectory at start-up(or at run-time in options dialog)
and loads correct plugins. There is also possible to temporarily turn off the detection of certain plugin by unchecking the
checkbox next to plugin entry in options dialog. Ill write additional plugins on request and if its possible(drop e-mail to me).

(For developers)
This section describes the internals of plugin dll:s. If youre not a developer you may skip this section.

Writing password detection plugins is quite simple. The plugin dll:s are common windows dll:s that must export only one function
called "IsPasswordWindow". The signature of that function is:

__declspec(dllexport) LONG __stdcall IsPasswordWindow(HWND hwndTarget, LPCTSTR lpszClassName);

This function should return value less than 0, if the window handle passed in parameter hwndTarget is not a password window or 0
if it is. Normally the warning tooltip is shown in the bottom/left corner of target window. However, you can also define the offset
from that point by returning the x-offset in HIWORD and y-offset in LOWORD of returned value. Note that the positive value of x-offset
moves tooltip to the right and y-offset moves it up.
For example, if you want to move the tooltip 10 pixels to the right and 5 pixels up, you should use the statement:

return MAKELONG(5, 10);

Another (optional) function you may want to export is "GetName", which has following signature:

__declspec(dllexport) LPCTSTR __stdcall GetName(VOID);

This function is optional and it is only used in options dialog for plugin description. If it is not defined, tha application tries
to get plugin name by searching Product Name from dll version resource. If version info is missing as well, dll name without extension
will be used.
All other exported functions will be ignored. 
For further information, look at the source files included with the application.
(A full Visual C++ 6.0 project, which implements Lotus Notes 6.0 password detection).



3. BUGS/SUCCESTIONS
-------------------
The only "bug", i discovered so far, could appear on Windows prior to version 2000 (where is no support to so
called "Layered Windows"). If on-screen message is enabled and shown on screen, some distortion of background
could be seen when window underneath on-screen message will moved or changed. On Windows 2000 and above
this particular behavior has eliminated.
If You find any bugs/succestions (or a solution for bug described above), feel free to email me (see address below).

With best regards:

Asko Telinen
Finland
asko.telinen@jyu.fi
