DlgProc Plugin
---------------------------------------------------------------------
The plugin allows you to add callback funtions for dialogs in script.

Description:
---------------------------------------------------------------------
1. This plugin support two dialogs only:
   one is the parent dialog whose handle is $HWNDPARENT, and another
   is the child of parent dialog (hereinafter called "page dialog").

2. You can set different callback functions to each page, for each
   dialog is different from each other.

3. You must understand Windows message mechanism, see MSDN for details.

4. Usage:
   1) Firstly define some variables at the beginning of script.
      Special notes:
      The plugin will assign the values of Msg, wParam, lParam to the
      earliest three variables declared by default, so the variables
      must be defined before include any headers.

   2) Sets the callback function by using the plugin command
      DlgProc::onCallback. Syntax:
      DlgProc::onCallback HWND FunctionAddress
      The function address could be get by GetFunctionAddress.

   3) In the case of using call back functions for both parent dialog
      and page dialog:
      The correct way is to set the callback function of parent dialog
      in function .onGUIInit firstly, and the callback function of
      page dialogs in its SHOW function after. Now the page dialogs
      use variables from the 4th one as the messages, for the first
      three variables are already used by parent dialog.

   4) Setting of Link control is merged. It can change the button
      specified to a hyperlink. Syntax:
      DlgProc::SetLinker HWND COLORNOMAL COLORHOVERED Flags
      Value of color should be indicated by the COLORREF parameter.
      Default values are 0xFF0000, 0x0000FF.
      Flag can be following value:
      32 - Keyboard support (TABSTOP, Focus)
      64 - Adjusts the size of control automatically
      If you need for keyboard support, the recommended value is 96.
      That is adjusting the control size meanwhile.

5. The plugin passed with NSIS 2.45/2.46 under Windows XP SP3.
   It may not support other versions of NSIS or OS.

6. See additional examples for usage.

Attentions:

Using NSIS stack and common variables such as $0~$9, $R0~$R9 should
be avoided in frequent messages for fear of confusion and conflict,
only if you know them perfectly, for the variables are global, the
stack is public, and the messages will be sent at any time.

You will receive warnings like:
Variable "xxx" not referenced or never set, wasting memory!
Please ignore them.

Author
--------------------------------------------
This plugin is written by gfm688 (Fami Kwan)


Transplated by JiaKe
