home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / ucMsgBox_-2054113162007.psc / Controls / ucMsgBox.ctl
Text File  |  2007-03-16  |  98KB  |  1,203 lines

  1. VERSION 5.00
  2. Begin VB.UserControl ucMsgBox 
  3.    ClientHeight    =   3600
  4.    ClientLeft      =   0
  5.    ClientTop       =   0
  6.    ClientWidth     =   4800
  7.    InvisibleAtRuntime=   -1  'True
  8.    Picture         =   "ucMsgBox.ctx":0000
  9.    ScaleHeight     =   240
  10.    ScaleMode       =   3  'Pixel
  11.    ScaleWidth      =   320
  12.    ToolboxBitmap   =   "ucMsgBox.ctx":045C
  13. End
  14. Attribute VB_Name = "ucMsgBox"
  15. Attribute VB_GlobalNameSpace = False
  16. Attribute VB_Creatable = True
  17. Attribute VB_PredeclaredId = False
  18. Attribute VB_Exposed = False
  19. '+  File Description:
  20. '       ucMsgBox - A Selfsubclassed Theme Aware ucMsgBox Control which Provides Correct Theme Visualization
  21. '
  22. '   Product Name:
  23. '       ucMsgBox.ctl
  24. '
  25. '   Compatability:
  26. '       Widnows: 9x, ME, NT, 2K, XP
  27. '
  28. '   Software Developed by:
  29. '       Paul R. Territo, Ph.D
  30. '
  31. '   Based on the following On-Line Articles
  32. '       (Paul Caton - Self-Subclassser)
  33. '           http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=54117&lngWId=1
  34. '       (Mario Flores - WinXPEngine)
  35. '           http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=51400&lngWId=1
  36. '       (Fred.cpp - isButton)
  37. '           http://www.devx.com/vb2themax/Tip/19239
  38. '       (Randy Birch - IsWinXP)
  39. '           http://vbnet.mvps.org/code/system/getversionex.htm
  40. '       (Randy Birch - TrimNull)
  41. '           http://vbnet.mvps.org/code/core/trimnull.htm
  42. '       (Randy Birch - Center MsgBox)
  43. '           http://vbnet.mvps.org/code/hooks/messageboxhookcentre.htm
  44. '       (Randy Birch - Timed MsgBox Destroy)
  45. '           http://vbnet.mvps.org/code/hooks/messageboxhooktimerapi.htm
  46. '       (Aftab Mahar - Set Process Priority)
  47. '           http://www.developerspk.com/showthread.php?t=20
  48. '       (Philip Manavopoulos & Aaron Young - MsgBox BackColor / ForeColor)
  49. '           http://www.vbforums.com/showthread.php?t=329373
  50. '       (MSDN eMagazine - Replacing the Icon)
  51. '           http://msdn.microsoft.com/msdnmag/issues/02/11/CuttingEdge/
  52. '
  53. '   Legal Copyright & Trademarks:
  54. '       Copyright ⌐ 2006, by Paul R. Territo, Ph.D, All Rights Reserved Worldwide
  55. '       Trademark Ö 2006, by Paul R. Territo, Ph.D, All Rights Reserved Worldwide
  56. '
  57. '   Comments:
  58. '       No claims or warranties are expressed or implied as to accuracy or fitness
  59. '       for use of this software. Advance Research Systems shall not be liable for
  60. '       any incidental or consequential damages suffered by any use of this software.
  61. '       This software is owned by Paul R. Territo, Ph.D and is sold for use as a
  62. '       license in accordance with the terms of the License Agreement in the
  63. '       accompanying the documentation.
  64. '
  65. '   Contact Information:
  66. '       For Technical Assistance:
  67. '       pwterrito@insightbb.com
  68. '
  69. '   Modification(s) History:
  70. '
  71. '       13Aug06 - Initial Usercontrol Build (Modified from WinXPEngine)
  72. '       15Aug06 - Fixed Button Focus Bug in Drawing Routine which painted them as StateNormal
  73. '       16Aug06 - Fixed the BrowseForFolder (BFF) loading conflict which prevented the global
  74. '                 subclassing of the MsgBox. The BFF uses the exact same ClassName, but different
  75. '                 WndowCaption than the MsgBox, so this is how we can differentiate it...
  76. '               - Added Alignment property and code to allow for MsgBox alignment
  77. '               - Added DrawFilledRect and Translate Color routines
  78. '               - Added DrawFilledRect to DrawWinXPButton routine to clean up the button painting
  79. '                 along the edges and corners
  80. '       20Aug06 - Fixed the Common Dialog (CD) and BFF ClassName conflict once again....it seems that
  81. '                 all three window classes share the same base Class, but have different captions.
  82. '                 Since the CD's caption can be changed this was not a reliable method for identification.
  83. '                 Given this, and the fact that the Window Styles were unique between the objects, we
  84. '                 could differentiate the MsgBox by ClassName and WindowStyle.
  85. '               - Fixed Looping bug when stop subclassing the MsgBox
  86. '               - Fixed Painting error when the mouse was down over a button and we moved...This
  87. '                 caused the button to not be painted in the correct style and showed the default
  88. '                 Win9x style instead of our down state.
  89. '       11Oct06 - Moved Alignemt and Theme properties into the m_MsgBox structure
  90. '               - Added SelfClosing property, type, and m_MsgBox structure elements
  91. '               - Added Duration property, type, and m_MsgBox structure elements
  92. '               - Added Dialog Prompt setting based on time left
  93. '       28Nov06 - Added Parent and ParentType to the m_MsgBox structure to allow for tracking of the
  94. '                 hWnd and Type of the Host Object
  95. '               - Fixed lLeft, lTop, lWidth, and lHeight calculations in the zSubclass_Proc to provide
  96. '                 a method to compute these when the host object is being destroyed and has gone
  97. '                 out of scope. Under these conditions, the reference to UserControl.Parent.Left (.Top...etc)
  98. '                 are not valid and throw an error which freezes the IDE since the MsgBox is Modal!!
  99. '               - Added ThreadPriority property to allow for real-time priority for the thread which allows the
  100. '                 Timer to have the New Priority other than "mbNormal"
  101. '               - Added SetProcessPriority to set the process priority
  102. '               - Fixed TimerProc bug which resulted in timer intervals which were incrementally
  103. '                 shorter on subsequent calls....cause: passing ByVal 0& instead of AddressOf Proc pointer
  104. '                 from sc_aSubData array.
  105. '               - Added CenterCaption to permit message centering for all passed prompts
  106. '       03Dec06 - Added AutoCenterPrompt property to allow for centering of the prompt from the property dialog
  107. '               - Added ForeColor Property to allow for Prompt and Button text being changed
  108. '               - Added BackColor Property to allow the Main form BackColor to be changed
  109. '               - Optimized DrawWinXPButton to correctect for stray pixels around each button
  110. '               - Optimized CenterCaption to now compute the correct spacing for centering of
  111. '                 the passed Prompt string
  112. '               - Set Init Properties to match the PropertyRead/Write defaults
  113. '       07Dec06 - Removed CenterCaption Method
  114. '               - Removed AutoCenterPrompt property
  115. '               - Added AlignPrompt property to replace the two above methods/prop.
  116. '               - Added an All API method (SetWindowLong) for Aligning the Prompt Text instead of padding the string.
  117. '               - Added Icon Property to allow for custom MsgBox icon replacment
  118. '               - Added DrawWin9xButton routine and associated methods to replicate the actual dialog
  119. '                 3D buttons. This allows us complete control of the colors and painting.
  120. '               - Added Support for Storing Either Win9x or WinXP States depending on the Theme
  121. '       08Dec06 - Fixed Minor bug in the SDIHost_QueryUnload and MDIHost_QueryUnload which incorrectly
  122. '                 set the subclassing flag and attempted to re-subclass the object on shutdown
  123. '               - Added hDC Property to allow Painting via this Mechanism
  124. '               - Added Additional Status Messages
  125. '       11Dec06 - Fixed Minor bug in the zSubclass_Proc, section WM_CTLCOLORDLG, WM_CTLCOLORSTATIC
  126. '                 where we were we passed invalid Icon.Pictures to the SendMessage API.
  127. '       18Dec06 - Added CustomCaption property to allow the dynamic switching of Default or Customs Captions
  128. '               - Added Caption Property and Structure element to permit custom button captions
  129. '               - Updated DrawWin9xButton and DrawWinXPButton methods to not permit custom dialog
  130. '                 button captions. Note: From a Software Engineering standpoint the CustomCaption structure
  131. '                 elements should be in the Button button field (i.e. m_MsgBox.Button(n).CustomCaption), but these are
  132. '                 dynamic arrays which are built just prior to the MsgBox being shown. As such, we have
  133. '                 choosen to place this struture element at the m_MsgBox level (i.e. m_MsgBox.CustomCaption(n)
  134. '                 so that they can be passed at runtime....
  135. '               - Added Subclass_StopAll to the zIdx method to prevent dialog faults which hault the mouse
  136. '                 and keyboard on subclassing errors. We also removed the Debug.Assert False statment
  137. '                 as this is the main cause of issues when working with modal dialogs of this sort.
  138. '       19Dec06 - Fixed minor bug in the SetProcessPriority method which hard coded the value....left over from testing ;-D
  139. '               - Added With structure to WM_ACTIVATE message section to allow for greater clarity
  140. '       24Feb07 - Added Expanded Theme Emulation for XP Luna Blue, HomeStead, and Metallic to the DrawXPButton routines
  141. '               - Bug still remains in the DrawAlphaVGradient which provides the "highlight" alphablending
  142. '                 between the background gradient and white
  143. '       11Mar07 - Removed DrawAlphaVGradient and AlphaBlend methods and replaced with Direct Gradient calls
  144. '                 to DrawVGradient and DrawVGradientEx for Metallic Luna Styles
  145. '               - Updated all Luna Metallic painting routines to reflect the corrected emulation style
  146. '               - Extended Theme Enum to encompass all possible default Luna Themes
  147. '                 (mbBlue (Blue), mbHomeStead (Olive Green), mbMetallic (Silver))
  148. '
  149. '-  Notes:
  150. '       This ucMsgBox control intercepts the ucMsgBox Call to the systems MessageBox API, and provides
  151. '       the ability to Paint the controls surfaces as we see fit. In addtion, with a little care we
  152. '       can position the control before it is shown and adjust the BackColors, ForeColors, Fonts
  153. '       and even the MessageBox Icons. The System Icons are ~32x32 Pixels with 24BPP if you plan to
  154. '       pass them from VB controls like ImageLists, Image, or PictureBoxes. The Icon window can handle
  155. '       icons which are 48x48 Pixels (24BPP) as well, but care should be taken to test these out prior
  156. '       to using them directly. The hDC is the DC to the Icon Window at "runtime" since the object does
  157. '       not exist until the MsgBox is called from the Host Object
  158. '
  159. '       There is one known issues with this control that can cause the Modal dialog to hault.
  160. '       One key issue is Double Subclassing or Failing to UnSubclass the MsgBox. This will allow the
  161. '       dialog to be painted the first round, but will cause a Debug.Assert in the zIdx method on all
  162. '       subsequent calls to the daialog. The result will be a hault of the subclasser and a Modal MsgBox
  163. '       Dialog....the net result being that the mouse will not work in either the IDE, Dialog, or Host Object.
  164. '       The only way to exit this is to F8 (Run) until you throw the exeption dialog in the IDE and click End.
  165. '       Be forewarned this may cause the IDE to crash!! I have extensively tested this and only has this happen
  166. '       when I did not follow the above rules....in short, the control is stable, provided the above caviate.
  167. '
  168. '       One Minor bug still exists when using fonts which are significantly different than Ambient.Font. In this
  169. '       case we will need to adjust the Prompt Rect to fit the new Font proportions. This can be achieved by the
  170. '       DrawText with the DT_CALCRECT flag. This is still under development....
  171. '
  172. '   Build Date & Time: 3/11/2007 11:52:32 PM
  173. Const Major As Long = 1
  174. Const Minor As Long = 0
  175. Const Revision As Long = 240
  176. Const DateTime As String = "3/11/2007 11:52:32 PM"
  177. '
  178. '   Force Declarations
  179. Option Explicit
  180.  
  181. '   Private Constants
  182. Private Const VER_PLATFORM_WIN32_NT As Long = 2
  183.  
  184. '   Msgbox Constant
  185. Private Const WC_DIALOG As String = "#32770"        'Win32 Classname for MsgBox Dialog
  186. Private Const MB_ICON As Long = &H14
  187.  
  188. '   Window Enum Constants
  189. Private Const GWL_STYLE As Long = (-16)
  190. Private Const GWL_EXSTYLE As Long = (-20)
  191. Private Const GW_HWNDNEXT As Long = 2
  192. Private Const GW_CHILD As Long = 5
  193. Private Const GW_HWNDFIRST As Long = 0
  194.  
  195. '   DrawText Flags
  196. Private Const DT_CENTER As Long = &H1
  197. Private Const DT_VCENTER As Long = &H4
  198.  
  199. '   MsgBox Prompt Flag
  200. Private Const IDPROMPT As Long = &HFFFF&
  201. Private Const IDOK As Long = 1
  202. Private Const IDCANCEL As Long = 2
  203. Private Const IDABORT As Long = 3
  204. Private Const IDRETRY As Long = 4
  205. Private Const IDIGNORE As Long = 5
  206. Private Const IDYES As Long = 6
  207. Private Const IDNO As Long = 7
  208.  
  209. '   Private MsgBoxTimerID
  210. Private Const MB_TIMERID As Long = 999
  211.  
  212. '   Private Class Priority Constants
  213. Private Const REALTIME_PRIORITY_CLASS = &H100
  214. Private Const HIGH_PRIORITY_CLASS = &H80
  215. Private Const NORMAL_PRIORITY_CLASS = &H20
  216. Private Const IDLE_PRIORITY_CLASS = &H40
  217.  
  218. '   Private TextAlign Flags for Static Windows
  219. Private Const SS_LEFT As Long = &H0
  220. Private Const SS_RIGHT As Long = &H2
  221. Private Const SS_CENTER As Long = &H1
  222.  
  223. '   Private Icon Flag
  224. Private Const STM_SETICON As Long = &H170
  225.  
  226. '   Os Window Types
  227. Private Type OSVERSIONINFO
  228.     OSVSize         As Long         'size, in bytes, of this data structure
  229.     dwVerMajor      As Long         'ie NT 3.51, dwVerMajor = 3; NT 4.0, dwVerMajor = 4.
  230.     dwVerMinor      As Long         'ie NT 3.51, dwVerMinor = 51; NT 4.0, dwVerMinor= 0.
  231.     dwBuildNumber   As Long         'NT: build number of the OS
  232.                                     'Win9x: build number of the OS in low-order word.
  233.                                     '       High-order word contains major & minor ver nos.
  234.     PlatformID      As Long         'Identifies the operating system platform.
  235.     szCSDVersion    As String * 128 'NT: string, such as "Service Pack 3"
  236.                                     'Win9x: string providing arbitrary additional information
  237. End Type
  238.  
  239. '   Required Type Definitions
  240. Private Type RGBQUAD
  241.     rgbBlue                     As Byte
  242.     rgbGreen                    As Byte
  243.     rgbRed                      As Byte
  244.     rgbReserved                 As Byte
  245. End Type
  246.  
  247. Private Type POINT
  248.     X As Long
  249.     Y As Long
  250. End Type
  251.  
  252. Private Type RECT
  253.     Left As Long
  254.     Top As Long
  255.     Right As Long
  256.     Bottom As Long
  257. End Type
  258.  
  259. Private Type LOGFONT
  260.     lfHeight          As Long
  261.     lfWidth           As Long
  262.     lfEscapement      As Long
  263.     lfOrientation     As Long
  264.     lfWeight          As Long
  265.     lfItalic          As Byte
  266.     lfUnderline       As Byte     '   //--The LOGFONT structure defines the attributes of a font.
  267.     lfStrikeOut       As Byte
  268.     lfCharSet         As Byte
  269.     lfOutPrecision    As Byte
  270.     lfClipPrecision   As Byte
  271.     lfQuality         As Byte
  272.     lfPitchAndFamily  As Byte
  273.     lfFacename        As String * 32
  274. End Type
  275.  
  276. '   Private MsgBox Types for Holding Object Data
  277. Private Type mbButtonType
  278.     hWnd As Long                        'Handle of the Button
  279.     State As mbState                    'Current State of the Button
  280.     Caption As String                   'Caption of the Button
  281. End Type
  282.  
  283. Private Type mbPromptType
  284.     hWnd As Long                        'Handle to the Prompt
  285.     hdc As Long                         'DC of the Prompt
  286.     lpRect As RECT                      'Rect of the Prompt
  287.     Caption As String * 1024            'Prompt Caption of the Main Dialog...
  288.     ForeColor As OLE_COLOR              'ForeColor Property
  289.     Alignment As mbPromptAlignEnum      'Prompt Aligment Flag
  290. End Type
  291.  
  292. Private Type mbIcon
  293.     hWnd As Long                        'Icon Window handle
  294.     hdc As Long                         'DC of the Icon window
  295.     lpRect As RECT                      'Rect of the Window
  296.     Picture As StdPicture               'Picture Property of the Icon
  297.     PrevPicture As Long                 'Handle to the Previous Picture
  298. End Type
  299.  
  300. Private Type mbTimerType
  301.     TimerDuration As Long               'How long a Timer Waits
  302.     TimerID As Long                     'Unique ID for the Timer
  303.     ThreadPriority As mbPriorityEnum    'Process Priority for MsgBox Timer
  304.     TimerToken As String                'Token String for the CountDown Timer
  305. End Type
  306.  
  307. Private Type mbMsgBoxType
  308.     Alignment As mbAlignEnum            'MsgBox Alignment Type
  309.     BackColor As OLE_COLOR              'BackColor Property
  310.     Button() As mbButtonType            'Array of Buttons
  311.     CustomCaption(3) As String          'Custom Caption for the Button
  312.     CaptionType As mbCaptionEnum        'Type of Button Captions to Use
  313.     Count As Long                       'Number of Buttons in the Array
  314.     DefaultIndex As Long                'Index of the Default Button
  315.     DownIndex As Long                   'Index of the Down Button
  316.     Font As Font                        'Font to Use
  317.     hdc As Long                         'MsgBox Form DC
  318.     hWnd As Long                        'MsgBox Form Handle which Hosts the Buttons
  319.     Icon As mbIcon                      'Handle to Icon Window
  320.     lpRect As RECT                      'Rect of the MsgBox Dialog
  321.     Parent As Long                      'Host Objects hWnd
  322.     ParentType As mbParentTypeEnum      'Type of Object which hosts the MsgBox
  323.     Prompt As mbPromptType              'Prompt Infomation
  324.     SelfClosing As Boolean              'Use Timer for SelfClosing...
  325.     Theme As mbThemeEnum                'Current Theme
  326.     TimerInfo As mbTimerType            'Timer Specific Information....
  327. End Type
  328.  
  329. Private Enum mbParentTypeEnum
  330.     [mbSDIForm] = &H0
  331.     [mbMDIForm] = &H1
  332. End Enum
  333. #If False Then
  334.     Const mbSDIForm = &H0
  335.     Const mbMDIForm = &H1
  336. #End If
  337.  
  338. Private Enum mbState
  339.     StateNormal = &H1
  340.     StateHot = &H2
  341.     StatePressed = &H3
  342.     StateDisabled = &H4
  343.     StateDefaulted = &H5
  344. End Enum
  345. #If False Then
  346.     Const StateNormal = &H1
  347.     Const StateHot = &H2
  348.     Const StatePressed = &H3
  349.     Const StateDisabled = &H4
  350.     Const StateDefaulted = &H5
  351. #End If
  352.  
  353. Public Enum mbAlignEnum
  354.     [mbCenterScreen] = &H0
  355.     [mbCenterOwner] = &H1
  356. End Enum
  357. #If False Then
  358.     Const mbCenterScreen = &H0
  359.     Const mbCenterOwner = &H1
  360. #End If
  361.  
  362. Public Enum mbCaptionEnum
  363.     [mbDefault] = &H0
  364.     [mbCustom] = &H1
  365. End Enum
  366. #If False Then
  367.     Const mbDefault = &H0
  368.     Const mbCustom = &H1
  369. #End If
  370.  
  371. Public Enum mbPromptAlignEnum
  372.     [mbLeft] = SS_LEFT
  373.     [mbRight] = SS_RIGHT
  374.     [mbCenter] = SS_CENTER
  375. End Enum
  376. #If False Then
  377.     Const mbLeft = SS_LEFT
  378.     Const mbRight = SS_RIGHT
  379.     Const mbCenter = SS_CENTER
  380. #End If
  381.  
  382. Public Enum mbPriorityEnum
  383.     [mbRealTime] = REALTIME_PRIORITY_CLASS          'Highest Priority
  384.     [mbHigh] = HIGH_PRIORITY_CLASS                  'Second Highest Priority
  385.     [mbNormal] = NORMAL_PRIORITY_CLASS              'Third Highest Priority
  386.     [mbIdle] = IDLE_PRIORITY_CLASS                  'Lowest Priority
  387. End Enum
  388. #If False Then
  389.     Const mbRealTime = REALTIME_PRIORITY_CLASS
  390.     Const mbHigh = HIGH_PRIORITY_CLASS
  391.     Const mbNormal = NORMAL_PRIORITY_CLASS
  392.     Const mbIdle = IDLE_PRIORITY_CLASS
  393. #End If
  394.  
  395. Public Enum mbThemeEnum
  396.     [mbAuto] = &H0
  397.     [mbClassic] = &H1
  398.     [mbBlue] = &H2
  399.     [mbHomeStead] = &H3
  400.     [mbMetallic] = &H4
  401. End Enum
  402. #If False Then
  403.     Const mbAuto = &H0
  404.     Const mbClassic = &H1
  405.     Const mbBlue = &H2
  406.     Const mbHomeStead = &H3
  407.     Const mbMetallic = &H4
  408. #End If
  409.  
  410. Private Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long
  411. Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long
  412. Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
  413. Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
  414. Private Declare Function DrawFocusRect Lib "user32" (ByVal hdc As Long, lpRect As RECT) As Long
  415. Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hdc As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
  416. Private Declare Function FillRect Lib "user32" (ByVal hdc As Long, lpRect As RECT, ByVal hBrush As Long) As Long
  417. Private Declare Function GetBkColor Lib "gdi32" (ByVal hdc As Long) As Long
  418. Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hWnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
  419. Private Declare Function GetClientRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT) As Long
  420. Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
  421. Private Declare Function GetCurrentThemeName Lib "uxtheme.dll" (ByVal pszThemeFileName As String, ByVal dwMaxNameChars As Integer, ByVal pszColorBuff As String, ByVal cchMaxColorChars As Integer, ByVal pszSizeBuff As String, ByVal cchMaxSizeChars As Integer) As Long
  422. Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINT) As Long
  423. Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
  424. Private Declare Function GetDlgItem Lib "user32" (ByVal hDlg As Long, ByVal nIDDlgItem As Long) As Long
  425. Private Declare Function GetDlgItemText Lib "user32" Alias "GetDlgItemTextA" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal lpString As String, ByVal nMaxCount As Long) As Long
  426. Private Declare Function GetParent Lib "user32" (ByVal hWnd As Long) As Long
  427. Private Declare Function GetPixel Lib "gdi32.dll" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long
  428. Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As Any) As Long
  429. Private Declare Function GetWindow Lib "user32" (ByVal hWnd As Long, ByVal wCmd As Long) As Long
  430. Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
  431. Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT) As Long
  432. Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
  433. Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hWnd As Long) As Long
  434. Private Declare Function InflateRect Lib "user32" (lpRect As RECT, ByVal X As Long, ByVal Y As Long) As Long
  435. Private Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long) As Long
  436. Private Declare Function LStrLen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
  437. Private Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, lpPoint As POINT) As Long
  438. Private Declare Function MoveWindow Lib "user32" (ByVal hWnd As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
  439. Private Declare Function OleTranslateColorA Lib "olepro32.dll" Alias "OleTranslateColor" (ByVal OLE_COLOR As Long, ByVal hPalette As Long, pccolorref As Long) As Long
  440. Private Declare Function OleTranslateColorEx Lib "oleaut32.dll" Alias "OleTranslateColor" (ByVal lOleColor As Long, ByVal lHPalette As Long, ByVal lColorRef As Long) As Long
  441. Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
  442. Private Declare Function PutFocus Lib "user32" Alias "SetFocus" (ByVal hWnd As Long) As Long
  443. Private Declare Function RedrawWindow Lib "user32" (ByVal hWnd As Long, lprcUpdate As Any, ByVal hrgnUpdate As Long, ByVal fuRedraw As Long) As Long
  444. Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hdc As Long) As Long
  445. Private Declare Function ScreenToClient Lib "user32" (ByVal hWnd As Long, lpPoint As POINT) As Long
  446. Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
  447. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  448. Private Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
  449. Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
  450. Private Declare Function SetDlgItemText Lib "user32" Alias "SetDlgItemTextA" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal lpString As String) As Long
  451. Private Declare Function SetPixelV Lib "gdi32" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal crColor As Long) As Long
  452. Private Declare Function SetPriorityClass Lib "kernel32" (ByVal hProcess As Long, ByVal dwPriorityClass As Long) As Long
  453. Private Declare Function SetRect Lib "user32" (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
  454. Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
  455. Private Declare Function SetTextAlign Lib "gdi32" (ByVal hdc As Long, ByVal wFlags As Long) As Long
  456. Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  457. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Long)
  458.  
  459. '   Private variables
  460. Private lzCount             As Long             'zSubclass Index to the Proc Address
  461. Private lCount              As Long             'Counter for the Timer
  462. Private bMsgBoxSubClass     As Boolean          'SubClass Flag of the MsgBox
  463. Private bTimerRunning       As Boolean          'Timer Running Flag for SelfClose
  464. Private m_AutoTheme         As String           'String Var to hold the Theme info
  465. Private m_MsgBox            As mbMsgBoxType     'MsgBox Type which hold the MsgBox Object Data
  466. Private m_Theme             As mbThemeEnum      'MsgBox Theme for property "Get"
  467. Private bHasIcon            As Boolean          'Flag which indicates the the dialog is using the icon
  468.  
  469. Private WithEvents SDIHost  As Form
  470. Attribute SDIHost.VB_VarHelpID = -1
  471. Private WithEvents MDIHost  As MDIForm
  472. Attribute MDIHost.VB_VarHelpID = -1
  473.  
  474. '==================================================================================================
  475. ' ucSubclass - A template UserControl for control authors that require self-subclassing without ANY
  476. '              external dependencies. IDE safe.
  477. '
  478. ' Paul_Caton@hotmail.com
  479. ' Copyright free, use and abuse as you see fit.
  480. '
  481. ' v1.0.0000 20040525 First cut.....................................................................
  482. ' v1.1.0000 20040602 Multi-subclassing version.....................................................
  483. ' v1.1.0001 20040604 Optimized the subclass code...................................................
  484. ' v1.1.0002 20040607 Substituted byte arrays for strings for the code buffers......................
  485. ' v1.1.0003 20040618 Re-patch when adding extra hWnds..............................................
  486. ' v1.1.0004 20040619 Optimized to death version....................................................
  487. ' v1.1.0005 20040620 Use allocated memory for code buffers, no need to re-patch....................
  488. ' v1.1.0006 20040628 Better protection in zIdx, improved comments..................................
  489. ' v1.1.0007 20040629 Fixed InIDE patching oops.....................................................
  490. ' v1.1.0008 20040910 Fixed bug in UserControl_Terminate, zSubclass_Proc procedure hidden...........
  491. '==================================================================================================
  492. 'Subclasser declarations
  493.  
  494. Public Event Status(ByVal sStatus As String)
  495.  
  496. Private Const WM_ACTIVATE               As Long = &H6
  497. Private Const WM_CLOSE                  As Long = &H10
  498. Private Const WM_COMMAND                As Long = &H111
  499. Private Const WM_CREATE                 As Long = &H1
  500. Private Const WM_CTLCOLORSTATIC         As Long = &H138
  501. Private Const WM_CTLCOLORDLG            As Long = &H136
  502. Private Const WM_EXITSIZEMOVE           As Long = &H232
  503. Private Const WM_LBUTTONDOWN            As Long = &H201
  504. Private Const WM_LBUTTONUP              As Long = &H202
  505. Private Const WM_MOUSELEAVE             As Long = &H2A3
  506. Private Const WM_MOUSEMOVE              As Long = &H200
  507. Private Const WM_MOVING                 As Long = &H216
  508. Private Const WM_NCPAINT                As Long = &H85
  509. Private Const WM_PAINT                  As Long = &HF
  510. Private Const WM_RBUTTONDBLCLK          As Long = &H206
  511. Private Const WM_RBUTTONDOWN            As Long = &H204
  512. Private Const WM_SETFOCUS               As Long = &H7
  513. Private Const WM_SIZING                 As Long = &H214
  514. Private Const WM_SYSCOLORCHANGE         As Long = &H15
  515. Private Const WM_THEMECHANGED           As Long = &H31A
  516. Private Const WM_TIMER                  As Long = &H113
  517.  
  518. Private Enum TRACKMOUSEEVENT_FLAGS
  519.   TME_HOVER = &H1&
  520.   TME_LEAVE = &H2&
  521.   TME_QUERY = &H40000000
  522.   TME_CANCEL = &H80000000
  523. End Enum
  524.  
  525. Private Type TRACKMOUSEEVENT_STRUCT
  526.   cbSize                             As Long
  527.   dwFlags                            As TRACKMOUSEEVENT_FLAGS
  528.   hwndTrack                          As Long
  529.   dwHoverTime                        As Long
  530. End Type
  531.  
  532. Private bTrack                       As Boolean
  533. Private bTrackUser32                 As Boolean
  534. Private bInCtrl                      As Boolean
  535. Private bSubClass                    As Boolean
  536.  
  537. Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
  538. Private Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long
  539. Private Declare Function LoadLibraryA Lib "kernel32" (ByVal lpLibFileName As String) As Long
  540. Private Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
  541. Private Declare Function TrackMouseEvent Lib "user32" (lpEventTrack As TRACKMOUSEEVENT_STRUCT) As Long
  542. Private Declare Function TrackMouseEventComCtl Lib "Comctl32" Alias "_TrackMouseEvent" (lpEventTrack As TRACKMOUSEEVENT_STRUCT) As Long
  543.  
  544. Private Enum eMsgWhen
  545.     MSG_AFTER = 1                                                                   'Message calls back after the original (previous) WndProc
  546.     MSG_BEFORE = 2                                                                  'Message calls back before the original (previous) WndProc
  547.     MSG_BEFORE_AND_AFTER = MSG_AFTER Or MSG_BEFORE                                  'Message calls back before and after the original (previous) WndProc
  548. End Enum
  549. #If False Then
  550.     Private Const MSG_AFTER = 1                                                                   'Message calls back after the original (previous) WndProc
  551.     Private Const MSG_BEFORE = 2                                                                  'Message calls back before the original (previous) WndProc
  552.     Private Const MSG_BEFORE_AND_AFTER = MSG_AFTER Or MSG_BEFORE                                  'Message calls back before and after the original (previous) WndProc
  553. #End If
  554.  
  555. Private Const ALL_MESSAGES           As Long = -1                                   'All messages added or deleted
  556. Private Const GMEM_FIXED             As Long = 0                                    'Fixed memory GlobalAlloc flag
  557. Private Const GWL_WNDPROC            As Long = -4                                   'Get/SetWindow offset to the WndProc procedure address
  558. Private Const PATCH_04               As Long = 88                                   'Table B (before) address patch offset
  559. Private Const PATCH_05               As Long = 93                                   'Table B (before) entry count patch offset
  560. Private Const PATCH_08               As Long = 132                                  'Table A (after) address patch offset
  561. Private Const PATCH_09               As Long = 137                                  'Table A (after) entry count patch offset
  562.  
  563. Private Type tSubData                                                               'Subclass data type
  564.     hWnd                               As Long                                      'Handle of the window being subclassed
  565.     nAddrSub                           As Long                                      'The address of our new WndProc (allocated memory).
  566.     nAddrOrig                          As Long                                      'The address of the pre-existing WndProc
  567.     nMsgCntA                           As Long                                      'Msg after table entry count
  568.     nMsgCntB                           As Long                                      'Msg before table entry count
  569.     aMsgTblA()                         As Long                                      'Msg after table array
  570.     aMsgTblB()                         As Long                                      'Msg Before table array
  571. End Type
  572.  
  573. Private sc_aSubData()                As tSubData                                    'Subclass data array
  574.  
  575. Private Declare Function GetModuleHandleA Lib "kernel32" (ByVal lpModuleName As String) As Long
  576. Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
  577. Private Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
  578. Private Declare Function GlobalFree Lib "kernel32" (ByVal hMem As Long) As Long
  579. Private Declare Function SetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  580. Private Declare Sub RtlMoveMemory Lib "kernel32" (Destination As Any, Source As Any, ByVal Length As Long)
  581.  
  582. '======================================================================================================
  583. 'Subclass handler - MUST be the first Public routine in this file. That includes public properties also
  584. Public Sub zSubclass_Proc(ByVal bBefore As Boolean, ByRef bHandled As Boolean, ByRef lReturn As Long, ByRef lng_hWnd As Long, ByRef uMsg As Long, ByRef wParam As Long, ByRef lParam As Long)
  585.     'Parameters:
  586.         'bBefore  - Indicates whether the the message is being processed before or after the default handler - only really needed if a message is set to callback both before & after.
  587.         'bHandled - Set this variable to True in a 'before' callback to prevent the message being subsequently processed by the default handler... and if set, an 'after' callback
  588.         'lReturn  - Set this variable as per your intentions and requirements, see the MSDN documentation for each individual message value.
  589.         'hWnd     - The window handle
  590.         'uMsg     - The message number
  591.         'wParam   - Message related data
  592.         'lParam   - Message related data
  593.     'Notes:
  594.         'If you really know what you're doing, it's possible to change the values of the
  595.         'hWnd, uMsg, wParam and lParam parameters in a 'before' callback so that different
  596.         'values get passed to the default handler.. and optionaly, the 'after' callback
  597.     Dim lhWnd As Long
  598.     Dim ClassWindow As String * 50
  599.     Dim ClassCaption As String * 100
  600.     Dim i As Long
  601.     Dim j As Long
  602.     Dim lpMsgBoxRect As RECT
  603.     Dim lLeft As Long
  604.     Dim lTop As Long
  605.     Dim lWidth As Long
  606.     Dim lHeight As Long
  607.     Dim lIndex As Long
  608.     Dim newLeft As Long
  609.     Dim newTop As Long
  610.     Dim dlgWidth As Long
  611.     Dim dlgHeight As Long
  612.     Dim scrWidth As Long
  613.     Dim scrHeight As Long
  614.     Dim hWndStyle As Long
  615.     Dim hWndStyleEx As Long
  616.     Dim sPrompt As String
  617.     
  618.     Select Case uMsg
  619.         Case WM_ACTIVATE
  620.             '   Get the Theme and store it....
  621.             m_AutoTheme = GetThemeInfo
  622.             '   Get the Window Style and Extended Style
  623.             hWndStyle = GetWindowLong(lParam, GWL_STYLE)
  624.             hWndStyleEx = GetWindowLong(lParam, GWL_EXSTYLE)
  625.             'Debug.Print "Window Style: &H" & Hex(hWndStyle), "&H" & Hex(hWndStyleEx), "&H" & (Hex(hWndStyle Or hWndStyleEx))
  626.             '   Get the Class Window Styles and make sure this is not the BrowseForFolder (BFF) or the
  627.             '   Common Dialog which also use this same #32770 ClassName. To differentiate these from
  628.             '   MsgBox we get the window Styles which are different between the three objects...namely the
  629.             '   WindowStyles (Style, ExStyle) are as follows: MsgBox (&H84C801C5, &H10101), and the
  630.             '   BrowseForFolder(&H4C820CC, &H10501) and the Common Dailog (&H86CC20C4, &H10501), which then
  631.             '   bitwise "OR" yeilds unique ID that allows us to ignore them when they occur!!
  632.             If (InStr(ThisWindowClassName(lParam), WC_DIALOG) > 0) And ((hWndStyle Or hWndStyleEx) = &H84C901C5) Then
  633.                 '   ///////////////////////////////////////////////////////////////
  634.                 '   This is the original way Mario Flores was able to locate
  635.                 '   the Buttons in MsgBox, but this does not work in UserControls
  636.                 '   since the API utilizes a CallBack Function which we can not
  637.                 '   address directly....
  638.                 'EnumChildWindows lParam, AddressOf EnumChildProc, ByVal 0&
  639.                 '   ///////////////////////////////////////////////////////////////
  640.                 '   The following is an equivalant routine....but without CallBacks
  641.                 '
  642.                 '   Get the Prompt string and store the value
  643.                 Call GetDlgItemText(lParam, IDPROMPT, m_MsgBox.Prompt.Caption, 1024)
  644.                 If (Not bMsgBoxSubClass) Then
  645.                     '   Enumerate child windows...the hard way!!!
  646.                     '
  647.                     '   The MsgBox hWnd is passed by the lParam value
  648.                     '
  649.                     '   Subclass the Main MsgBox Form
  650.                     With m_MsgBox
  651.                         '   Store the Handle of the MsgBox
  652.                         .hWnd = lParam
  653.                         Call Subclass_Start(.hWnd)
  654.                         Call Subclass_AddMsg(.hWnd, WM_MOUSEMOVE, MSG_AFTER)
  655.                         Call Subclass_AddMsg(.hWnd, WM_CLOSE, MSG_BEFORE)
  656.                         '   Subclass the Msgbox Color Dialog messages so we can set the
  657.                         '   BackColor and ForeColor
  658.                         Call Subclass_AddMsg(.hWnd, WM_CTLCOLORDLG, MSG_AFTER)
  659.                         Call Subclass_AddMsg(.hWnd, WM_CTLCOLORSTATIC, MSG_AFTER)
  660.                         '   Now we find the First Button!
  661.                         lhWnd = GetWindow(.hWnd, GW_CHILD)
  662.                         '   Get the ClassName
  663.                         GetClassName lhWnd, ClassWindow, 50
  664.                         '   Get the Caption of the Object
  665.                         GetWindowText lhWnd, ClassCaption, 100
  666.                         'Debug.Print lhWnd, Left$(ClassWindow, 6), Left$(ClassCaption, 6)
  667.                         '   Make sure we found a Button on th MsgBox
  668.                         If (lhWnd <> 0) And (Left$(ClassWindow, 6) = "Button") Then
  669.                             '   Store the First Button Value
  670.                             ReDim .Button(i)
  671.                             With .Button(i)
  672.                                 .hWnd = lhWnd
  673.                                 .Caption = TrimNull(ClassCaption)
  674.                             End With
  675.                             '   Now check for the remaining buttons, if any...
  676.                             '   Note we only let this Do loop run 5 times....this
  677.                             '   should prevent any endless loops...and besides there
  678.                             '   are never more then 3 buttons ;-)
  679.                             Do While (lhWnd <> 0) And (i <= 4)
  680.                                 '   Get the Next Item in the MsgBox
  681.                                 lhWnd = GetWindow(lhWnd, GW_HWNDNEXT)
  682.                                 '   Get the ClassName
  683.                                 GetClassName lhWnd, ClassWindow, 50
  684.                                 '   Check to see if this is a button....because
  685.                                 '   there are static windows which are used to
  686.                                 '   display Icons.....if one wished we could trap
  687.                                 '   these and change them by subclassing them
  688.                                 '   here as we are for the buttons....
  689.                                 If Left$(ClassWindow, 6) = "Button" Then
  690.                                     '   We found one more....so increment things
  691.                                     i = i + 1
  692.                                     '   Now store the new value
  693.                                     ReDim Preserve .Button(i)
  694.                                     '   Get the Caption of the Object
  695.                                     GetWindowText lhWnd, ClassCaption, 100
  696.                                     With .Button(i)
  697.                                         .hWnd = lhWnd
  698.                                         .Caption = TrimNull(ClassCaption)
  699.                                     End With
  700.                                     'Debug.Print lhWnd, Left$(ClassWindow, 6), Left$(ClassCaption, 6)
  701.                                 End If
  702.                             Loop
  703.                             '   Store the Icon Window for Later
  704.                             .Icon.hWnd = GetDlgItem(.hWnd, MB_ICON)
  705.                             bHasIcon = .Icon.hWnd <> 0
  706.                             '   "i" holds the number of buttons in the MsgBox
  707.                             '   so we will use this to increment the subclassing
  708.                             '   calls to the Thunk....
  709.                             If i >= 0 Then
  710.                                 '   Sublass the Usecontrol
  711.                                 Call Subclass_Start(UserControl.hWnd)
  712.                                 Call Subclass_AddMsg(UserControl.hWnd, WM_TIMER, MSG_AFTER)
  713.                                 '   See if we are using SelfClosing Style
  714.                                 If .SelfClosing Then
  715.                                     '   Get a Unique ID for the API Timer by getting the Time Since Midnight
  716.                                     '   We need to keep this reasonable, so we will mod this value
  717.                                     m_MsgBox.TimerInfo.TimerID = (Timer Mod 65535)
  718.                                     'Debug.Print "TimerID: " & m_MsgBox.TimerInfo.TimerID
  719.                                     '   Start the local timer to perform the count down
  720.                                     With .TimerInfo
  721.                                         '   Set the Process Priority for the Timer Thread                     '   Set the Process Puafter the    +      he following is an equival        Host Obje  he following is an equiuO         Wibclasscess Pv classcess  G0e Process Puafter the                       .hWnd = lhity for the Timer equiuO       .......iBsgBox (&H84C801C5, &H10101p801CgiVVVVVVVVVVasscF  Noowing is an equival     F                        '   Now store the new value
  722.                                     ReDim Preserve .Button(i)
  723.                                     '   Get the Caption of the Object
  724.                                     GetWindowT'ho                 .Left AindowT'ho  of tD    Call Subcla Subclass_fers, no                 lM_FIXED   erve .B:ss_fers, no                 lM_FIXED   erve .C
  725.                                             f the Object
  726. 7merID: " & ib "user32" AlDDDDDDDDDDDDDDDDDDDDDDDDDDDDDain Msw"         Iout ANY
  727.          iNDPROC                 l, 6), _cal timer to perform the count down
  728.                                     With .TimE()  'Type of Button Capth .TimerInfo
  729.      Capth .    '   Set the Prs '   SeB&nr the
  730.             '   Common Dialog which aers, no need to re-patc H   If (lhWnd <> rs, bA  Capth H   If (lhWnd <> rs, b<> rs,s, b<> rID: " & iBefolfHeight     te nlhWnt doy   I<> rsn    um      'Prompt Aligme......... om      'Pr                   ReDiioC      'Debug.Print    a   'Pr                     -h)         '   Common /.. om      'Pr                   ReDiioC      'Debug.PrintI               l       (bHIns in the MsaNquival     F       Dialog wn    '   WindowStyles (Style, ExStyle) are as follows: es (Style, ExStyle) are as folloStyle) are          l Subclass_AddMsg(.hWnd, WM_CTLCOLORSTATIC, MSG_AFTER)
  731. sing The                        ========="ignorNow stTlMDIForm
  732. Attr the the message is bhandler..s_fers, no         '   We need to keezhe message" & i er..to see if this is a button....because
  733.    gleEx As Long
  734.     Dim sPrompt As String
  735.     
  736.   7merID: " & ib "user32" W        yle, ByVal crolor 8he window being subclass,eLon Lib "kern1                    ung subclas.hDialog ClassCaption)
  737.                             End WoC   o subclass,eLon Lib "kern1                    ung SubcH          ung subclas.sd2en1                  GTONDBLCLK          As LrintI s     n
  738.  
  739. PriD: " & ib "user32" W        yle, ByVal crolor 8he win Lib "C    uttonTul Br Threaddow, 50
  740.                                 '   Check to see if this is a button....because
  741.             ong) pis a button....because
  742.             ong) pis a button....be for the buttons...j          OtC    .C
  743.                                    reai    Cion)
  744.         3B
  745. Private Cuttons...j          OtC    .C
  746.          sd2en1           gaO5, &2en1       ,?5        f the Object
  747. 7merID: " & ib "user32" AlDDDDDDDDDoheck to see if this is a b& ib "user32" AlDDDDDDDDDDDDDDDDDDDDDDDDDDDDDain Msw"   sage" & ean   8
  748.                 '    Window for LaL
  749. 'Subcla32   g(tyle) are as folloStyle) are   re          lW)lor 8D'RECT                 'Debug.Print lhWe   Call Subcla Sd v1.1.0007 20040629 Fixed InIDE patching oops................................8C     GetWindowT'ho                 .Left AindowT'ho  of tD    Call Subcla SubH0 ClassName. To differentiate these fH0 ClassName. To differentiate these fH0 ClassName. To differentiate these fHLong = &H204
  750. Private x9s Byte
  751.  HaloFM_FIXEse fHLong = &H204
  752. Private x9s Byte
  753.  HaloFM_FIXEse fHLong = &H204
  754. Private x9s Byte
  755.  HaloFM_FIXEse fHLong = &H204
  756. Private x9s Byte
  757.  HaloFM_FIXEse fHLong = &H204
  758. Private x9s Byte
  759.  HaloFM_FIXEse fHLong = &H204
  760. Private x9s Byte
  761.  HaloFM_FIXEse fHLong = &_p4oebject
  762. 7merItTlMDIForm
  763. fHLong = ct
  764. 7merItTlMDIFo   .8butC   Iout ANY
  765.          iNDPROC               Ia
  766. 7merItTlMDIFo A         r(Me fHLong = &Hllx9s Byte
  767. Ia
  768. 7merIt"= &H(t lhWe   Call Subcla Sd v1.1.0007 mtTlMDIFo Ae Cutton     mhen
  769.                            (      End If
  770.                         use tdate x9s By   mhenp4oebjei-_FIXEse fHLoses          As    mhenp4oebjei-_FIXEse fHLoses          As    mhenp4oebjei ebjeA crow7merIr     Hd Ina$(ClassWindow, 6i-_FI
  771.  
  772. PriD:                         -_FI
  773.  
  774. PriDa   Hd Ina$(ClassWindow, 6i-_FI
  775.  
  776. PriD:           l t     Bunction PostMessamttttttttAr         -_FPostMessamttttttttAr         -_FPostMessamttttttttAr         -_FPostMesoeget p -_FBion tttttttAr         -_FPostMessamttttttttAr       If
  777. essamttttttttAr          ttttttAr         -_FPostMessamttttttttAr       I    ssamttttttttAr      WM_CTLCOLO      I    t AindowT'LO      I    t AindowT'LO      I    t AindowT'LO      I    t AindowT'LO      I    t AindowT'LO IXEse fHLong = &H204
  778. Private x9s Byte
  779.  Hov 7 mtTlMDIFo Ae C4
  780. P          OtC   ean Long = &H204lzCount   oowing is an equiva(mBrivate Const GMEM_F= &H204lzCount   oowing is an eto
  781.               Ris an et   Ris 7 mtTlMDIFo Ae C4
  782. P          OtC   ean Long = gdw"   sage" ject Lit thnction FillRect Lib "user32" (ByValO      I    t Aiect Lit thnction F> rs, b<> rs,s, b<> b<> r  iNDPROC               Ia
  783. 7merItTlMDIFo A    ttttttttAr  o .C
  784.                            
  785.  
  786. PriDa   Hd Ina$(ClassWindow, 6iunning Fivate x9s Byte
  787.  HaloFM_FIXEse fHLongna$(ClassWindow, 6i-_FI
  788.  
  789. PriD:     FillRect Lib "user32" (ByValO    sPVall Fivate x9s B1.0007 mtTlMDIFo Ae Cutton     mhen
  790.        cAed toFo Ae      mhen
  791.       t th Long = gdwIDPROC              n
  792.  
  793. PriD: " & ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWn(& ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWn(& ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWn(& ib "user32" W lhWnd, f        ser32" W lhWn(&A            If i >= 0 Then
  794.                                se fHLongna$(ClassWindow,e   W lhWn(&A        ha() indow,fOu"= lauser329EeO      'Ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWn(& ib "user32" W lhWnd, f oib "uiOessage" & i er..to see if ?ser32" W lhWnd, f oib "uiOessage" & i er..to see irN"& ib "u.1.00B find    s        ram As Long, ByRef lParam  lhW8Diib "u.1rvng iong
  795. Priv1erControl_Terminate, zSubclas s  EByRef lParam  lhrHB find    s        ram As Long, ByRef lParam  lhW8Diib "u.1rvng ioTn)
  796.      S                 essage" ram  lhWer32" W lhW ssage" ram  lhWer32"W lhW    Dim l               ount   oowing is an equiva(mBrim l        ount  0Tage" ram  lhWer32"I      W lhWn(&uon3        'Msg aftm DC
  797.     hWnd As Lla32   g(tyle) are as folloStyle) are   re        lhWSAo             As Long
  798.   dwFlags                             essage" ram  lhWer32" W lhW ssage" ram  lhWer32"W lhW    Dim l               ount   oowing is an equiva(mBrim l        w   ount   oowing is an equiva(mBrim l i lhWer.      w   ou"   sage" ject Lit thnction FillRect Lib "user32" (BSowLong(lParam, GWL_STYLE)
  799.             hWr theCtyle) al) And (v     w   ou"  Uoowin'o             As Long
  800.   dwFlags                        a32            o     Capth e Declare Functio-oByRefy Long = -o     Capt    jsg is an equiva(mOFan equipth e DeclEare Fuion Serrrrrrrrrrrrrr  jsg is T      e DeclEare Fuion Serrrrrrrrrrrrrrrrrr M_SETFOCUS       :Dr32"& ib "user32" W lhWn(& ib "user32gs       rrrrrrrrr Mrrrrrres Long, lpRect  & i s an equiva(mOF1CFbA  llllllllllllllllllllllllllllllllllllllllllw                   I<te Cons Long = -o Mrrrrrres Long, lpRectrs Long
  801.  c 6), a   reogaO5, &2en1       ,?5        f thllllllllllllw                   I<te Cons Lonres errrrrw                   I<te Cons Lonres errrrrw                   I<te Cons Lonres errrSubcl              I<te Cons Lonres (tStyle
  802.          nres errrSubcl              I<te Cons rrrSubcl            ClassCaption As String * 100
  803.     Dim i As Long
  804.     Dim j As Long
  805.     Dim lpMsgBoxRect As RECT
  806.    PVall Fivate x9s B)o      d = GetWiva(mOFan equiptS8OFan equiptS8Orn Long
  807.     Dim j A equiptS8Orn Long
  808.     Dim j A   Dim j wFNs) 8OFan equiptS6ZFBNc.'ons Lonres (tStyle
  809.          nres errrsFIXEse fHLong = al nWidth As Lb = &HHHHHHHHHH0o= &HHHHHHHHHH0o= &HHHHHHns L  Dim j As Long
  810.     Dim lp     2StyleHHHHHHHH0o= &HHHHeCtE             I<te Cons Lonres errrSubcl   mLong, ByVal Y As LBr32"& ib "usePYnd Enu err>H0  Long
  811.  c 6), a   reogaO5, &2en1       ,?5        f thllllllllllllw            ), a   re
  812.   Errrrrrrr GetWiva(                    f thlllllll&2en1       >EmB
  813.   Errrrrrrr GetWiva(                                  ll&2en1       >EmB
  814.   E        ClassWl_MsgBox.T L  Dim j As Long
  815.   aubcl               I<te Cons Lonres errrSubcl   mLong, ByVal Y As LquiptS8Or Lib          
  816.   au1aubcl               I<te Cons d ma equiptS8OFan equiptS8O   I<te Cons d         /l'ho tS80see if ?ser322"& ib "user32" W lhWnd, f       :Dr32"& ib "user32" W lhWequipRect Lib "user3232pRect Lib "usS = "Bu(mBrim l        w   ount   oowing s Lqu   w   ount   oowing s Lqu   w   ount  d ma equiptTrlhWnd, w   ount  d ma equiptTrlnt  d ma u   w quiptTrlnt. WithEventsjei-_Fva(mBrim l        w   ount   oowing is an eqByte
  817.  Halo6), aiptS      w  irsnS8OFan equiptS8O   I<te Cons d         Lqu 
  818. Private x9rtion SetTextColor Lib "gdi32"cCaptEirsnSsW4
  819. Private x9s BytersnSsW4
  820. Private x9s BytersnSsW4
  821. PriEirsn= &_pheust GMEM_FIXED             As Long = 0 s Long) As Long
  822. Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT) As Long
  823. Private DeclarL
  824. PriF( lh Byter_CTLCiclare FunctioRect Lila(' d         Lqu 
  825. Psrrrrrrdddddddqu 
  826.          An0aConst GByte 2StyDer table entry cClassWl_Msg0FunctioRect'  ErrrrrsnSsW4oiaFLong
  827. Prifrqu 
  828. PsccMunt   oowingMunt rifr = 0 s Long) As Long
  829. PrcClassWl_Msg0FunctioRect'  ErrrrrsnSsW4oiaFLong
  830. Prifrqu 
  831. Ps As Long
  832. PrcClassWl_Msg0FunctioRect'  ErrrrrsnSsW4oiaFLong
  833. Prrrrrsg = &HVl FivNge" &6H6
  834. Private Codddddd&6H6
  835. Prie   sage" ject Lit thnction FillRect Lib "user32" ",W4oiaF    Ia
  836. 7merItTlMib 0n8
  837. 7meoooooojecmerItTlMit'  Errwo Lit thnction FillRect Lib "user32" ",W4oiaF    Ia
  838. 7merItTlMib 0n8
  839. 7meoooooojecmerItTlMit'  Errwo Lit thnction FillRect Lib "user32" ",,,,,,eea     n F> rsct Lib "user323  If i >= tWiva(msF
  840. Private x9s Byter
  841. Private Declare FunctioYTU         As Long = &HEiptTrlrrrrre
  842. Privatser32" ",W4oiaF    Ia
  843. 7merItTlMib 0n8
  844. 7meoooooojecmerItTlMit'  Errwo Lit thnction FillRecg is an equiva(mBrim l i lhWer.      w   ou"   sage" ject Lit thSsW4oiaFLong
  845. PFmerItTlMit7merItTlnction FillsW4oiiiiiiiiiiiiiiiiv" 0n8
  846. I
  847.      iRinhange them by su8B_ItTlncCsS
  848.    A 
  849. Ps)mBrnRrivate\'lDequrnSsW4oiaFLonherrrrrw                   I<te Cons Lonres errrSubcl              I<t x9s BytersnSdqu 
  850.    lType TRACKMOUSEEVENT_STRUCT
  851.   cbSize             ong,  xtColo                 Y As LBr32"& ib "usePYnd Enu errYnd Ens L  D cib "user3/////////g        '   should prevent any endless loops..8s        '   shouone more....sl@PostMessamttttttttAr       I    ssamttttttttAr      WM_CTLCss looong
  852.     Dim scrHe9s Byt         BkBptS8O looong
  853.     Dim veep this lVENT_STCnctiony  As    (tttAr
  854.     Dim veep this Byt       oVr veep this B w   ountwing s Lquuntwios Long "SetWe this same #32)is B w   ountwbg We thic'  Dim veepDp    :AptS8O lame #32)is Bage" &g subcB find    bufACKMOUSEEVENT_STRUCT
  855.   cbSize             ongI ountt   oow er..toENT_STCnctiony  As    (tttttttACKMOUSEEVENT_STRUCI(tttthis Byt       
  856. PrcClassWlong, ByI  
  857. iFLong
  858. PFmerItTlMit7merItTlnctinha" ",W4oialooong
  859.    looon-NT_STCnctionyo, soony   mhenpfTo",W4oialooong
  860.    looon-NT_STCnctionyo, soony   mhenpfTo",W4oialooong
  861.    looon-NT_STCnctior   lW2" W        yle, ByVal croloSEEVENT_STRUCT
  862.   cbSize          (previous) Wn u7(.g         An0aConst GByte 2StyDer table entry cClasss Byt     3yt     3yt     3yt     3yt     3yt     3yt     3ytW4oiMlncCsS
  863.    A 
  864. Ps)mBrnRrivate\'lDequrnSsW4oiaFLonherrrrrw                   I<te Cons Lonres errrSubcl              I<t x9s Bytrrw   
  865.   cbSirw   
  866. nst WM_NCPAize          PrcCl, Left$(eCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE_BEFORE)
  867. Be    RUCTAe Cutton     mh w   ount  d ma equipIPrcCl,l_Msng
  868. Private Declare Function Senton yequipIPrcCl,l_Msng
  869. Private Decl_////g        ' lncItTlMibnction Senton[er32" DInton[er      ion Senton[er32" DI wParrcCl,l_Msng
  870. Private Decl_////g        ' lncItTlMibnction Senton[er32" DInton[er      ion Senton[er32" DI wParrcCl,l_Msng
  871. Private Decl_////g        ' lncItTlMibnction Senton[er32" DInton[er      ion Senton[er32" DI5CCCCCFn Senton[er32" DInto......DI wParrcCl_w   ountwbg oVr veep this      s Lo,on Senton[o...ier32" DIton[Iie C4
  872. P    CCCFn Sentr   ountwbg crHe9s Byt    TLCicl32" DICCCCCFn =========   lM_FIXEr32" DInton[er      ion Senton[er32" DI wParrcCl,l_Msng
  873. Private Decl_////g        ' lncItTlMibnction Senton[er32" DInton[er      ioentry mVize          PrcCl, Left$(eCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE_BEFOR5CE_BEFOR5CE_BEFOR5CE_BEFOR5CE4tCCCCCCCe defaul\ongr        PrcCl, Left$(eCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE_BEFOR5CE_BEFOR5CE_BEFOR5CE_BEFOR5CE4tCCCCCCCe defaul\ongr        PrcCl, Left$(eCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE_BEFOR5CE_BEFOR5CE_BEFOR5CE_BEFOR5CE4tCCCCCCCe defaul\ongr        PrcCl, Left$(eCCCCCCAs Lona5CE_BEFOR5CsF_BEFOR5CE_BEFOR5CE_BEFOR5CE_BEFOSenton[er32" DId            a 
  874. Ps        a 
  875. Ps                  As Long = &H7
  876. Priv8uCE_BEFOSenton[er32" DId      <te      '   Set the Pr   yl$o,on Senton[temEFOSenton[5CE_BEFOR5CE_BEFOR5CE_BEFOR5CE4tCCCCCCCe defaul Byt       
  877. PrcCl   yl$o,on Senton[temEFOSenton[5CE_BEFORolze             ong,  xtCoPOSeyt       
  878. PrcCl   yll3t$(eCCCCCCAs Lona5CE_BEFOR5CsF_BEFOR5CE_BEFOR5CE_BEFOng =BEFOR5CE_BEFOR5D[er32" DId      <te      '   Set the Pr   yl$o,on tna5CE_BEF     '   Get th    eeBCE_BEF t////g        il   yll3t$(eCCCCCCAs L/sble enBCE_BEF t////g        il   yll3t$(eCCCCCCAs L/sble enBCE_BEF t////g        il   yll3t$(eCCCCCCAs L/sble enBCE_BEF t////g        il   yll3t$(eCCCCCCAs L/sble enBCE_BEF t////g        il   yll3t$(eCCCCCCAs L/sble enBCE_BEF t////g        il   yll3t$(eCCCCCCs)s             i = i + 1
  879.                yll3tv
  880.             '   WindR5CsF_BEFOR5CE_BEFOR5CE_BEFOR5CE_BEFOSen15ar5Y      s Lo,on.Prompt.    ItTlMibn-CCCCCCAs L/sble enBCCCCl\ongr   ompt.Ti/sble enBCC7"OR5CE_BEFOF.vBoenBCE_B WndProc (allocated memory).
  881.     nAddrOrig                   nblic routine in this file. That includes public properties also
  882. Public Sub zSubclass_Proc(BLonCCCCC ",,,ig        IC   Subcla5OCCCCCCCCn[5CE_BBEFORe enBtSubclass_Proc(BLonByt     3yt  FCCCCCE_pt.Ti/sble enBCC7"Oiiiiiiiiii5CE_BBEFORe Ma5OCCysCn[5PublLong
  883. is 7 mMa5Oc(BLonByun Lib "C   p       ttttiE_BEFOF.vBoenBCE_B WniD:        PrcCl, LeftCCCCCCCCCCCCCCCCCCCCCCDcib "user3/////////g        '   should prevent anR5CE_BEFOR5CE_BEFOR5CE4tCCCCCCCeaCCCCCC                  nblic routine in this file. That includes public properties alCCCCCC         _//g       (CASubclancludes public properties alCCCCCC      er32"sv8uCE2  ttttiE_BEFOF.vBoenBCE_B WniD:    TLCicc  er32"sv8uCE2  ttttiE_BEFOF.vB_BEFOF.vB_BEFOF.vB_ = &////////
  884.           0'Message calls backn(& E_B WniD:    TLCicc  er32"sv8uCE2  ttttiE_BEFOF.vB_BEFOF.vB_BEFW3Cs)s  4w   ount    F.vBR5CE_BAI   syP .hWnd = lhWnd
  885.                                 .E     '  20040602 Multi-sub '   Set the Prs '   SeB&nr theE_B BEFOf'       .E     '  20040602 Multi-sub '   Set the Prs '   SeB&nr theE_B BEFOf'       .E     '  20040602 Multi-sub '   Set the Prs '   SeB&nr theE_B BEFOf'       .E     '  20040602 Multi-sub '   Set the Prs '   SeB&nr theE_B        .E     '  20040-the P  SeB& '   SeB&nr theE_B        .E     '  20040-the P  SeB& '   SeB&    .SeB&nr theE_B SeB&nr theE_B        .E     '  2004GrrrsnSsWa  .E     '  20040602 Multi-sub '   Set the Prs   .SeB&nr thE_B S6" ",W4oiaF       .E     '  2 P'o Prs   .SeB&nr thbug.Print lhWe   Call nr thbug.Print/
  886.    rint lhWeEor = 0 s Ludes B_BEFW3Cs)s  4w   ount      =========   SeB&   vate Con,,,eea     n F> rsct Lib "user323  If i >= tWiva(msF
  887. Private x9s Byter
  888. Private YCP0  lh. ThE_B BEFOf'       .E     '  iF.vBR5C=herrvatttttt   Ffet the      mssssssIciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiote     iiiiiiiiiiiiiicECT) As LoF
  889. Private      iiiii      yll3tv
  890.             '   WindR5CsF_BEFOR5CE_BEFOR5CE     mh w   ount  d m6Byte8buo&H1050 lhW  yll3tv
  891.         s L/C Byl3tv
  892.    hWnd, f oib "u     m,5CE     ,clarations
  893.  
  894. Public Event Status(ByVal sStatus As String)
  895.  
  896. HIL'    ,clarati.CsF_BE    m,nWnd, arrcCl_w   ountwbg o o oDCoPOS- sageOf'          \ongHHns L  Di          \ongHHns L  Di          \ongvrs '   SeB&nr theE_B BEFOf'    ed InIls Byter8=mFOf'    ed InIls a        TLCicc  er32"sv8uCEsMD Di  LCicc=Hns ls a        TLCicc  er32"svs B w   ountwbg We thic'  Dim veepDp    :AptS8O lame #32)is B I<TLCicc  er32"svs B w   ountwbg We thic'  Dim veemvrs '   SeB&nr t veemmvrs '   r32"svs ay B I<TLrs ' 6'  Dim vLCss &      dCCCCCCCCCCCCCCCCCCCCCCE_BEFOR)Xvrs '   r32"svs ay ByVal sStatus As String)
  897.  
  898. HIL'    ,clarati.CsF_BEEEEEEEEEEEF  r32"    f the Object
  899. 7merID: " & ib "user32" AlDDDDDDDDDoheck to larati.aF9 AlDDDDDDDDDoheck to l larati.aR)Xvrs '   r32"svs ay.aR)Xvrs '   r3oeents...........6'  Dim v   il   yll3t$(eCCCCCCs)s             i = i + 1
  900.                yll3tv
  901.             '  l nr ....Wn(& e2"svi = C         rern1 zSubclclalA       s sccMunt   oowingMunt rifr = 0 s Long) As LongbAs String)
  902.  
  903. HIL' clalA       s sccMyVal sSo  rernEMyV defaul\ongr       grk
  904. HIL' cl   SubData()   nt    F.vBR5CE_BAI   syP .hWnd = lhWnd
  905.        R cla rern1 zSubclclalA       s sccMunt   oowingMunt    oowingMunt    oowingMunt    oR.vBR5CE_BAI   syP .hWnd = lhWnd
  906.   'N Subcla5OCCCCCCCCn[5CE_BBEFORe enEFOSentonto
  907.   n     85
  908. Private Const WM_ r theE_B BEFOf'    ed InIls Byter  DiSSubcla5OCCCCCCCCn[5CEin2FNT_STCnctiony  As rifrqu 
  909. Pate Const WM_ r the theE_BP'o Prs   .Se       .E    n2L' cln= "Bing)
  910.  
  911. HIL'    ,clarati.CNCPAize itOu     m,5CE     ,clarations
  912.  
  913. Public Event Status(BySL' cl Byter  DiSSubcla5OCCCCCCCCn[5CEin2FNT_STCnctiony  As rifrqu 
  914. Pate Const WM_ r the theE_BP'o Prs   .Se       .E    n2L' cln= "Bing)
  915.  
  916. HIL'    ,clarati.CNCPAize itOu     m,5CE     ,clarations
  917.  
  918. Public Event Status(BySL' cl Byter  DiSSubcla3tv
  919.    hWnd, 92gr        PrcCl, Left$(eCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE_BEFO)1'   SeB&nr t veemmvrs '   r32"svs ay CCCCCCnAE_BBrBFO)1'   SeB&nr t veemmvrs '   r32"svs ay CCCCCCnAE_BBrBFO)1'   SeB&nr t veemm2  6tton si aVFCCCCnAEMulti-sub '   Set the Prs '   SeB&B  ion Senton[er32" DI5CCCCCFn Senton[er32" DInto......DhWndStyleEx) = &H84C901C5) Then
  920.                 '   ///////////////////////////////////////////////////////////////
  921.                 '   This is the orEg)
  922.  
  923. HIL'    ,clarati.CNCPAize itOu     m,5CE     ,clarations
  924.  
  925. Public Event Status(BySL' cl Byter  DiSSubcla5ble enBCCCCl\ongr_ro        sFvum nr tze itOFlor DInto......DhWndStyleEx) = &H8 nr tze itOFlor DInto.         '   ////eEx)eE     .E     '  2004GrrrsnSsWa  .EIr nr tzrE_BEF t////g        essages ////       sF'    dublic Even1'   SeB&nr t veemauc(#32)is                                                                                                                                        sp,iiingMunt rifr = 0 s Long) As LongbAs String)
  926.  
  927. HIL' clalA       s sccMyVal sSo  rernEMyV defaul\ongr       grk
  928. HIL' cl   SubData()   ,5CE     ,claefaul\ongr       grk
  929. HIL' cl   SubData()   ,5CE     ,claef         7V defaul\rk
  930. H.Wn(& e2"svi = C         rern1 zSubclclalA       s sccMunt   oowingMunt rifr = 0 s Long) As LongbDo_nto.zrdwlE    n2L'_alA       ifr = 0 s Long) AsSubcla5OCCCCCCCCn[5CE_BBEFORe enEFOSentonto
  931.   n       sage"           4    mrdwllllll  n       spes alCCCCCC     ssssssIciiiiiiiiiiiiiiiiiiiiiiiiis32)is        (y
  932. H.iiiiis32)isV defaul\rk
  933. H.Wn(& e2"svi bDo_nto.zrdwlE           =s+ 1
  934.                yll3tv
  935.            1\rk
  936. H.Wn(     yEEEF  r32"    f the Objecs As Lo A 
  937. Ps)mBrt    i_=====      Pd-n of Objecs As Lo A 
  938. Ps)mBrt    i_=====      Pd-n of Objecs As Lo           '   /f Obj         yll3tvbj         yltWiva(mOFan ei .Button(i)
  939.                                0faul '   /f Obj        1'n(i)
  940.                                0faul '   /f Obj        pnblic rouuuuuuF3tvbj         yltWiva(mOFan ei .Button(i)
  941.                                0faul '   /f Obj        1'n(i)
  942.                  1'n(i)
  943.   x)eEm 4w   ount      =========   SeB&   vate Con,,,eea     n F> rsct Lib "user323  IeB&   vCE_BEFOR5CE     mh 1C5) Then
  944.           l l  yltWiso
  945.     m 4w   ou"  il   yll0 s Long) As StyleExd2c rouuuuuuF3tvbj         yltWWnd, f        ser3     l /.. oVbv    M/.. oVbv    M/.. oV         sm                      1'nAey 4w          l l  yltWiso
  946.     ventiiiiin       pnblic rouuuuuuoowinO prever theE_B B88888888888888888888ii      ylStri          nd if set, an 'a(/.. oVb
  947.     
  948.   n        Pdiiin       pnb
  949.     m enAE_BB)DtyleExd2c rouuuu  .E5 TRUCT Pdiiin       pnb
  950.     m enAE_BB)D5lo  DiSD    rBe Decl4=.&si      ylStri          nd if set, an 'a(/.. oVb
  951.     
  952.   n        Pdiiin   d  
  953.   n        Pdiiin   d  
  954.   n        Pdiiin   d  
  955.   n        Pdiiin   d  
  956.   n        Pdiiin   d  
  957.   n aquival        H=9 oVb
  958.     
  959.  iin   d  
  960.     H=ed by tcCl   yll3t$(eCCCCCCAs Lona5CE_BEFOR5CsF_Bhen
  961.  IBInr t veem?_BEFOR5CsF_Bhen
  962.  IBInVb
  963.  ll3t Left$(ClassCaption,is anm_FI
  964.  
  965. Pri(Clas   nd if set, an 'a(     is ft$) InVb g.Prita( d, arrcCl_w   oF> rsct Lib "user323  IeB&   vCtgffset
  966. Private CoFI
  967.  
  968. Pri(Clas   theEbug.Print lh> rsct Lib "user323  IeB&   vCtg "user32"      ri(Cluos   theEbug.4GrrrsnSsWa  .E     '  20040iCoPOS- srsnSsWa  .E     '  20040iCoPOS- srsnSsWa  .E'u   Case WM_ACTIVATE
  969.            2004gbAs String)
  970.  
  971. HIL' clalA       s sccMyVal sSo  re.E     lW2" W'r Statunt lh> rsct Lib i     l             includes publiF      s     rtunt lTIVATE
  972.            2004gbAs String)vSssWindow, 6) = "Button") Then
  973.                   s     rtunt lTIVATE
  974.            2004gbAs String)      , 6              nd if set, an UIn") Then
  975.                   s    i5l= lt        n70    E
  976.    art the local timer to perform the count down
  977.                              With .l l  yltWiso
  978.  u        1tWiso
  979.  u        1tWiso
  980.  u        1tWiso
  981.  u        1tWiso
  982.  u        1tWiso
  983.  u   n                          Aso, soonso
  984.  u    ssWindow, 6) = "Button") Then2)isVptig subclas.hDialog ClassCaption)
  985.            s sccMyVal sSo  re.E L' claB9age val       s l    ri(C    '  20040iCoPOS- srsnSsWa 0040602 Multi-sub '   Set the Prs '   SeB&nrim hWndStyle As Long
  986.     Dim hWndStyleEx As LonS(a5                ifr Dg)
  987.  
  988. HIL'    ,clarati.Curn                i&nrim hWndStyle As Long
  989.     Dim hWndStyleExWcoon-NTTTTTIQ8     <oPOSsim ve    et trCP0  lh. ThE_B BEFOf'       .E     '  iF.vBR5C=herrvatttttt                   s L/s    I    t  et trCP0  lh.        lWnd, f       :Dr32"atching oops.......................g oops..........       hing oops.ons  ll3t Latching ooooooooooooooooooooNy oops.ons  llIF.i    hing oops     i&nrim hWndSting oops"svs ay ByVal sy oops.ons  llIF.i    hing oos"svs     window he locM_ACTIVATE
  990.     s2.oooo hing oops     i&nrim hWndSting ooh   s2.nd With
  991. s   lhWnd = GetWindow(lhWnd, GW_HWNDNEXT)
  992.                            oo hing o.. oV     L_gaO5        1N"& ib "u.1.0    " W lhWnd,i    hi defaops     i&nrim hWndSting oops"svs ay ByVal sy oops
  993.    wu1ndow(ljl)
  994.                       H=ed     s l   A(/.. oVb
  995.   efaopse lhWnd = GetWindowN]AhWnd,i   otCProc(BLonByt     3yt  FCCCCCE_pt.Ti/sble enBCC7"Oiiiiiiiiii5CE_BBEFORe Ma5OCCysCn[5PublLong
  996. Ma5OCCyilhWnd,   waliiiiiiiii v1.o oVb
  997.   efsl hMem AsPublic routine in thia(pWindow,StyleEx        arrcSow(ljl)
  998.              s l   A(/.. oVb
  999.   efaopse lhWnd5             s l v Obj      3yt  FsHs
  1000.     C       rern1 zSubclclalA       s sccMunt   oowingMunt rifr = 0 s Long) As LongbDo_nto.zrdwlE    n2L'_alA       ifr = 0 s efaops     i&nrim hWndSting oops"svs ayu rifrpCCCCCCCCCCCCCCCCCCE_BEFOR5CE_ingsCE_BEFOR5CE_ingsCE_BEFOR5CE_ingsCE_BEFOR5CE_oet theAbd"svi = C         rernFOR5CE_oe004gbAs String)
  1001.  
  1002. HIL' clalA       s sccMyVal sSo  re.E     lW2" W'r Statunt lh> rs 1tWiso
  1003.  u      mrernFl sSo  re''   The MsgBox hWnt Button  StringgBox hWnt Button  g oops.o MsgBoi&nrimvnVb g.Prita( dll0paayu rifrHrox lF WM_Aj70    E
  1004.   0paayu . ...Dh    mrernFl sSo  re''   The 1b    WM_CT   nd if set, an 'a( rrrS   E
  1005.   0paayu .set, an 'a( rrrS   ounk..  nbli        s     e doing,4gbAs Stri-ing,4gbAsan 'a( rrrS.E  cla5OCCC'waouser32" unk..  nWng,4gbAs Stri-ing,4gbAsan4444444Im A     rern1 zSubclclalA    r0lalsCapsn s    nbli        ox lF WM_Aj70    E
  1006.  ri-insim ve    et trCP0  lh. ThE_B BEFOf'       .E   n       .E  OCs)s  4w   o zSubclcn 'a( r an 'a(HtyleEx06004,rS   E
  1007.   0paayu .set, an 'a( rrrS   ounk..  W  .EConst     .E muF                        Geti   Geti   Geti   Geti   Geti   Geti   GetC5CE_inoooooNy oops.ons FnoooooNns Fno    t AindowT'LO    (CASubci   GekyleEx06004,rS   EukB  yltWiso
  1008.     m8 nr tze it Fno    t T    'I7merCysCn[5Pub[ '  dDlekyleEntodns Fnooo  4wHHEeEntodns Fnooo  4w=IF.i   rtuWrCysCn[5Pub[ '  dDlekyleEntod   5                 LassWindHPriFOR5CE_ingsCE_BEFOR5CE_ingsCE_BEFOR5CE_oet theAbd"svi = C         rernFOR5CDcib "user3/    w, 6)sCE_BEOR5CE_ Set theeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeel i&nl5CE_ C     ssGekyleuWrC                          ReDim .Button(i)
  1009.                             With .Button   ssGekylepcIaopsE
  1010.   0paaF
  1011. Pr CE_ C     ssGekyleuWrC            /muF     /muF     /muF     /muF    )
  1012.                                 eeeeeeyt         s2.oooo hing oops     i&nrim mrern0iaquiyMsgBo, ByI  
  1013. iFLongggggggggggggggggggggggggggggggggggggptoRct
  1014.         " unk.....lgggpg ooh   s2.nd WitWrC  iyI  
  1015. iitWrC  ongggggggclarnd if set  nCI    efs FsHs
  1016.  [F  gggggggggptoRct
  1017.         " unk.....lgt FsHrFo Ae           =vr  ongg oo h  gggg eeeeeeer  efs FsHyggggggggpE_BEFOR5CE_BEFOR5CE_BEFOR5CCCCCCsasHyggggEEEEEFOR5CE_BEgggggt          HyggggggggpE_BEFOR5CE_BEFOR_yggg5CE_ Set ekd        Hyge) As LongbDo_nto.zrdwlE    n2L                 With .TimerInflEFOlE  LEntodE_BEFOR_yggg5CE_eEntodns BEFOR5CntodE_Ba buf                      With .Button   ssGekylepcIaops BCWitWrC ton(i           odE_BEFOR_yonresngbDo_nto.   With .hgt th Loneeeeeeeeeeeeeeeeeeeeeeeps BCR_yonresngb  o zSup1b cS'vn2L               eeeeeeeeeeeeeeeeeeeeeeeps BCR_yonresngb  o zSup1b cY             odE_BEFOR_yonresngbDo_nto.   With .hgt th Loneeeeeeeeeeeeeeeeeeeeeeeps BCR_yonresngb  o resngssGekyleuWrC            o resngssGekynmou"       1resngssGeps BCR_yonresngban 'a(HtyleEx06004,rS   E
  1018.   0parCR_yoh1tWiso
  1019.  u      mrernFl eTimer by getting the Time Sinc  odE_BOoct Lib "usOCth . "usssssssssno_nto.   With .hgt th Loneeeeeeeeeeeeeeeeeeeeeeeps BCR_yonresngb  o zSup1b cS'vn2L               eeeeeeeeeeeeeeeeeeeeeeeps BCR_yonresngb  o zSup1b cY             odE_BEFOR_yonresngbDo_nto.   With .hgt th Loneeeeeeeeeeeeeeeeeeeeeeeps BCR7 th tton onFl eTime32)'eeeeeeeeeeeeeeeeps BC_4')ngbeeeeps BCnFl eTime32)'eeeeontrol
  1020. BCR7 thO32)'eeeeontrol
  1021. BCR7 thO32)'eeeeontrol
  1022. BCR7 eTime32)'Hyge) As LRlalA [5CEiOs   lh[5CEiOOOOOLSme32)'apyggggggggpE_BEFOR5CE_BEFOR5CE_BE9'Hyge)  FsHyggggp[5CEiOsi          s e//////a   ge) As LRlalo'tine in this file. That incXa   HE_Ba,8n onFmeeeeeeeeeeeeeeeeeeeps BCR7 th tton onFl eTime32)'e0nd WitWrC  iyI  
  1023. iitWrC  ongggggggclarnd  s s2byonresngb  o zSup1b cS'vn2L          BBEFORe Meeeeeeeeeeeeeeps BCR_yonresngb  o zSup1b cY             odE_BEFOR_yonresngbDo_nto.   With .hgt th LoA32)'e0nd WitW0FOR5             s e///Ohcla5OCCCCCCCCn[5CE_BBEFORe enEFOSentonto eeeeee8>pounk..  W rC  ongggggggclarnd  sbjeA crow7merIr eeeeeeronggggo               
  1024.  
  1025. PriDa   Hd Ina$(ClassWindow, 6iunning Fivate x9s Byte
  1026.  HaloFM_FIXEse fH L_gaO5   me. To difeeeeeeep2)'e0nd WitW0FOR5             s e///Ohcla5OCCCCCCCCn[5CEge) As LRlalo'tine in this file. Td-n of Objecs As Lo      tie0nd,8n onltttt               s e///Ohctonto e Td-n of ObjecL        clclalA    r0lalsCapst the      mssssssIciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiOcs As Lo      tie0nd,8n onltttt               e Decl_////g        ' n onltttt               nbli        s     e dT@a   hi def  waliiiCst the     )(t lhWMS  walirsct Lib ,me32)'e0nnnnnWWWWWBN          'dyonresn           nbli        s     e dT@a   hi def  waliiiCst the     )(t lhWM  s Lo  e dT@a   hi def  waliiiCst the     )(t lhWMS  walirsct Lib ,me32)'e0nnnnnWWWWWBNCngbDo_nto.   With .hgt th LoA3odE_BEFORc       s e///Ohctonto e s    (cct AClassWl_Msg0FunctioRect'  ErrrrrsnSsW4oiaFLong
  1027. Prrrrrsg     nnnnWWW.Wthe  FLong
  1028. PrrdsPnnnnWWW.Wthegl   A(/.. oVb
  1029.   efaop\ueeeeeeeeeeee dT@a   '  ErrreD       Re MeeeeeeeeeeSS  walirsct Lib                         s e///.vBo   LassWindHPriFOR5CE_ingsCE_BEFOR5CE_ingsCE_BEFOR5CE_oet(Feeontrol
  1030. BCR7me32)'e0nnnnnWWWWWBN          'la5OCCCCCCCCn[5CE_BBEFORe enEFOSentonto eeeeee8>pounk.00      EFORe Meeeeeeeee o resngssGekynmou"       1resngssGeps BCR_yonresngban 'a(HtyleEx0tyyonresngban 'a(_me32)o'oe 1resngssGeps BCR_yonresngban 'a(HtyleEx0tyyonresngban 'a(_me32)o'oe 1resngssGeps BCR_yonresngban 'a(HtyleEx0tyyonresngban 'a(_me32)o'oe 1resngssG  me. To difeeeeeeep2) eeeeeeeps BCR_ssGeps  "Bu me. To difeeeeeeep2) eeeeeeeps BCR_ssGeps  "Bu me. Tols BCR_ssGeps an 'a(_mps BC----------sngban 'a(_me32)o'oe.iiiost the      mssssssIciiiiiiiiiiiir  DiSSubc  1eps,cBa.5CE4 Tols BCR_ssGens Fnoo_yonresngbaPriFlirFnoo_y 1eps,cBa.5CE4 TolsBa.PriFlirFnoo_y 1eps,cBa.5CE4 TolsBa.PriFlirFnoo_y 1eps,cBa.5CE4 OOOLS BCnFl eTime32)'eeeeontrol
  1031. BCR7 thO32)'eeeeontrol nbli  f set, an UIn") TString)
  1032.  
  1033. HIL' cathO32)'e)Lesngb  o zSup1b ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, it F 'CO+l eTime32)'eeeeontrol
  1034. BCR7 thO32)l0a(HtyiMOUSEE,,,,,,,,,,e32)o'oe 1resngssGeps BCR_yonrclCE4 TolsBa.Pr       odE_BEFOR_yonresngbDo_FOR   
  1035. BCR7 th/.. oV         sm          ioRect'  ErrrrrsnSsW4oiaFLong
  1036. Prrrrrsg     nnnnWWW.Wthe  FLong
  1037. PrrdsPnnnnWWng
  1038. PrrdsP   xme32)'eeeng
  1039. PrrdsPnnnnWWng
  1040. PrrdsP   xme32)'eeeng
  1041. PrrdsPns L/s    I    ng
  1042. PrrdsPnnnnWWng
  1043. PrrdD0Rrivate\'lDequrnSsW4oiaFLonherrrrrw      3o   LassWindHPriFOR5CE_ingsCE_BEFOR5CE_ingsCE_BEFOR5CE_oet(Feeontrol
  1044. BCR7me32)'e0nnnnnWWWWWBN          'la5OCCCCCCCCn[5efLBr32"& ib "usePYnd Enu errYnd Ens L  D cib "useI me. To difee<mlie. To difeeeeeeep2)'e0nd WiogMunt    oowingMunt    oR.vBR5CElHusePYndarrrYnd a, anr theE_errf>eeeeeeeLoo difee<mlie.sF_BEcMunt   o") T &2en1iPYn(rrw   is   Do difCCCCn[5efLBr32ton(i)APe s   Fong
  1045. Pre.ssssssssssssssssssss2en1iyt       
  1046. PrcClassWlong, B          yt  FCCCCCE_pt.Ti/sble sssss2ontrol
  1047. BCR7me32)'e0nnnnnWWWWWBN          'laCFn Sentonlueubcla5O   r0laltrol
  1048. BCR7me32)'e0nnnnnWWWWWBN 'laCFn a   ge)r       s e/0nnn      eeeeeeeeeeeeeeeeeeeeeeeps n    aoe/0nnn      eeee             trol-sngban '-CCCCCCe)r           oa5OCCCCClonggggggggggggaoe/0nnn      eeee    sss2ontrol
  1049. BCong =B_ol nbli  f set, an UIn"N =B_ol nbli  f l nbli(iiiiiCCCCCCe)r           oa5OCCCCClonggggggggggggaoe/0nnn  l(t lh efaodsm2inc  ocgggggggggaoe/0nnn  l(t lh efaodsm2inc  ggaoe/a     oAr   nong = &H2[5Pu=iting oop         BBEFORe Meeeeeeeeeeeeeeps gMunt    ' n onltttt               >eeeeeeeLoonS thO32)'eeekBounk..  W rC  ongggggggclarnd  sbjeA         nt  nbli(iiiiiCCui[5efLBr32ton(i)APe s   Fong
  1050. Pre.        nd if set, an 'a(/.. oVb
  1051.     
  1052.   n        Pd(u                                        f the ObjeS       eeeeeeekyleuWrCn onl1iri(C    '  20040iCoPOS- sontrol
  1053. BCR7me32)'e0nnnnnWWWWWBN          'la5OCCCCCCCCn[ylvrs '   r3oeents...........6'  Dim v   il   yll3t$(eCCCCCCs)s             i      32)'e0nnnnnWWWWWB4oiaFLonherrrrrw                   Ic  i      Deeeeps BCR_y,8n onltttt               e Decl_////g  8n onltttt                                I<te Cons Lonreing Style
  1054. n[ykBounk..     Deeeep'EcRs      32)'edu8,,,,,,,,,,,,,,,,,,,,,,,,,Mte Cons Lonres errrSubcl   mLon
  1055. PrrOR5C      nbli(iiiiiCCui[5efLBr32to   yll3t$ set, an UIn"N =B_ol nbli  f l nbli(iiiiiCCCCCCe)r   an 'a(/.. oVb
  1056.     
  1057.   n s    mhenp4ifee<mlito   yll3t$ set, an Uto   yll3t$ seBlh[5CEoet(Feeontrol
  1058. BCR7me3A$ set, an 4D7me3A$ set, a9bcl  setF
  1059. Ps)D7me3A$ seeeeeeeehae3A$  n onlttteeonIV'-s B w   ountwbg We thic'A          -ike3A$  n onCCe)r   an 'a(/.. oVboeeep2) eeeeeeeps BCR_sonst     .E muF        ._BEFOR_yonresngthOatus(BySL' cl Byter Byter Byter   DSL' c\EFOSentontolaJ  o z4lesngb  o zSbIEFOSen9sPnnnnWWng
  1060.   DSL' c\E -ike3A$  n onCCe)r   an 'a(/.. oVboeeep2) eeeeeeeps B. To dife(FOSen9sPnnnnWWng
  1061.   DSL' c\E -ike3A$  n onCCe)r   an 'a(/.. oVboeeep2) eeeeeeeps B. To dife(FOSen9sPnny        Pd(u                                   iiin        .vBR5Cgggggggclarnd  s     -_FE_B        .E     '  2004GrrrsnSsWa  .E  Vb
  1062.     
  1063.   n        ep2) eeeeeeeps BCRggclarnd  s     -_FE_B        .E     '  2004GrrB equiptS8O5lrsnSsW4oiaFLonitS8nd aConst GByte 2SbCsF_BE0040602 MugaO5  dife(FOSeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee      Wit     utine ix           
  1064.  
  1065. PriDa   Hd Ina$(ClassWindow, 6iunning Fivate x9s Byte
  1066.  HaloFM_FIXEse fH L_gaO5   msnSsW4p BEFOR5ve ix         ngvrs '   SeB&nr theE_., 6iunninB&nr theE2)'e-_FE_B        .E     '  2004GrrB equiptS8O5lrsnSsW4oiaFLonitS8nd aConst GByte 2SbCsF_BE0040602 MugaO5  dife(FOSeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee  Byte 2SbCs_EFOR5eeeeetYndCCCCCCE_BEFOR    '  20040iCoPOS- soyeeeeeeeeeeg
  1067.   aubcl               I<te Cons Lonres errrSuaiiiiiiiiiiiiFlirFnoo_y 1eps,cBa.5C set, an Uto   yll3t$ seBlh[5CEoeE_rORction GetWindss)Vb
  1068.   eeee__hhhhw'   This T-2)is B w  indss)Vb
  1069.   eeee__hhhhw'   This T-2)is B w  indss)Vb
  1070.   eeee__hhhhw'   This T-2)is B w  indss)Vb
  1071.   eeee__hhhhw'   This T-2)ie orEg)
  1072. e,,,,,,,,,,,,,,,,,,,,,,l2)ie orEg)
  1073. e,,,,,,,,,,,,,,,,,,,,,,l2)ie orEg)
  1074. e,,,,,,,,,,,,,,,,,,,,- m This T-2)ie orEg),,,,,,,,- e,,,L' c\E -ike3As T-2)is B w  indss)Vb
  1075.   eeee__hhhhw'   This T-2)is B w  indss)Vbz      B w  is T-2  msnSsW4p BEFOR5ve ix         ngvrs '   SeB&nr theE_., 6iunninB&nr theE2)'e-_FE_B        .E     '  2004GrrB equiptS8O5lrsnSsW4oiaFLonitS8nd aConst GByte 2SbCsF_BE0040602 MugaO5  dife(FOSeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee  Byte 2SbCs_EFOR5eel MugaO5  dieeeeeeeeeeeeee8888888ii      ylStri      rCl2so
  1076.  u     ylStri      rCl2so
  1077.  u   =so   rCl2soA<'5lStEpWe thic'A          -ike3A$  n onCCe)r   an 'a(/.. oVboeeep2) eeeeeeeps BCR_sonst     .E muF        ._BEFOR_yonresngthOatus(BySL' cl Byter BfeoA<'5lStEpWe thic'A          -ike3A$  n onCCe)r   an 'a(/.. oVboeeep2) eeeeeeeps BCR_sonst     .E muF        ._BEFOR_yonresngthOatus(BySL' cl Byter BfeoA<'5lStEpWe thic'A          -ike3A$  n onCCe)r   an 'a(/.. oeeeeeeeeeeeeps al( thic'A    leeeeeeeeeeeps al( thic'A    leeeeeeeeeeeps al( thic'A    leeeeeeaE_B nByt     3yt  x7 th tton'i   leeeeeeeeemlncItTteeeendss)Vbz      _  ti-ike3A$  n o"   3yt  FCCCCCE_pt.T ss
  1078. e,,,,,,,,,,,,,,,,,cWindHPrtVbz Dles
  1079. e,,n  l(t lEFORc       s E_B nByt   leggclaA"N = As LRlalo'ti4Deps BCR_soiiiiiFlirFnoo
  1080. e,,,,,,,,,eNCiSL' cl Byter BfeoAv*2inc  ocgggg' cl VFlirFnoo
  1081. the ObjeS       eeeeeeekyleuWrCn onl1iri(C    e ObjeekyleCss &  FNs) 8OFan equiptg(lParam, GWL_EFORe enEFOSentonto
  1082.   n     85
  1083. Private Const WM_ r theE_B BEFOf'    ed InIls Byter  DiSSubcla5OCCCCCCCCn[5CEin2FNT_STCnct   ed InIls Byteaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaf'  ter  DiSSubcla5OCCCCCCCCn[5CEin2FNT_STCnct   ed Cn '-CCggggaoe  re''   Ther theE_., pst     .E85lrsnSsW4oiaFLoeeee dT@a   '  ErrreD       Re MeeeeeeeeeeSS  ErrreD       Re MeeeeeeeeeeSup1b cY             odE   .E85lugaO5 ntonto eeeeee8>pounalEFORc       s E_B nByt  r(-to eee)'eeeeonet, an 4Dr(-togggggggclarn        A     odggclarn        A      l(LongiIyCCE_pt,B   0   'ee)'eeeeonet, an 4Dr(-togggggggclarn        A      n2L' cln= "Bing)
  1084.  
  1085. HIL'    ,clarati.CNCPAize itOu     m,5CE )E_BEFORam As ls(iernFOR5CE_oeNT_STCnctBi I1r theE_Acnet, an 4Dr(-toggggggFPt(-t5TCnct Decl4=.&si      ylStrst trCP0  lh. ThE_B BEFOf'       .E     '  iF.vBR5C=herrvat'Dslclarn        A    1tE     '  2004GrrB equipt     ylStrst trCP0  lh.lalo'tsh ylStrst trCP0  lh.lalo'tsh ylStrst trCP0  lh4    odE   .E85lugaO5 ntonto eeeeee8>pounalEFORc       s E_B nByt  r(-to eee)'eeeeonet, an 4Dr(-togggggggclarn        A     odggclarn        A      l(LongiIyCCE_pt,B   0   'ee)'eeeeonet, an 4Dr(-togggggggclarn        A      n2L' cln= M(b
  1086.  ,n  l    t AindowToshc4CCCCCRect'  Errrrrsatus(BySL' FunctioRect'  ErrrrrsnSsW4oiaFLong
  1087. PpBveemmvlnEFOSentonto
  1088.   n     85
  1089. Private Const  (      End If
  1090.        s E_B nByt  rgclarn   Dd InIls Byter  DiSSubcla5OCCCCCCCCn[5'ee)'t rifr = 0 s Long) As LongbDo_nto.zrdwlE    n2L'_alA       ifr = 0 s Long) AsSubcla5OCCCCCCC<:llaaaaaf'  ter i r th.zrdwlE    n2L'_alAot rif)
  1091. e,ccB BEFOf'0    " W lhWnd,i    hi  W lao
  1092. e,,,,,,,,,eNCiSL6p BEFOR Lib "user32" (ByValOMh.zSt3 Byte
  1093.  HaW lhWnd,i    hi  W lao
  1094. e,,,,,ke)r T-2)ie orEg)
  1095. eaeeeeelao
  1096. laoeeeps B.Weaaaaaa      )
  1097. eaeee'ee)'t rifr =Uto   yll3t$ seBlh[5 20040iCoPOS- sontFsHyggggggggpE_BE  odE_BEFOR_yonre'eeeeo )
  1098. eaeee'-_FE_esw 20040iCoPOS----------sv  n onCCe)rs2ccB BEFOf'0   i4opp)FE_esw 20040iCoPOS----------sv  n onCCnton[er32CCn[EFOf'0   yP .V Cnton[er32CCn[EFOf'0   yP .V Cnton[er32CCn[EFr-B   A      rrrrrw    "sv         -----s.V Cnton[er32CCn[EFr-Benton[5  .E muF        ._BEFOR_yonresngtFOf'0 lE muF        ._BEFOR_yonresngtFOf'0 lE8040iCoPOS----------sv  n onCCe)_lf'0 lE8040iCoPOS----------sv  n onCClvr32CC4 thnction F> rs, b<> rs,s, b<> b<ee'-_FE_esw 20040iCoPOS---x onC   "L32CC4  odggclarn        A      l(BonC    B w  is T-2  mc  l(BonC    B w  is T-2  mc  l(Bo ngMu040iCa(BoniP[er.........iCoPOS----------sv  nCCCCCt   MLssGekyleuWrC         '_esw 20040iCoPRECTF"Bu1her  nCs..iCopounk.Se       .E n[er32CCn[EFr-Benton[5  .E muF bDo_ntCCE_BEFOR5CCCCCCng, By1RECTFCt   MLssGekyleuWrC o[5CEin2FNT_ST2n2FNT_ST2a(euWrC an[er32CCn[EFr-Benton[5  .E muF bDo_ntCCE_BEFOR5CCCCCCn///g        il   yFPt(re.sssssoe 1reT_ST2a(euWrC   (   .Se (euWnSsW4oiaFLoi  lnByt  ra      y,    l(BonC    B w  i040iCoPR040iCoPRECTF"Bu1her   H6
  1099. PriEFOR    '  20040iCoEFOR5CE_BEByt  SWWWBN   onC    B w  i040iCoPR040iCoPRECTFmuF bDo_ntCCE_BEFOR5CWith
  1100. uF bDo_ntCCE_BEFOR5CWith
  1101. uF bDo_ntCCE_BEFOR5f40ia)_lf'0 g)
  1102. _BEFOtonto eeeeh e Declare Functio-oByRefy Long = -o     Capt    jsg is an equiva(mOFaVf'0 g)
  1103. _BEFOtonto eeeeh e Declare Functio-oByRefy Long = -o     Capt    jsg is an equiva(   CrvoCCCCCCng, By1RECTFCt   MLssGekyleuWrC o[5CEin2FNT_ST2n2FNT_ST2a(euWrC an[er32CCn[EFr-Bento       nCCCCCrBN          'la5LssGekylnnWWW.Wthe  FLonr-Ben'_alAot rif)
  1104. e,ccB BEFOf'0    " W lhWnd,i    hi  W lao
  1105. e,,,,,,,,,eNCiSL6p BEFOR Lib "user32" (ByValOMh.zSt3 Byte
  1106.  HaW lhWnd,i    hi) As LRaCile. That o[5CEin2F5eeeeetY hi) eC            /mPa()  r0  ssssssIciiiiH0ett     .LRawaliiiCeC       7  DSL'b "user32" (ByValOMh.zSt3 Byte
  1107.  HaW lhW.    .LRawaliiiCeC       7     lulhWnd,i    hi  W lao
  1108. e,,,,,,,,,eNCiSL6p BEFOR Lib "user32" 32" (ByV     o b "user32" (ByValOMh.zSt3 BytelulhWnss)Byter  Duser32" (B      'la w  is T-2  mc  l(BonC    B w  is T-2222222222io87 oVb
  1109.     
  1110.  iin   d  
  1111.     M(b
  1112.  ,n0iCoPOSRawaliiiCeC       7  DSL'b "user32" (ByValOMh.zSt3 Byte
  1113.  HaW lhW.    .LRawaliiiCeC       7     C  hi  ErrrrSo     ._BEFOR_ynSsW4oiaaaaandss)Vb(y
  1114. H.iiiiis32)iF0ntttiE__lf'0 lE8040iCoPOS----------sv  n onCClt1RECTF)lhW.    .LRawaliEFOR5cla5O- Byter BfeoAv*2inc onC  A      nn///g        Vhis T-2)i   .L4.LRa'b "us"Bing)
  1115.  
  1116. HIL'    ,clarati.CNCPAize itOu     m,5CE )E_BEFORam As ls(iernFOR5CE_oeNT_STCnctBi I1r theE_Acnet, an 4Dr(-toggggggFPt(-t5TCnct Decl4=.&si      ylStrst trCP0  lh. ThE_B BEFOf'       .E     '  iF.vBR5C=herrvat'Dslclarn       R_yon,clara       .E     '  2004GrrB equiptS8O5lrsnSsW4oiaFLonitS88888888888a   7  & eeeoooooonrclCE4 TolsBa.Pr       odE_BEFOR_yooooooo    .E3EFOR_yooooooo  B4 TolsBa.Pr       oE3EFOR_yooooooo  B4 TCng, BpssGekyleuWrDtTolsBaA        ge) As Llarnd  s     -_FE_Ber BfeoAv*2inc onC  A      nn///g        Vhist
  1117. Privateae  hi) i5Pubp odd      lu  -_FEl/g  3,7  & eeeoBa.PrcoddsBa  nn///g  El/g  3,CCCn[5CEin2FNT_STCnct   ed Cn '-CBfeoAvCsuseri) i5Pubp -CBfeoAvCsus   i = i + 1
  1118.     theAbW lhW.    .LRawaliiiCeC     Ks"mT_STCnct   edclarn     iiCeC [er32"U"us"Bing)
  1119.  
  1120. HIL'    ,clarati.CNCeng
  1121. Pt    e5cf<ee'-_FE_esw 2Ks"mT_STCnct     iieeeeeeeeeeeeeeeeeeeeee,OOOOOOOOOOOOOOOOOOOOOlOOOOOOOOOlOOOOOOOOOlO-Pubp odd      3,7  & eeeoB02 M4lCng, By1REt   ed CnsEsnr  20lAvCsu r thnr  20lAvCsuiva!aD eeeoBa.PrcoddsBa  yleuWrC o[5CmuF bDo_ntCCE_BEFOR5CCCCCCng, By1RECTFCt   MLssGekyleuWrC o[5CEin2FNT_ST2n2FNT_STDaD eetOu    H1ws LRaCile. That o[5CEin2F5eeeeetY By1arrcCl,l_Msng
  1122. Prla5Lssr,86y1RECTFCt   MLssGekyleuWrC o[5eeeeetY ByEFOR_ynSsW4oiT@a   '  ErrreD    BeeetY Byonltttt       val .. oM aubcl          Csu r tBdsBaleneubcl lhW.   ErrreDt, an 'a(/. '       '2B w  i040iCoPR0e   val .. oM aubcl          Csu r tBdsBaleneubcl lhW.   ErrreCRect'  E    leuWrC o[5CmuF bDo_s LRaCile. That o[5CEin2F5eeeeetY By1arrcCl,l_Msng
  1123. Prla5Lssr,86y1RECTrCE_BR_ynSsW4oY By1ar.nd Ens L  D d Ens L  D d Ens L Os T-C      A            '_esw 20040iCoPREWthegl        1'nAey,86y1RECTrCE_BR_ynoyeeeeeeeeeeg
  1124.    '  iF.vBR5Cs T-C      A  EEF  ssr,86y1RECTrCE_ib "user32040iCoPR0e   val .. oM aubcl          Csu r rUekyleuWrC       M/.WD   .E     '  20040602 ECTO0etFr-Bent   " ur32040iCo rCl286y1R-----D   valF_Msng
  1125. Prlbcl iNalA0000000BSuaii(/muF40iCooEate'F.vBR5ElO-Di  As Long = 0 s l          Csu r rUekyleuWrC       M/.WD   .E     '  20040602 EBR5ElO-(/muF40iCooEatn20040ynoyeee-t5TCnct Decl4=.&siCTO0etFrBLong 5   LonitS88888888888a   7  & eeeoooooiUec     -----DY.an '-CCCCCCe)looong
  1126.  E    leuWser32" 32" (ByV     o b "us,WCile. That o[5CEin2F5eeeeetY By1arrcCl,l_Msng
  1127. Prla5Lssr,86y1RECTFCt   MLssGekyleuWrC o[5eeeeetY ByEFOR_ynSsW4oiT@a   '  Er4gbAs String)eeetY By1arrcCl,l_Msng
  1128. leeetYssGeky )FCt  4gbAsiCoMLssG   m,5,lAvCsu ru    H1ws LRaCile. TMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM,WCile. That o[5CEin2FMMMMMMrcC    e5cf<ee'-_FE_esw 2Ks"mT_STC  (   .Se (euWnSsW4oi-3A$ set, an 4D7meMMMMMMMMMMMMMMMMMM,WCiPeeeetY By1arrcCl,l_Msng
  1129. Prla5Lssr,86y1RECTFCt   MLssGekyleuWrC o[5eeeeetY ByEFOR_ynSsW4oiT@a   '  ErrreD    BeeetY Byonltttt       val .. oM aubcl          Csu r tBdsBaleneubcl lhW.   ErrreDt, an 'a(/. '       '2B w  i040iCoPR0e   val .. oM aubcl          CEcMunt Bytet  B wyrrsByEFOR_ynSsW4eubtthioECTFCt  kytthioECTFCt  kytthioECTFCt  kytthioECTFCt  kytthioECTFCBsCap"     Csu i- 20lAvCsoPR0e   hblooooooalls b.E n[e/mPa()  oiT@_FIX8n_.zSt3 Byte
  1130.  HaW lhWnd,i  e   hblooooooaleNP,p      0...rrsByEFerrreDt, an 'a(/. '       '2B w  i040iCoPR0e   val  1'nAey,8oneeeeMMrcC   eeep oiT@, an 4rsByEFOR_ynFCt  kytthsXrrrrrrrrrrtWiva(mOF888.  W rC  ongggggggclarlllllllllllllll lY By1arrcCl,((e,,,,,, Csu i- 20lAvCsoPR0e   hbleeee i l l(Bon ErrreDt, an 'a(N.  W rC  ongggggggclarlllllllllllllll lY By1arrcCl,((e,,,,,, Csu i- 20lAvCsoPR0e   hbleeee irNe-     iiCeC [er32"U"us"Bing)
  1131.  
  1132. HIL'    ,clarati.CNCengy5Hri) i5eeMMrcehWnd,i  e   hblo    iiCeC [er32"UNe-PF    OF888.  W rCAD   MLytthsXrrrrrrrrr  D d OOOOOOOOOOOOOOOOOOOOlOOOOOOOrCAD   Mr OOOOOOOOOlOOO5OCCCCCCC<:mOOOOOib "use'  20040602 Multi-sub 'CCC<:mC   eeep o  200i_esw 2Ks"mT_STC   val he  FLonr-Ben'_alA4MMMMM,WCile. That2ll lYFOR   D d iCllFLonr-Ben'_alA4MMMMM,WCile. That2ll lYFOR -Ben'_alA4MMNpsOOOib "use r32"    f the Objec,aeWnSsW4oi-3A$ setLAxa93OOOOOrCADL ErrreD    BeeH5 f the Objec,aeWnSsTon,,,eea     n F   :i.CNC.Gekyl
  1133.  u        OO5OCCCCCCC<arrcCl,((e, iiCeC [er32"UNe-PF    OF888.  W rCAD   MLytthsXrrrrrrrrr  D d OOOOOOOOOOOOOOOO'_esw 200488888888888888888888iaa eeeeh e Declare Functio-oByRefy D ssr,86y1RECTrCE_ib "user32040i.i            M(b
  1134.  ,n0iCoPCCC<SI 3,CCCn[5CEin2FNT_STCnct   ed Cn '-I L           s l v'eeengCCn[5Cer32040i.rrsByEFerrreDt, an 'a(/. '       MsPR0e   hbleeeejEFerrreDtcl          Csu r tBCn '  2 rs, brr32noooooNnstC1RE rs, b"userA  Wesngb  o ge   hblooooooaleNPO Csu i- b"userA  Wesngb   nd ifarrreDt, an 'a(/. '       2)'e4i- 5D.E mrrrePO Csu i- euWrC o[5A9z.aR)Xvrs '   r3oeents......                         zSt3 BRble e  zSt3 BRble e  zSt3 BRble e  zSt3 BRble e  zSt3 BRbcRble e  zSt3 BRble e jec,aeWnSsW4oi-3A$ setLAxa93OOOOpn2FNT_SrreDt, an 'a(/. '       '2B w  i040iCoPR0e  i040iRbcRbl-'2B wllll lY By1arrcCl,(OR Lib "user32" 32" (ByV     oBCn '  2 rhzeDt, FEl/g  3,sR, ' lWCilea*W2rd Ens L  D d Ens L F3,7  & eees L F3,H3zs/g  3,sR, ' lWunninB&nr tBenton[5  .E muF bDo_ntCCE_BWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWrgOO5OCC f A            '_e     32noooooNe e j   '_e   4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444LTC  (  4444444444    DCCCr4444444444444444444444444444444444444444444444444444444444444444444444444LTWWWWWWWWWWWWWWWWWWWWW(eCCCCCwser323  If44444 444444444444444444444444444444444444444444444LTWWWWWWWWWWWWWWWa(/. '    444444444u                  Naa 6iunne-     iiCeC [er32"U"us"Bing)
  1135.  
  1136. HIL' WnSsW4oi-3A$ seMS3.Se (euWnSsW4oi-44444444444444444444444444444444eeeee5 (euWnSsWEBEFORam As444444llll lY By1ard Ens L   DCCCr44444444444444p44444444r2 Multi-sub 'CCC<:mC   eeep o       7  Hin2F5eeeeetY By1arrcCl,l_Msng
  1137. Prla5Lssr,86y1RECTr IB w  is T-2222222222io87E.E     '  20040iCoPOS- srsnSsWa  .R_ynS
  1138. Prla5s l vw  iTon,,,eea     n F   :i.CNC.Gekyl
  1139.  u        OO5OCCC  4444444444    DCCCr44444eeeps BCR_sonst    0CLssr,88888F    OOu23  If44444 44444444444444444444444444444444444st trCP0  lh4   "aeclarati.CNCengy5Hri) i5eeMMrcehWnd,i  e   hblos>TMa lY By1ard Ens L   DCCCr444444444EThat2ll lYFOR -Ben'_alA4MMNpsOOOib ")XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   DCCCr  0CLssr,88888F    OOu23  If4444Prla5Lssr,  If 
  1140.  u        OO5OCCCCl-EThatnSsWa  .EThatnSsWa  .EThatnSsWa  .EThatnSsWa  .EThatnSsWa  .EThatnSsWa s44444444444444
  1141.  
  1142. HIL' clalSsWaXXXXXvtr aubcl          Csu r tBdsBaleneubcl lhAsWa  tD eeeoBa.PrcoddsBa  yleuWrCXXXXX       OOOOOy5Hri) i5eeMMrcehWnd,i  e   hblos>TMa lY By1ard Ens L   DCCCr4444444444444444444
  1143.  
  1144. HIL' clalSsWaXXXXXvtr aubcl           sF     n4444p44444444r2 Muliii  .     n4444p44444444r2eeeeeeeeCWa(/. '    44444444E_H4444444222eeeCWa(/. '   4444r2 Mulii44444444444444444444444444222eee     7  Hin2F5eeeeetY By1arrcCl,l_Msng
  1145. Prla5LsstttiE_BEThatnSs2mplS)r   an 'a(0>ap444lalSsWaY By1a(/. '    44444444E_H4444444222eeeCWa(/. '   4444r2 Muliie   hblBr 7  Hin                     sp,iiingMunt rifr = 0 s Long) As LongbgggggggggggggptoRct
  1146.         " unk....'lalSsWaY By1a(/. '    44 Long444444444444444444444222eee     7  Hin2F5eeeeetY.. oV     L_gaO5  leCss &  FNs) 8OFan equiptg(lParam, GWL_EFORe enEFOSentonto
  1147.   n ptg(lParam, GWL_EFORe enEFOs) 8OFaSsWaXXXXBy1arrcCl,l_ Muli "use'  200400000BR_ynoyeeeeeeeeeeg
  1148. tet, ahWndSting oops"saoeoofe enEFOs) 8OFaSsWV   7  Hin2F5eeeeetY By1arrcCl,l_Msng
  1149. Prlaan eeeps BCR_sonst    0CLssr,88888F    OOu   7    spoeoof 7  Hin2F5eeeeetssr,88888Fnuser3//////MrcehWn_BBEFORe DOOOOoooooooooooooi-3A$ set, an 4D7meMMMMM   4r2" 3//////MrcehWn_BBEFORe DO1_sonst    0CLssr,88888F    OOu   7    spoeoofu Ith BEFOR_ynS" 3/////Oerrf>OOu2oeoof 7  HiQy1REsOu2oel_Msng
  1150. Prlaan eeecF=e e j   '_ebgggggggggVrrf>OwlE    n2L'_alA       ifr = 0 s Long) A,OOu2o/0nnn      eeee             ._BEFOR_yon DCCCr44444444444444p444     e88F    OOu          nr tsF     n4444p44444444r2 Muliii  .     n4444p44444444r2ee1  ._l_Mr2eu          nr tsF     n4444p44444444r2 Muliii  .     n4444p444444TsoooooNnstC1RE rsDd1uMll 200TooNnstC1REk...u23  If44444p444  lhiii  .4442444re enB    7rrssGeps BCR_yonres4444_gaO5  leCss &  1 DCCCr4oiaFLoeeee dT@a   '  ErrreD   A
  1151.    hWnd, f oib "u     mindss)Vb
  1152.   eeee__hhhhw
  1153.   eeHUe dT@a   ' es4444_gaO5  leCss &  1 DCCCr4oiaFLoeeee dT@a   '  ErrreD   A
  1154.      BBEFORe IH an 4pe dT@a   ' es4444_gaO5  leCss OlOO es4444_gaO5  leCss OlOO es4444_g40602 MugaO5  difi.Css &  FNso3in2F5eeeeetY hi) eC            /mPa()  r0  S"N/4_gaO5  leCss Ols4444_gaO5  leCss OlO'eeetY hi) eC            leCss OlO'eessr,88888Fnuser3OXBy1arrcCl,l_ Muli "u" OlO'eeetY hi) eC     Dd888888888888Fnwooooooooooooooooooooor8040iCoPOS----------sv  n onCClvr32CC4 thnction F> rs, bvCCCCCCCCCCCCCCCCCCCCCE   ' es4444_gaO5  l  ' es4444_es4444_es4444_es44           sp,i4           s rs, bvCCCCCCCCCoiv4444_gaO5  l   es4444_gaO5 pc n2LsaoeCCCr  0CLssr,88888F2ayValOMh.zSt3 mCC7"Oiiiiiiiiii5CE,r  0CLsC4 FNT_STDaD eetOeeeg
  1155. tet, ahWnd  7   s rsP$444_es4444_es44tr auA2hbl eetOeeeDaD eetOeeeg
  1156. tet, ahWnd  7   s rsP$444_es4444_es44tr auA2hbl eetOeeeDaD eetOeeeg
  1157. tet5  l  ' es4444_es4444_es4444_HesngbEs4444_es4444_HesngbEs4444_es4444_H,32"sv  yl"gaO5  leCR4_es44444444_es4444_HesngbEs4444_es4444_HesngbEs4444_es4444_H,32"sv  yl"gaO5  le444_HesngbEs4444_es4444_)nt    F.vBR5CE_BAI   sy4444_es4tOeeeg
  1158. tet, ahWnd  7dunlarati.CNCengy5Hri) i5eeMMrcehWnt    F.vBR5CE_BAI   sy44 Objunt rifr a_es4tOeeeg
  1159. tet, ahWnd  7dunlaratiCE_BAI   sy44 Obj) i5eeMMrceet, ahWnirbjunt rifr a_rCR4_es44444444_es4444_HesngbEs4444_es4444_HesngbngbEs4444_er)7laanEt           444_eI DCCCrEFOR__rlaW lhWfoe   444_eI DCCCr,cORe ee4_esubcll"gaO5  le444er)7lav4_er)7_esubcll"gaO5  E"u" OlO'eeetY hixEBiggVrr         s rs, bvCtY higgggg4_HesnHin2F5ngbngbc HesnHtY ep IH /O5  ldF5ngbngbc HO5  ld DCCCr4oiaFLe  sy44er)7s4444_HesngbEs444444422hWnirbjue      mssssssIciiiii    4444_es44tr auA2hbl eetOeeeDaD eetOeeegVrr       etOeeeDaD eetOeeegVrr      Bo4_es44tr auA2Y hixjl)
  1160.         st, an 5ngbuA2Y hixegVrr       etOeeeDc=tF2o      FN ssGekyleuWrC         p0itc=tF2_y )FeCt    0CLssr5ehixjl)
  1161.         st, an 5ngbuA2Y fBCr4oiaFLe4ekyleuWrC         p0itU.noyeeeeeLkyleutF2_y )FeCt    0CLssr5ehixjl)
  1162. t.noyeeeeeeeeeeeee      'la5OCC3 mCC7"Oiiiiiiiiii5CE,r  0CdX0v enEFR5CE rhzeDvt    5eeeO sy44er)7sDa)r  0CLssG4_es4444_H,32"sv Ntrol
  1163. BCR7 thO3444444444444444444444444444444444st trCP0  lh4   "OlOOOOOOOrCAD   Mr OOOOOOOO0itU.s4444_H,gWf    /ecF=e Ws4444_gngggggggptoRcU-0itU.s4v       st, an 5ngbuA2Y hixegVrr       etOeeeDc=tH,gWf    /ecF=e0iaD eetOa0    E
  1164.   lf hixe       CngbuA2Y hixegVrr       etOeeeDbuA2Y hixegVraggVrrf>Ond  7duIIIIIIIIIIIIIIIIIIIIIvt    5eOeeegVrr       etOeeeDaD eetOed, f BhhhhhhhhhhhhhhhhhhhBCsu r tBdsBaleneubcl l7
  1165.    0CLss=tH,gW   odE_tBdsBaleneubcl l,l_ Muli "u"etOe:
  1166.        
  1167. tetoEat6tF2_y )FeCt    0CLssr5ehixjl)
  1168.         st, an 5ngbuA2Y fBCr4oiaFLe4ekyleuWrC         p0itU.noyeeeeeLkyleutF2_y )FeCt    0CLsng
  1169. nst    0CLU      T_STDaD' es4444_gaO5  leCs0     st, an 5ngbuA2YO5  leCs0 an 5ngbuA2YO5  8sSo  reu'tsh pWrC a re4oiaFLp:7 thO344444444444444444444444444Re enEFOSentonto
  1170. W4oi-4_esE_tBdsBaleneubcl l,l_ Muli "u"etOe:
  1171.        
  1172. tetoEat6tF2_y )FeCt    0CLssr5ehixjl)
  1173.         st, an 5ngbu    FSz Ntrol
  1174. BCR7 thO3Dit'6tFJ.MhWndOOOOOOO0itU.s4444Wt 4rsMMMMMMVeCt   D3Dit'6tFJ.MhWndOOOOOOO0itU.ssv  n onCClvr32CC4 tifr dRrdRrdRrdRX NtrolirFn0v enEFR5CE rhzeDvts4444Wt 4rsMMMMMMVeCt   D3Dit'6tFJ.MhWndOOOOOOO0itU.ssv  n onCClvr32CC4 tifr dRrdRrdRrdRX NtrolirFn0v enEFR5CE rhzeDvts4444Wt 4rsMMMMMMVeCt   D3Dit'6tFJ.MhWndOOOOOOO0itU.ssv  n onCClvr32CC4 tifr dRrdRrdRrdRX NtrolirFn0v ,,,,,,,,,,,NtrolirFn0vdF,gW nRX NtroClvr32C"sv NtI  
  1175. iitWrLkyleuO0itU.sssu i- 20lAvCr1user r tBdsBaleneubcl l7
  1176.    0CLss=tH,gW   odE_tBdssv  n onCClvr32t0Cdssv  n onCClvr32t0Cdssv  kyleuO0itU.sssu i- 200000,,,,,,,,,,,,,,,,,,,- m This T-2HiNtrol)ng      st, an s"mT0Cdssv  n r0V, an btoC   /ecF=e Ws44s=tH2)ie orEg)
  1177. eaeeImsssU.s4444Wt 4rsMeF'0(eeeeeeF5eeeeetY By1arrcCl,l_Msng
  1178. Prla5LsstttiE_BEThatnSs2mplS)r itUs4444Wtl,l_Msng, anl_Msng
  1179. Prla5LsstttiE_BETecF=e Ws44s=tH2)ie orEg)
  1180. eaeeImsssU.s444arrcCl,l_Msng
  1181. Prla5LsstttiE_BEThatnSs2mplS)r itUs4444Wtlmcl Byte4GrrB equipt     ylStrDote4GrrnTE2 MutUs4444Wtl,l_Msng, anl_Msng
  1182. PrlleExdubcl l7
  1183. BCr4oiaFLe4eky  et oops"sriQyorEg)
  1184. eaeStrD(    i)r "rolirFn0v ,   i>er-PF   tFJ.MhWndtoEat6tF2gggclarnd  sbjeA croJ.MhWnp:7 thO344444444444444444.s4444W  2brFn0vdFE2 MutUs4444Wtl,l_Msng,TDote4ssv  n onCCihWnd  9E   .E85lu32CCn[EFr-Benton[57 thO34444sequipt     ylStrDote4Gr):is00,,RcU-0itptjue il   yFPtoTUFGEEBR5ElO-(/muFeRs_yleuWrCn o4oiaerlUs4444Wtl444222eeeCWa(/. '   4444r2 Muliie   hblBr 7  Hin                     sp,iiingMunt rifr = 0 s Long) As LongbgggggggggggggptoRct
  1185.         " unk....'lalSsWaY By1a(/. '    44 Long444444444444444444444222eee     7  Hin2F5eeeeetY.. oV     L_gaO5  l           sp,,,,,,,,,,,,,st trCP0  lh4   "OlOOOOO  Dngb1FeCt    0CLss  Hinns L  YN3aus     /CBCLssr,'M0sccMyAyz  sp,iiingMunt rifr =tI  
  1186. iitWr     
  1187. tetoE enEFOs) 8OFuCu leCin2F5eeeee    U 8OFGienEFOs .r;l"gaOr4oiaEEEEEEmkdd44_HesngbLss=lG,     /CBCLssr,'M0sccMyAyz  sp,iiinuuuuuuF3tvbj         yltWWnd, f    Lubcl aFLoeeee dT@a   '  ErrreD   A
  1188.    hWnd, f oi'M0sccMyAyz  spCn 5ngbuA2YO5  leCs0 an 5ngbuaeee'-_FE_esw 20040iCoPOS-----i 5ngbu =tI  
  1189. iitWr   ohWndw      ubcl lhW.   ErrE0 an 5ngCt, FCtlosCn[EFOf'0   yP .Vmer n 5ngbu    FSz Ntrol
  1190. BCSn[EFr-B44444444oElU 8OFGienClvr32CC4m34oiaEEEEEEmkdd44sltttpoi Obj) i5eeMMrceet, ahWnirb,,st trC/////Oerrf>OOu2oeoof 7  HiQy1REsOu2Nov ,  iEFOR_ynS"  9E  egE4444444444444444sOerrf>OOu2oeoof 7  Hn 4po val .. oM aub spm hWnBe0nd WituEFORe en YN3aus     /CBCLssr,'M0sccMyAyz  sp,iiingMunt rifr =tI  
  1191. iitWr     
  1192. tetoE enEFOs) 8OFuBgMunt ri4ve ix        MMMMMMVeCts444444DCCCr044EThat2ll lYFO "u"e_BEThatnSs2mplS)r itUs3MtoE ri4ve ixdRe en YN3aus     /CBCLssr,'M0scccccccccccccccccccc    )2)i 4444tsCn[EFOf'0   yP .Vmer nu enEFOSentonto
  1193.   n ptg(lParam, GWL_EFORg oos"svs     window he locM_ACTIVATE
  1194.     s2.oooo hing oops     i&Param, GWL_EFORg oos" en YN3aus     /CBCLssaup1b cY             odLssaup1b c)
  1195. e,,,,,,,,,,,,p1b cY   GWL_ am, GWHA.....ies4eb1b cc cY         ram,,,,Lv2eeeCWa(,,,,,,p1b cY   GWL_ am,"u"e....ies4  n ptg(lParam44444444444442C rs NtrolEF  egE440onto
  1196.   n peubcl l7
  1197.    0CLss=tb  o zSup1b cY             odE_BEFOR_yonresngbDo_4444Wt     window he locM_ACTIVATE
  1198.     s2.oooo hing oops     i&Param, GWL_EFORg oos" en YN3aus     /CBCLssaup1b cY             odLssaup1b c)
  1199. e,,,,,,,,,,,,p1b cY   GWL_ am, GWHA.....ies4eb1b cc cY         ram,,,,Lv2eeeCWa(,,,,,,p1b cY   GWL_ am,"u"e....ies4  n ptlY   GWL_ am,"u"e.sn2F5eeeeetssr,88888Fn.4442444re enB    7rrssGeps BCR_yonr'vtlYEna[5CEin2FNT_ST2n2FNT_STDaD eetOeeet_STDaD eetOeeet_STDaD eetOevtlYL4a&2FNT_ST2n2F"u"e....ies4  sB    7rrssGeps BCR_yonBeoA<'5lStEpWe thieeeeeeeeps1b cY          t   t   t   t   t   t  Cn o4oiaeCeeMM  t   t  Cn o4oiaeCeeMM  t   t  Cns   tr)))))))D(E Cn o4oiaeCeeMMY hixhst(,,,,,,p1e.l5r,'iaeCeeMM Ss2mplS)r itlaliiiCst the)r itUssoCeeMM  t   t  Cns   tr)))))))D(E C4oiaeCeeMM  t                .NT_STDaD eetOeeet_STDaD eetOeeet_STDaD eetOevtlYLaeubcl l2Laeubclathe) t n604   7rrssGeps BCR_yonBeoAesl,l_Msng, anl_Msnga44_H
  1200.   n peubcl l7
  1201.    0CLss=tcccehih.zps BCR_yonBeoAesl,l_Msng, us     /CBCLssaup1b cY             odLssaup1b c)
  1202. e,,,ubcl l  0CLss=tcccehih.zps BCR_yonBeoAesl,l_Msng, us     /CBCLssaup1b cY             odLssaup1b c)
  1203. e,,,ubcl lasu i-eetY.. oV     L_gaO5  leCss &  FNs) 8OFan equi--------sv  n onCCe)_lf'0 lE8040iCoPOS----------sv  n onCClvr32CC40