The Window Contents Explorer utility by Alexei Hmelnov.
----------------------------------------------------------------------------
e-mail: alex@monster.icc.ru
http://monster.icc.ru/~alex/
----------------------------------------------------------------------------

Purpose:
--------
The Window Contents Explorer utility (WInf.exe) describes the contents of any
window as it represented by the Windows controls. For each control it reports:
  #<DlgCtrlID>:"<WindowText>":<ClassName>,R:(<Left>,<TOP>)[<Width>,<Height>],
    S:<Style>,ES:<Extended Style>

The values of Style and Extended Style can be decoded using the WS_* and WS_EX_*
constants and, besides, the values of Style can also be decoded using the
class-specific constants for the known classes (BS_* for buttons, ES_* for edits
and so on).

In some cases (not under Windows NT and for "good" applications) it can also
extract the control image both in BMP and WMF formats.

Usage:
------
Make sure that the Lock checkbox is unchecked.
Click on some window caption or some control inside a window.
Switch back to the Window Contents Explorer by clicking on it or by pressing
Alt-Tab. The Window Contents Explorer will contain the description of the
selected window or control and all its child windows.

Locking:
--------
If you wish to preserve the description while switching to other applications
check the Lock checkbox.

Tool Bar Controls (From Left to Right):
---------------------------------------
1. Test Point - Screen coordinates of the point, where the explored window
  was selected.
2. Lock the current text - stop reading new window descriptions.
3. Save window description.
4. Get window image. To do it, we'll send the WM_PAINT message with our DC in
  its WParam (See the file WIPaint.pas for details). Most decent programs
  (including all Delphi programs) check the value of WParam when handling the
  WM_PAINT message, and only when WParam=0 they call BeginPaint to create their
  own DC. Unfortunately, the WM_NCPAINT message is not handled this way, that's
  why we can't get the window frames. Moreover, under Windows NT the DC is not
  passed to another application by the SendMessage procedure in the WParam of
  WM_PAINT. So in the worse case this capability enables only to see the
  rectangles, which show the positions of controls.
5,6. The BMP and WMF buttons enable to select the format for the window image.
7. The Child windows button determines what kind of window image we'll get:
  only of the window itself or of the window and it's child windows.
8. The Decode style constants button controls whether the values of the window
  style and extended style will be decoded as a combination of WM_* constants.
  For the control styles of the known classes we can also decode the class-
  specific values (see the description of the ClassStl.cfg file for details).
9. The word wrap button turns on and off the word wrap flag of the memo.
10. The help button loads this file into the memo.

The ClassStl.cfg file.
----------------------
This file contains descriptions of the class-specific constants of the known
classes.

The format of the file :
(<Class name>,',')+ '(' NL
  (<Single flag>|<Masked enumeration>,NL)* NL
')'

<Single flag> :
<NAME> <Value=2**n>

<Masked enumeration> :
<NAME> <Value> '('
  (<Enum Const>,NL)* NL
')'

<Enum Const> :
<NAME> <Value>

';' - comment to the end of the line.

Unfortunately, the subclassing method used in Windows, when a child class is
implemented just by calling the window procedure of its parent class, doesn't
enable to determine that, say, the TEdit class is a descendant of the EDIT
class and its class-specific constants could be used to decode the Style
values.

------------------------------------------------------------------------

                             IMPORTANT NOTE:
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,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented, you must not
   claim that you wrote the original software.
2. Altered source versions must be plainly marked as such, and must not
   be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
   distribution.
