home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Final_2_4_204076132007.psc / cHeaderControl.cls < prev   
Text File  |  2006-09-21  |  139KB  |  3,087 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "cHeaderControl"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = False
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = False
  14. Option Explicit
  15.  
  16. Implements GXISubclass
  17.  
  18.  
  19. Private Const GMEM_FIXED                                As Long = &H0
  20. Private Const GMEM_ZEROINIT                             As Long = &H40
  21. Private Const GWL_STYLE                                 As Long = (-16)
  22. Private Const WS_BORDER                                 As Long = &H800000
  23. Private Const WS_CAPTION                                As Long = &HC00000
  24. Private Const WS_CHILD                                  As Long = &H40000000
  25. Private Const WS_MAXIMIZEBOX                            As Long = &H10000
  26. Private Const WS_MINIMIZE                               As Long = &H20000000
  27. Private Const WS_MINIMIZEBOX                            As Long = &H20000
  28. Private Const WS_OVERLAPPED                             As Long = &H0&
  29. Private Const WS_POPUP                                  As Long = &H80000000
  30. Private Const WS_SYSMENU                                As Long = &H80000
  31. Private Const WS_THICKFRAME                             As Long = &H40000
  32. Private Const WS_VISIBLE                                As Long = &H10000000
  33. Private Const WS_OVERLAPPEDWINDOW                       As Double = _
  34.     (WS_OVERLAPPED Or WS_CAPTION Or WS_SYSMENU Or WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX)
  35. Private Const SW_HIDE                                   As Long = 0
  36. Private Const SW_SHOW                                   As Long = 5
  37. Private Const FW_NORMAL                                 As Long = 400
  38. Private Const FW_BOLD                                   As Long = 700
  39. Private Const LOGPIXELSY                                As Long = 90
  40. Private Const DT_LEFT                                   As Long = &H0
  41. Private Const DT_CENTER                                 As Long = &H1
  42. Private Const DT_RIGHT                                  As Long = &H2
  43. Private Const DT_VCENTER                                As Long = &H4
  44. Private Const DT_SINGLELINE                             As Long = &H20
  45. Private Const DT_CALCRECT                               As Long = &H400
  46. Private Const DT_END_ELLIPSIS                           As Long = &H8000&
  47. Private Const DT_RTLREADING                             As Long = &H20000
  48. Private Const PS_SOLID                                  As Long = 0
  49. Private Const Transparent                               As Long = 1
  50. Private Const OPAQUE                                    As Long = 2
  51. Private Const ILC_MASK                                  As Long = &H1
  52. Private Const ILC_COLOR32                               As Long = &H20
  53. Private Const ILD_TRANSPARENT                           As Long = &H1
  54. Private Const CCM_FIRST                                 As Long = &H2000
  55. Private Const CCM_SETUNICODEFORMAT                      As Double = (CCM_FIRST + 5)
  56. Private Const CCM_GETUNICODEFORMAT                      As Double = (CCM_FIRST + 6)
  57. Private Const WC_HEADERA                                As String = "SysHeader32"
  58. Private Const WC_HEADER                                 As String = WC_HEADERA
  59. Private Const HDS_HORZ                                  As Long = &H0
  60. Private Const HDS_BUTTONS                               As Long = &H2
  61. Private Const HDS_HOTTRACK                              As Long = &H4
  62. Private Const HDS_DRAGDROP                              As Long = &H40
  63. Private Const HDS_FULLDRAG                              As Long = &H80
  64. Private Const HDS_FILTERBAR                             As Long = &H100
  65. Private Const HDI_WIDTH                                 As Long = &H1
  66. Private Const HDI_TEXT                                  As Long = &H2
  67. Private Const HDI_FORMAT                                As Long = &H4
  68. Private Const HDI_LPARAM                                As Long = &H8
  69. Private Const HDI_IMAGE                                 As Long = &H20
  70. Private Const HDI_ORDER                                 As Long = &H80
  71. Private Const HDI_FILTER                                As Long = &H100
  72. Private Const HDF_LEFT                                  As Long = 0
  73. Private Const HDF_RIGHT                                 As Long = 1
  74. Private Const HDF_CENTER                                As Long = 2
  75. Private Const HDF_RTLREADING                            As Long = 4
  76. Private Const HDF_SORTUP                                As Long = &H400
  77. Private Const HDF_SORTDOWN                              As Long = &H200
  78. Private Const HDF_BITMAP_ON_RIGHT                       As Long = &H1000
  79. Private Const HDF_IMAGE                                 As Long = &H800
  80. Private Const HDF_OWNERDRAW                             As Long = &H8000
  81. Private Const HDF_STRING                                As Long = &H4000
  82. Private Const HDFT_ISSTRING                             As Long = &H0
  83. Private Const HDM_FIRST                                 As Long = &H1200
  84. Private Const HDM_GETITEMCOUNT                          As Double = (HDM_FIRST + 0)
  85. Private Const HDM_INSERTITEMA                           As Double = (HDM_FIRST + 1)
  86. Private Const HDM_INSERTITEMW                           As Double = (HDM_FIRST + 10)
  87. Private Const HDM_INSERTITEM                            As Long = HDM_INSERTITEMA
  88. Private Const HDM_DELETEITEM                            As Double = (HDM_FIRST + 2)
  89. Private Const HDM_GETITEMA                              As Double = (HDM_FIRST + 3)
  90. Private Const HDM_GETITEMW                              As Double = (HDM_FIRST + 11)
  91. Private Const HDM_GETITEM                               As Long = HDM_GETITEMA
  92. Private Const HDM_SETITEMA                              As Double = (HDM_FIRST + 4)
  93. Private Const HDM_SETITEMW                              As Double = (HDM_FIRST + 12)
  94. Private Const HDM_SETITEM                               As Long = HDM_SETITEMA
  95. Private Const HDM_LAYOUT                                As Double = (HDM_FIRST + 5)
  96. Private Const HDM_HITTEST                               As Double = (HDM_FIRST + 6)
  97. Private Const HDM_GETITEMRECT                           As Double = (HDM_FIRST + 7)
  98. Private Const HDM_SETIMAGELIST                          As Double = (HDM_FIRST + 8)
  99. Private Const HDM_GETIMAGELIST                          As Double = (HDM_FIRST + 9)
  100. Private Const HDM_CREATEDRAGIMAGE                       As Double = (HDM_FIRST + 16)
  101. Private Const HDM_SETHOTDIVIDER                         As Double = (HDM_FIRST + 19)
  102. Private Const HDM_SETFILTERCHANGETIMEOUT                As Double = (HDM_FIRST + 22)
  103. Private Const HDM_EDITFILTER                            As Double = (HDM_FIRST + 23)
  104. Private Const HDM_CLEARFILTER                           As Double = (HDM_FIRST + 24)
  105. Private Const H_MAX                                     As Long = &HFFFF + 1
  106. Private Const HDN_FIRST                                 As Long = H_MAX - 300
  107. Private Const HDN_ITEMCLICKA                            As Double = (HDN_FIRST - 2)
  108. Private Const HDN_ITEMCLICKW                            As Double = (HDN_FIRST - 22)
  109. Private Const HDN_ITEMDBLCLICKA                         As Double = (HDN_FIRST - 3)
  110. Private Const HDN_ITEMDBLCLICKW                         As Double = (HDN_FIRST - 23)
  111. Private Const HDN_DIVIDERDBLCLICKA                      As Double = (HDN_FIRST - 5)
  112. Private Const HDN_DIVIDERDBLCLICKW                      As Double = (HDN_FIRST - 25)
  113. Private Const HDN_BEGINTRACKA                           As Double = (HDN_FIRST - 6)
  114. Private Const HDN_BEGINTRACKW                           As Double = (HDN_FIRST - 26)
  115. Private Const HDN_ENDTRACKA                             As Double = (HDN_FIRST - 7)
  116. Private Const HDN_ENDTRACKW                             As Double = (HDN_FIRST - 27)
  117. Private Const HDN_TRACKA                                As Double = (HDN_FIRST - 8)
  118. Private Const HDN_TRACKW                                As Double = (HDN_FIRST - 28)
  119. Private Const HDN_BEGINDRAG                             As Double = (HDN_FIRST - 10)
  120. Private Const HDN_ENDDRAG                               As Double = (HDN_FIRST - 11)
  121. Private Const HDN_FILTERCHANGE                          As Double = (HDN_FIRST - 12)
  122. Private Const HDN_FILTERBTNCLICK                        As Double = (HDN_FIRST - 13)
  123. Private Const NM_FIRST                                  As Long = H_MAX
  124. Private Const NM_RCLICK                                 As Double = (NM_FIRST - 5)
  125. Private Const NM_RELEASEDCAPTURE                        As Double = (NM_FIRST - 16)
  126. Private Const WM_USER                                   As Long = &H400
  127. Private Const UM_STARTDRAG                              As Long = WM_USER + &H113
  128. Private Const UM_ENDDRAG                                As Long = WM_USER + &H114
  129. Private Const LVCF_TEXT                                 As Long = &H4
  130. Private Const LVM_FIRST                                 As Long = &H1000
  131. Private Const LVM_GETCOLUMN                             As Long = (LVM_FIRST + 25)
  132. Private Const LVM_GETHEADER                             As Long = (LVM_FIRST + 31)
  133. Private Const LVCF_IMAGE                                As Long = &H10
  134.  
  135.  
  136. Public Enum EHdrTextAlign
  137.     HdrTextALignLeft = HDF_LEFT
  138.     HdrTextALignCentre = HDF_CENTER
  139.     HdrTextALignRight = HDF_RIGHT
  140.     HdrTextAlignRTLReading = HDF_RTLREADING
  141. End Enum
  142.  
  143. Public Enum EHdrSortBitmapTypes
  144.     HdrSortBitmapNone = 0
  145.     HdrSortBitmapUp = HDF_SORTUP
  146.     HdrSortBitmapDown = HDF_SORTDOWN
  147. End Enum
  148.  
  149. Private Enum TRACKMOUSEEVENT_FLAGS
  150.     TME_HOVER = &H1&
  151.     TME_LEAVE = &H2&
  152.     TME_QUERY = &H40000000
  153.     TME_CANCEL = &H80000000
  154. End Enum
  155.  
  156.  
  157. Private Type RECT
  158.     left                                                    As Long
  159.     top                                                     As Long
  160.     right                                                   As Long
  161.     bottom                                                  As Long
  162. End Type
  163.  
  164. Private Type POINTAPI
  165.     x                                                       As Long
  166.     y                                                       As Long
  167. End Type
  168.  
  169. Private Type LOGFONT
  170.     lfHeight                                        As Long
  171.     lfWidth                                         As Long
  172.     lfEscapement                                    As Long
  173.     lfOrientation                                   As Long
  174.     lfWeight                                        As Long
  175.     lfItalic                                        As Byte
  176.     lfUnderline                                     As Byte
  177.     lfStrikeOut                                     As Byte
  178.     lfCharSet                                       As Byte
  179.     lfOutPrecision                                  As Byte
  180.     lfClipPrecision                                 As Byte
  181.     lfQuality                                       As Byte
  182.     lfPitchAndFamily                                As Byte
  183.     lfFaceName(32)                                  As Byte
  184. End Type
  185.  
  186. Private Type tGroupCol
  187.     lColumn                                                 As Long
  188.     lOrigColSize                                            As Long
  189.     lOrigColOrder                                           As Long
  190.     tR                                                      As RECT
  191.     bMouseOver                                              As Boolean
  192.     bPressed                                                As Boolean
  193.     sXMouseDown                                             As Single
  194.     sYMouseDown                                             As Single
  195. End Type
  196.  
  197. Private Type HD_HITTESTINFO
  198.     pt                                                      As POINTAPI
  199.     flags                                                   As Long
  200.     iItem                                                   As Long
  201. End Type
  202.  
  203. Private Type HDITEMA
  204.     Mask                                                    As Long
  205.     cxy                                                     As Long
  206.     pszText                                                 As String
  207.     hbm                                                     As Long
  208.     cchTextMax                                              As Long
  209.     fmt                                                     As Long
  210.     lParam                                                  As Long
  211.     iImage                                                  As Long
  212.     iOrder                                                  As Long
  213.     type                                                    As Long
  214.     pvFilter                                                As Long
  215. End Type
  216.  
  217. Private Type HDITEMW
  218.     Mask                                                    As Long
  219.     cxy                                                     As Long
  220.     pszText                                                 As Long
  221.     hbm                                                     As Long
  222.     cchTextMax                                              As Long
  223.     fmt                                                     As Long
  224.     lParam                                                  As Long
  225.     iImage                                                  As Long
  226.     iOrder                                                  As Long
  227. type                                                    As Long
  228.     pvFilter                                                As Long
  229. End Type
  230.  
  231. Private Type NMHDR
  232.     hwndFrom                                                As Long
  233.     idfrom                                                  As Long
  234.     code                                                    As Long
  235. End Type
  236.  
  237. Private Type HDNOITFYA
  238.     hdr                                                     As NMHDR
  239.     iItem                                                   As Long
  240.     iButton                                                 As Long
  241.     pitem                                                   As HDITEMA
  242. End Type
  243.  
  244. Private Type HDNOITFYW
  245.     hdr                                                     As NMHDR
  246.     iItem                                                   As Long
  247.     iButton                                                 As Long
  248.     pitem                                                   As HDITEMW
  249. End Type
  250.  
  251. Private Type NMHEADER
  252.     hdr                                                     As NMHDR
  253.     iItem                                                   As Long
  254.     iButton                                                 As Long
  255.     lPtrHDItem                                              As Long
  256. End Type
  257.  
  258. Private Type HDTEXTFILTER
  259.     pszText                                                 As Long
  260.     cchTextMax                                              As Long
  261. End Type
  262.  
  263. Private Type WINDOWPOS
  264.     hwnd                                                    As Long
  265.     hWndInsertAfter                                         As Long
  266.     x                                                       As Long
  267.     y                                                       As Long
  268.     cx                                                      As Long
  269.     cy                                                      As Long
  270.     flags                                                   As Long
  271. End Type
  272.  
  273. Private Type HDLAYOUT
  274.     lprc                                                    As Long
  275.     lpwpos                                                  As Long
  276. End Type
  277.  
  278. Private Type PAINTSTRUCT
  279.     hdc                                                     As Long
  280.     fErase                                                  As Boolean
  281.     rcPaint                                                 As RECT
  282.     fRestore                                                As Boolean
  283.     fIncUpdate                                              As Boolean
  284.     rgbReserved(32)                                         As Byte
  285. End Type
  286.  
  287. Private Type LVCOLUMN
  288.     Mask                                                    As Long
  289.     fmt                                                     As Long
  290.     cx                                                      As Long
  291.     pszText                                                 As Long
  292.     cchTextMax                                              As Long
  293.     iSubItem                                                As Long
  294.     iImage                                                  As Long
  295.     iOrder                                                  As Long
  296. End Type
  297.  
  298. Private Type BITMAP
  299.     bmType                                                  As Long
  300.     bmWidth                                                 As Long
  301.     bmHeight                                                As Long
  302.     bmWidthBytes                                            As Long
  303.     bmPlanes                                                As Integer
  304.     bmBitsPixel                                             As Integer
  305.     bmBits                                                  As Long
  306. End Type
  307.  
  308. Private Type HDHITTESTINFO
  309.     pt                                                      As POINTAPI
  310.     flags                                                   As Long
  311.     iItem                                                   As Long
  312. End Type
  313.  
  314.  
  315. Private Type TCRD
  316.     lO                                                      As Integer
  317.     Hi                                                      As Integer
  318. End Type
  319.  
  320. Private Type TCLC
  321.     lBase                                                   As Long
  322. End Type
  323.  
  324. Private Type TRACKMOUSEEVENT_STRUCT
  325.     cbSize                                                  As Long
  326.     dwFlags                                                 As TRACKMOUSEEVENT_FLAGS
  327.     hwndTrack                                               As Long
  328.     dwHoverTime                                             As Long
  329. End Type
  330.  
  331.  
  332.  
  333. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpvDest As Any, _
  334.                                                                      lpvSource As Any, _
  335.                                                                      ByVal cbCopy As Long)
  336.  
  337. Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, _
  338.                                                                             ByVal nIndex As Long, _
  339.                                                                             ByVal dwNewLong As Long) As Long
  340.  
  341. Private Declare Function SetWindowLongW Lib "user32" (ByVal hwnd As Long, _
  342.                                                       ByVal nIndex As Long, _
  343.                                                       ByVal dwNewLong As Long) As Long
  344.  
  345. Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, _
  346.                                                                             ByVal nIndex As Long) As Long
  347.  
  348. Private Declare Function GetWindowLongW Lib "user32" (ByVal hwnd As Long, _
  349.                                                       ByVal nIndex As Long) As Long
  350.  
  351. Private Declare Function CreateWindowEx Lib "user32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, _
  352.                                                                               ByVal lpClassName As String, _
  353.                                                                               ByVal lpWindowName As String, _
  354.                                                                               ByVal dwStyle As Long, _
  355.                                                                               ByVal x As Long, _
  356.                                                                               ByVal y As Long, _
  357.                                                                               ByVal nWidth As Long, _
  358.                                                                               ByVal nHeight As Long, _
  359.                                                                               ByVal hWndParent As Long, _
  360.                                                                               ByVal hMenu As Long, _
  361.                                                                               ByVal hInstance As Long, _
  362.                                                                               lpParam As Any) As Long
  363.  
  364. Private Declare Function CreateWindowExW Lib "user32" (ByVal dwExStyle As Long, _
  365.                                                        ByVal lpClassName As Long, _
  366.                                                        ByVal lpWindowName As Long, _
  367.                                                        ByVal dwStyle As Long, _
  368.                                                        ByVal x As Long, _
  369.                                                        ByVal y As Long, _
  370.                                                        ByVal nWidth As Long, _
  371.                                                        ByVal nHeight As Long, _
  372.                                                        ByVal hWndParent As Long, _
  373.                                                        ByVal hMenu As Long, _
  374.                                                        ByVal hInstance As Long, _
  375.                                                        lpParam As Any) As Long
  376.  
  377. Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _
  378.                                                   ByVal nCmdShow As Long) As Long
  379.  
  380. Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
  381.  
  382. Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, _
  383.                                                     ByVal fEnable As Long) As Long
  384.  
  385. Private Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, _
  386.                                                   ByVal x As Long, _
  387.                                                   ByVal y As Long, _
  388.                                                   ByVal nWidth As Long, _
  389.                                                   ByVal nHeight As Long, _
  390.                                                   ByVal bRepaint As Long) As Long
  391.  
  392. Private Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, _
  393.                                                      lpRect As RECT) As Long
  394.  
  395. Private Declare Function InflateRect Lib "user32" (lpRect As RECT, _
  396.                                                    ByVal x As Long, _
  397.                                                    ByVal y As Long) As Long
  398.  
  399. Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As Long, _
  400.                                                       lpRect As RECT, _
  401.                                                       ByVal bErase As Long) As Long
  402.  
  403. Private Declare Function PtInRect Lib "user32" (lpRect As RECT, _
  404.                                                 ByVal ptX As Long, _
  405.                                                 ByVal ptY As Long) As Long
  406.  
  407. Private Declare Function UpdateWindow Lib "user32" (ByVal hwnd As Long) As Long
  408.  
  409. Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, _
  410.                                                  ByVal hWndNewParent As Long) As Long
  411.  
  412. Private Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, _
  413.                                                       lpPoint As POINTAPI) As Long
  414.  
  415. Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, _
  416.                                                      lpRect As RECT) As Long
  417.  
  418. Private Declare Function SendMessageLongA Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _
  419.                                                                              ByVal wMsg As Long, _
  420.                                                                              ByVal wParam As Long, _
  421.                                                                              ByVal lParam As Long) As Long
  422.  
  423. Private Declare Function SendMessageLongW Lib "user32" Alias "SendMessageW" (ByVal hwnd As Long, _
  424.                                                                              ByVal wMsg As Long, _
  425.                                                                              ByVal wParam As Long, _
  426.                                                                              ByVal lParam As Long) As Long
  427.  
  428. Private Declare Function SendMessageA Lib "user32" (ByVal hwnd As Long, _
  429.                                                     ByVal wMsg As Long, _
  430.                                                     ByVal wParam As Long, _
  431.                                                     lParam As Any) As Long
  432.  
  433. Private Declare Function SendMessageW Lib "user32" (ByVal hwnd As Long, _
  434.                                                     ByVal wMsg As Long, _
  435.                                                     ByVal wParam As Long, _
  436.                                                     lParam As Any) As Long
  437.  
  438. Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, _
  439.                                                                         ByVal wMsg As Long, _
  440.                                                                         ByVal wParam As Long, _
  441.                                                                         ByVal lParam As Long) As Long
  442.  
  443. Private Declare Function CreateDc Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, _
  444.                                                                  lpDeviceName As Any, _
  445.                                                                  lpOutput As Any, _
  446.                                                                  lpInitData As Any) As Long
  447.  
  448. Private Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
  449.  
  450. Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
  451.  
  452. Private Declare Function GetVersion Lib "kernel32" () As Long
  453.  
  454. Private Declare Function lstrlenA Lib "kernel32" (ByVal lpString As Long) As Long
  455.  
  456. Private Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Long) As Long
  457.  
  458. Private Declare Function CreateFontIndirect Lib "gdi32" Alias "CreateFontIndirectA" (lpLogFont As LOGFONT) As Long
  459.  
  460. Private Declare Function MulDiv Lib "kernel32" (ByVal nNumber As Long, _
  461.                                                 ByVal nNumerator As Long, _
  462.                                                 ByVal nDenominator As Long) As Long
  463.  
  464. Private Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, _
  465.                                                    ByVal hObject As Long) As Long
  466.  
  467. Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
  468.  
  469. Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, _
  470.                                                     ByVal nIndex As Long) As Long
  471.  
  472. Private Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, _
  473.                                                              ByVal nWidth As Long, _
  474.                                                              ByVal nHeight As Long) As Long
  475.  
  476. Private Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
  477.  
  478. Private Declare Function DrawTextA Lib "user32" (ByVal hdc As Long, _
  479.                                                  ByVal lpStr As String, _
  480.                                                  ByVal nCount As Long, _
  481.                                                  lpRect As RECT, _
  482.                                                  ByVal wFormat As Long) As Long
  483.  
  484. Private Declare Function DrawTextW Lib "user32" (ByVal hdc As Long, _
  485.                                                  ByVal lpStr As Long, _
  486.                                                  ByVal nCount As Long, _
  487.                                                  lpRect As RECT, _
  488.                                                  ByVal wFormat As Long) As Long
  489.  
  490. Private Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, _
  491.                                                 ByVal nWidth As Long, _
  492.                                                 ByVal crColor As Long) As Long
  493.  
  494. Private Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
  495.  
  496. Private Declare Function GetSysColorBrush Lib "user32" (ByVal nIndex As Long) As Long
  497.  
  498. Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
  499.  
  500. Private Declare Function FillRect Lib "user32" (ByVal hdc As Long, _
  501.                                                 lpRect As RECT, _
  502.                                                 ByVal hBrush As Long) As Long
  503.  
  504. Private Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, _
  505.                                                  ByVal crColor As Long) As Long
  506.  
  507. Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, _
  508.                                                 ByVal nBkMode As Long) As Long
  509.  
  510. Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, _
  511.                                                    ByVal crColor As Long) As Long
  512.  
  513. Private Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, _
  514.                                                ByVal x As Long, _
  515.                                                ByVal y As Long, _
  516.                                                lpPoint As POINTAPI) As Long
  517.  
  518. Private Declare Function LineTo Lib "gdi32" (ByVal hdc As Long, _
  519.                                              ByVal x As Long, _
  520.                                              ByVal y As Long) As Long
  521.  
  522. Private Declare Sub InitCommonControls Lib "comctl32.dll" ()
  523.  
  524. Private Declare Function ImageList_Create Lib "Comctl32" (ByVal cx As Long, _
  525.                                                           ByVal cy As Long, _
  526.                                                           ByVal flags As Long, _
  527.                                                           ByVal cInitial As Long, _
  528.                                                           ByVal cGrow As Long) As Long
  529.  
  530. Private Declare Function ImageList_AddMasked Lib "Comctl32" (ByVal hIml As Long, _
  531.                                                              ByVal hbmImage As Long, _
  532.                                                              ByVal crMask As Long) As Long
  533.  
  534. Private Declare Function ImageList_GetImageCount Lib "Comctl32" (ByVal hImagelist As Long) As Long
  535.  
  536. Private Declare Function ImageList_Destroy Lib "Comctl32" (ByVal hImagelist As Long) As Long
  537.  
  538. Private Declare Function ImageList_Draw Lib "Comctl32" (ByVal hIml As Long, _
  539.                                                         ByVal i As Long, _
  540.                                                         ByVal hdcDst As Long, _
  541.                                                         ByVal x As Long, _
  542.                                                         ByVal y As Long, _
  543.                                                         ByVal fStyle As Long) As Long
  544.  
  545. Private Declare Function ImageList_GetIconSize Lib "Comctl32" (ByVal hIml As Long, _
  546.                                                                cx As Long, _
  547.                                                                cy As Long) As Long
  548.  
  549. Private Declare Function BeginPaint Lib "user32" (ByVal hwnd As Long, _
  550.                                                   lpPaint As PAINTSTRUCT) As Long
  551.  
  552. Private Declare Function EndPaint Lib "user32" (ByVal hwnd As Long, _
  553.                                                 lpPaint As PAINTSTRUCT) As Long
  554.  
  555. Private Declare Function GetDesktopWindow Lib "user32" () As Long
  556.  
  557. Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
  558.  
  559. Private Declare Function GetDC Lib "user32.dll" (ByVal hwnd As Long) As Long
  560.  
  561. Private Declare Function OffsetRect Lib "user32" (lpRect As RECT, _
  562.                                                   ByVal x As Long, _
  563.                                                   ByVal y As Long) As Long
  564.  
  565. Private Declare Function GetObject Lib "gdi32" Alias "GetObjectA" (ByVal hObject As Long, _
  566.                                                                    ByVal nCount As Long, _
  567.                                                                    lpObject As Any) As Long
  568.  
  569. Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, _
  570.                                                  ByVal hdc As Long) As Long
  571.  
  572. Private Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (ByVal hdc As Long, _
  573.                                                                                          ByVal lpsz As String, _
  574.                                                                                          ByVal cbString As Long, _
  575.                                                                                          lpSize As POINTAPI) As Long
  576.  
  577. Private Declare Function PathCompactPath Lib "shlwapi.dll" Alias "PathCompactPathA" (ByVal hdc As Long, _
  578.                                                                                      ByVal pszPath As String, _
  579.                                                                                      ByVal dX As Long) As Long
  580.  
  581. Private Declare Function CopyRect Lib "user32" (lpDestRect As RECT, _
  582.                                                 lpSourceRect As RECT) As Long
  583.  
  584. Private Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
  585.  
  586. Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
  587.  
  588.  
  589. Private Declare Function TrackMouseEvent Lib "user32" (lpEventTrack As TRACKMOUSEEVENT_STRUCT) As Long
  590.  
  591. Private Declare Function TrackMouseEventComCtl Lib "Comctl32" Alias "_TrackMouseEvent" (lpEventTrack As TRACKMOUSEEVENT_STRUCT) As Long
  592.  
  593. Private Declare Function GetModuleHandleA Lib "kernel32" (ByVal lpModuleName As String) As Long
  594.  
  595. Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, _
  596.                                                         ByVal lpProcName As String) As Long
  597.  
  598. Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
  599.  
  600. Private Declare Function LoadLibraryA Lib "kernel32" (ByVal lpLibFileName As String) As Long
  601.  
  602.  
  603. Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, _
  604.                                                ByVal x As Long, _
  605.                                                ByVal y As Long) As Long
  606.  
  607. Public Event ColumnWidthChanged(ByVal lColumn As Long, lWidth As Long)
  608. Public Event ColumnWidthChanging(ByVal lColumn As Long, lWidth As Long, bCancel As Boolean)
  609. Public Event StartColumnWidthChange(ByVal lColumn As Long, lWidth As Long, bCancel As Boolean)
  610. Public Event DividerDblClick(ByVal lColumn As Long)
  611. Public Event ColumnClick(ByVal lColumn As Long)
  612. Public Event ColumnDblClick(ByVal lColumn As Long)
  613. Public Event ColumnBeginDrag(ByVal lColumn As Long)
  614. Public Event ColumnManualDragRequest(ByVal lColumn As Long, ByRef bForceManualDragDrop As Boolean)
  615. Public Event ColumnEndDrag(ByVal lColumn As Long, ByVal lOrder As Long)
  616. Public Event ColumnFilterClick(ByVal lColumn As Long)
  617. Public Event ColumnFilterChange(ByVal lColumn As Long, ByVal sFilter As String)
  618. Public Event RightClick(ByVal x As Single, ByVal y As Single)
  619. Public Event Resize()
  620. Public Event RePaint()
  621. Public Event OleDrag()
  622. Public Event ColumnGroupChange(lColumn As Long)
  623. Public Event ColumnUnGroup(lColumn As Long)
  624.  
  625. Private m_bInitSize                                     As Boolean
  626. Private m_bVisible                                      As Boolean
  627. Private m_bUserMode                                     As Boolean
  628. Private m_bIsNt                                         As Boolean
  629. Private m_bAllowGrouping                                As Boolean
  630. Private m_bHideGroupingBox                              As Boolean
  631. Private m_bSubClass                                     As Boolean
  632. Private m_bHotTrack                                     As Boolean
  633. Private m_bDragReorderColumns                           As Boolean
  634. Private m_bButtons                                      As Boolean
  635. Private m_bFullDrag                                     As Boolean
  636. Private m_bFilterBar                                    As Boolean
  637. Private m_bEnabled                                      As Boolean
  638. Private m_bPreventDrag                                  As Boolean
  639. Private m_bHidingDragImage                              As Boolean
  640. Private m_bCustomHeader                                 As Boolean
  641. Private m_bPainting                                     As Boolean
  642. Private m_bTrackUser32                                  As Boolean
  643. Private m_bSkinLoaded                                   As Boolean
  644. Private m_bHeaderClrAuto                                As Boolean
  645. Private m_bGutterButtonSkinned                          As Boolean
  646. Private m_bUseHeaderTheme                               As Boolean
  647. Private m_lHeaderLuminence                              As Long
  648. Private m_lThemeColor                                   As Long
  649. Private m_lHeaderSkinStyle                              As Long
  650. Private m_lGutterButtonColor                            As Long
  651. Private m_lHeaderBgColor                                As Long
  652. Private m_lTextForeColor                                As Long
  653. Private m_lTextHighLite                                 As Long
  654. Private m_lParentHwnd                                   As Long
  655. Private m_lHdrHandle                                    As Long
  656. Private m_lHeaderWidth                                  As Long
  657. Private m_lHeaderHeight                                 As Long
  658. Private m_lImlHandle                                    As Long
  659. Private m_lHdc()                                        As Long
  660. Private m_lBmp()                                        As Long
  661. Private m_lBmpOld()                                     As Long
  662. Private m_lCurrState                                    As Long
  663. Private m_hFnt                                          As Long
  664. Private m_hIml                                          As Long
  665. Private m_hImlDragImageList                             As Long
  666. Private m_lFilterChangeTimeOut                          As Long
  667. Private m_iGroupedHeaderCount                           As Long
  668. Private m_lCol                                          As Long
  669. Private m_lCXY                                          As Long
  670. Private m_lColOrder                                     As Long
  671. Private m_lR                                            As Long
  672. Private m_iDragCol                                      As Long
  673. Private m_lLastDivider                                  As Long
  674. Private m_lDragCandidateBefore                          As Long
  675. Private m_lDragCandidateAfter                           As Long
  676. Private m_sngLuminence                                  As Single
  677. Private m_sGroupBoxHintText                             As String
  678. Private m_sTag()                                        As String
  679. Private m_cDrag                                         As cImageListDrag
  680. Private m_tULF                                          As LOGFONT
  681. Private m_tR                                            As RECT
  682. Private m_tFont                                         As LOGFONT
  683. Private m_font                                          As StdFont
  684. Private m_pHeader                                       As StdPicture
  685. Private m_tGroupedCol()                                 As tGroupCol
  686. Private WithEvents m_tmrDragDrop                        As clsTimer
  687. Attribute m_tmrDragDrop.VB_VarHelpID = -1
  688. Private m_cRender                                       As clsRender
  689. Private m_cHeaderDc                                     As clsStoreDc
  690. Private m_GXHeader                                      As GXMSubclass
  691.  
  692.  
  693. Private Sub Class_Initialize()
  694.  
  695.     'm_bCustomHeader = True
  696.     '/* Ensure that the common control DLL is loaded
  697.     InitCommonControls
  698.     m_bTrackUser32 = FunctionExported("TrackMouseEvent", "User32")
  699.     '/* default colors
  700.     m_lTextForeColor = &H111111
  701.     m_lTextHighLite = &H676767
  702.     
  703.     '/* Are we running NT
  704.     Dim lVer As Long
  705.     lVer = GetVersion()
  706.     m_bIsNt = ((lVer And &H80000000) = 0)
  707.     
  708.     '/* Enabled default
  709.     m_bEnabled = True
  710.     '/* default to 2s
  711.     m_lFilterChangeTimeOut = 2000
  712.     m_lCol = -1
  713.    ' m_sGroupBoxHintText = DEFAULT_GROUPBOX_HINT_TEXT
  714.     HotTrack = True
  715.     DragReOrderColumns = True
  716.     HasButtons = True
  717.     FullDrag = False
  718.  
  719.     Set m_cDrag = New cImageListDrag
  720.     Set m_tmrDragDrop = New clsTimer
  721.    
  722. End Sub
  723.  
  724. Friend Property Get AllowGrouping() As Boolean
  725.     AllowGrouping = m_bAllowGrouping
  726. End Property
  727.  
  728. Friend Property Let AllowGrouping(ByVal Value As Boolean)
  729.  
  730.     If Not (m_bAllowGrouping = Value) Then
  731.         m_bAllowGrouping = Value
  732.         If Not (m_bAllowGrouping) Then
  733.             Do While (m_iGroupedHeaderCount > 0)
  734.                 ColumnIsGrouped(m_tGroupedCol(1).lColumn) = False
  735.             Loop
  736.         End If
  737.         RaiseEvent Resize
  738.     End If
  739.    
  740. End Property
  741.  
  742. Friend Property Get ColumnAtIndex(ByVal lIndex As Long) As Long
  743.  
  744. Dim i As Long
  745.  
  746.     For i = 0 To ColumnCount - 1
  747.         If (ColumnIndex(i) = lIndex) Then
  748.             ColumnAtIndex = i
  749.             Exit For
  750.         End If
  751.     Next i
  752.    
  753. End Property
  754.  
  755. Friend Property Get ColumnCount() As Long
  756.  
  757.     m_lR = SendMessageLongA(m_lHdrHandle, HDM_GETITEMCOUNT, 0&, 0&)
  758.     ColumnCount = m_lR
  759.     
  760. End Property
  761.  
  762. Friend Property Get ColumnExtraData(ByVal lColumn As Long) As Long
  763.  
  764. Dim tHI As HDITEMA
  765.  
  766.     tHI.Mask = HDI_LPARAM
  767.     If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  768.         ColumnExtraData = tHI.lParam
  769.     Else
  770.         debugmsg "Get column extra data error"
  771.     End If
  772.  
  773. End Property
  774.  
  775. Friend Property Let ColumnExtraData(ByVal lColumn As Long, _
  776.                                     ByVal lExtraData As Long)
  777.  
  778. Dim tHI As HDITEMA
  779.  
  780.     tHI.Mask = HDI_LPARAM
  781.     tHI.lParam = lExtraData
  782.     If Not (pbSetHeaderItemInfo(lColumn, tHI)) Then
  783.         debugmsg "Set column extra data error"
  784.     End If
  785.     
  786. End Property
  787.  
  788. Friend Property Get ColumnFilter(ByVal lColumn As Long) As String
  789.  
  790. Dim sFilter As String
  791. Dim tHI     As HDITEMA
  792.  
  793.     tHI.Mask = HDI_FILTER
  794.     If (pbGetHeaderItemInfo(lColumn, tHI, sFilter)) Then
  795.         ColumnFilter = sFilter
  796.     End If
  797.    
  798. End Property
  799.  
  800. Friend Property Let ColumnFilter(ByVal lColumn As Long, _
  801.                                  ByVal sFilter As String)
  802.  
  803.     If Len(sFilter) = 0 Then
  804.         '/* Clear the filter:
  805.         If m_bIsNt Then
  806.             SendMessageLongW m_lHdrHandle, HDM_CLEARFILTER, lColumn, 0
  807.         Else
  808.             SendMessageLongA m_lHdrHandle, HDM_CLEARFILTER, lColumn, 0
  809.         End If
  810.     Else
  811.         '/* Add the text to the filter:
  812.         Dim tHI As HDITEMA
  813.         tHI.Mask = HDI_FILTER
  814.         tHI.type = HDFT_ISSTRING
  815.         If pbSetHeaderItemInfo(lColumn, tHI, sFilter) Then
  816.         Else
  817.             debugmsg "Failed to set filter."
  818.         End If
  819.     End If
  820.     
  821. End Property
  822.  
  823. Friend Property Get ColumnGroupCount() As Long
  824.     ColumnGroupCount = m_iGroupedHeaderCount
  825. End Property
  826.  
  827. Friend Property Get ColumnHeader(ByVal lColumn As Long) As String
  828.  
  829. Dim iPos        As Long
  830. Dim sColHeader  As String
  831. Dim tHI         As HDITEMA
  832.  
  833.     tHI.cchTextMax = 255
  834.     sColHeader = String$(tHI.cchTextMax, Chr$(0))
  835.     tHI.Mask = HDI_TEXT
  836.     tHI.pszText = sColHeader
  837.     If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  838.         sColHeader = tHI.pszText
  839.         iPos = InStr(sColHeader, Chr$(0))
  840.         If Not (iPos = 0) Then
  841.             ColumnHeader = left$(sColHeader, iPos - 1)
  842.         Else
  843.             ColumnHeader = sColHeader
  844.         End If
  845.     Else
  846.         debugmsg "Get column header text error"
  847.     End If
  848.    
  849. End Property
  850.  
  851. Friend Property Let ColumnHeader(ByVal lColumn As Long, _
  852.                                  ByVal sText As String)
  853.  
  854. Dim tHI As HDITEMA
  855.  
  856.     With tHI
  857.         .cchTextMax = Len(sText)
  858.         If (sText = "") Then
  859.             .pszText = vbNullChar
  860.         Else
  861.             .pszText = sText
  862.         End If
  863.         .Mask = HDI_TEXT
  864.     End With
  865.     If pbSetHeaderItemInfo(lColumn, tHI) Then
  866.         If (ColumnIsGrouped(lColumn)) Then
  867.             RaiseEvent RePaint
  868.         End If
  869.     Else
  870.         debugmsg "Set column header text error"
  871.     End If
  872.    
  873. End Property
  874.  
  875. Friend Property Get ColumnHeaderFromPoint(ByVal x As Long, _
  876.                                           ByVal y As Long) As Long
  877.  
  878. Dim lCol    As Long
  879. Dim i       As Long
  880.    
  881.     lCol = -1
  882.     For i = 1 To m_iGroupedHeaderCount
  883.         If Not (PtInRect(m_tGroupedCol(i).tR, x, y) = 0) Then
  884.             ColumnHeaderFromPoint = m_tGroupedCol(i).lColumn
  885.             Exit Property
  886.         End If
  887.     Next i
  888.  
  889.     If (y >= m_tR.top) And (y <= m_tR.bottom) Then
  890.         Dim xLast As Long
  891.         Dim lWidth As Long
  892.         xLast = m_tR.left
  893.         For i = 0 To ColumnCount - 1
  894.             lCol = ColumnAtIndex(i)
  895.             If Not (ColumnIsGrouped(lCol)) Then
  896.                 lWidth = ColumnWidth(lCol)
  897.                 If (x >= xLast) And (x < xLast + lWidth) Then
  898.                     ColumnHeaderFromPoint = lCol
  899.                     Exit Property
  900.                 End If
  901.                 xLast = xLast + lWidth
  902.             End If
  903.         Next i
  904.     End If
  905.     ColumnHeaderFromPoint = lCol
  906.    
  907. End Property
  908.  
  909. Friend Property Get ColumnImageOnRight(ByVal lColumn As Long) As Boolean
  910.  
  911. Dim tHI As HDITEMA
  912.  
  913.    tHI.Mask = HDI_FORMAT
  914.    If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  915.       ColumnImageOnRight = ((tHI.fmt And HDF_BITMAP_ON_RIGHT) = HDF_BITMAP_ON_RIGHT)
  916.    End If
  917.    
  918. End Property
  919.  
  920. Friend Property Let ColumnImageOnRight(ByVal lColumn As Long, _
  921.                                        ByVal bState As Boolean)
  922.  
  923. Dim tHI As HDITEMA
  924.  
  925.     With tHI
  926.         .Mask = HDI_FORMAT
  927.         If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  928.             If bState Then
  929.                 .fmt = .fmt Or HDF_BITMAP_ON_RIGHT
  930.             Else
  931.                 .fmt = .fmt And Not HDF_BITMAP_ON_RIGHT
  932.             End If
  933.             If (pbSetHeaderItemInfo(lColumn, tHI)) Then
  934.                 If (ColumnIsGrouped(lColumn)) Then
  935.                     RaiseEvent RePaint
  936.                 End If
  937.             Else
  938.                 debugmsg "Failed to set image on right property"
  939.             End If
  940.         End If
  941.     End With
  942.     
  943. End Property
  944.  
  945. Friend Property Get ColumnGroupOrder(ByVal lColumn As Long) As Long
  946.  
  947. Dim i   As Long
  948. Dim lr  As Long
  949.  
  950.     lr = 0
  951.     For i = 1 To m_iGroupedHeaderCount
  952.         If (m_tGroupedCol(i).lColumn = lColumn) Then
  953.             lr = i
  954.             Exit For
  955.         End If
  956.     Next i
  957.     ColumnGroupOrder = lr - 1
  958.    
  959. End Property
  960.  
  961. Friend Property Let ColumnGroupOrder(ByVal lColumn As Long, _
  962.                                      ByVal lOrder As Long)
  963.  
  964. Dim i               As Long
  965. Dim lExistingIndex  As Long
  966. Dim tGExisting      As tGroupCol
  967. Dim tHI             As HDITEMA
  968.  
  969.     '/* Check order index:
  970.     If (lOrder > m_iGroupedHeaderCount) Or (lOrder < -1) Then
  971.         Exit Property
  972.     End If
  973.    
  974.     '/* Find if the column already exists in the groups
  975.     For i = 1 To m_iGroupedHeaderCount
  976.         If (m_tGroupedCol(i).lColumn = lColumn) Then
  977.             lExistingIndex = i
  978.             LSet tGExisting = m_tGroupedCol(i)
  979.             Exit For
  980.         End If
  981.     Next i
  982.             
  983.     If (lOrder = m_iGroupedHeaderCount) Then
  984.         '/* This item wants to be added to the end of the groupings.
  985.         '/* We need to check that it isn't already in the groupings -
  986.         '/* if it is, then you can't add at this order, instead you
  987.         '/* would change the order of the existing item:
  988.         If lExistingIndex > 0 Then
  989.             Exit Property
  990.         End If
  991.         '/* Ok so it wasn't already there, let's add it
  992.         m_iGroupedHeaderCount = m_iGroupedHeaderCount + 1
  993.         ReDim Preserve m_tGroupedCol(1 To m_iGroupedHeaderCount) As tGroupCol
  994.         With m_tGroupedCol(m_iGroupedHeaderCount)
  995.             .lColumn = -1
  996.             .lOrigColOrder = ColumnIndex(lColumn)
  997.             .lOrigColSize = ColumnWidth(lColumn)
  998.             .lColumn = lColumn
  999.         End With
  1000.         tHI.Mask = HDI_WIDTH
  1001.         tHI.cxy = 0
  1002.         pbSetHeaderItemInfo lColumn, tHI
  1003.         ColumnIndex(lColumn) = 0
  1004.         '/* Resize (we've added something)
  1005.         pResize
  1006.         '/* Repaint
  1007.         RaiseEvent RePaint
  1008.     ElseIf (lOrder < 0) Then
  1009.         '/* We're removing this column from the grouping
  1010.         '/* if it is there
  1011.         If (lExistingIndex > 0) Then
  1012.             'Debug.Assert "TODO" = ""
  1013.         End If
  1014.     Else
  1015.         '/* Check if this column is already in the grouping:
  1016.         If (lExistingIndex > 0) Then
  1017.             '/* We are moving this item from the existing location to the new one:
  1018.             '/* Check if the column is already at this position:
  1019.             If (lExistingIndex = lOrder + 1) Then
  1020.             '/* nothing to do
  1021.             Else
  1022.                 '/* Check which direction we're going in:
  1023.                 If (lExistingIndex - 1 < lOrder) Then
  1024.                     '/* Increasing the order.  Move anything from
  1025.                     '/* lExistingIndex to lOrder + 1 up one:
  1026.                     For i = lExistingIndex To lOrder
  1027.                         LSet m_tGroupedCol(i) = m_tGroupedCol(i + 1)
  1028.                     Next i
  1029.                     '/* Now put this item at lOrder + 1:
  1030.                     LSet m_tGroupedCol(lOrder + 1) = tGExisting
  1031.                 Else
  1032.                     '/* Decreasing the order.  Move anything from
  1033.                     For i = lExistingIndex - 1 To lOrder + 1 Step -1
  1034.                         LSet m_tGroupedCol(i + 1) = m_tGroupedCol(i)
  1035.                     Next i
  1036.                     '/* Now put this item at lOrder + 1:
  1037.                     LSet m_tGroupedCol(lOrder + 1) = tGExisting
  1038.                 End If
  1039.                 RaiseEvent RePaint
  1040.             End If
  1041.         Else
  1042.             If (lExistingIndex > 0) Then
  1043.                 '/* We are inserting this item at the specified index:
  1044.                 m_iGroupedHeaderCount = m_iGroupedHeaderCount + 1
  1045.                 ReDim Preserve m_tGroupedCol(1 To m_iGroupedHeaderCount) As tGroupCol
  1046.                 For i = m_iGroupedHeaderCount To lExistingIndex Step -1
  1047.                     LSet m_tGroupedCol(i) = m_tGroupedCol(i - 1)
  1048.                 Next i
  1049.                 With m_tGroupedCol(m_iGroupedHeaderCount)
  1050.                     .lColumn = -1
  1051.                     .lOrigColOrder = ColumnIndex(lColumn)
  1052.                     .lOrigColSize = ColumnWidth(lColumn)
  1053.                     .lColumn = lColumn
  1054.                 End With
  1055.                 tHI.Mask = HDI_WIDTH
  1056.                 tHI.cxy = 0
  1057.                 pbSetHeaderItemInfo lColumn, tHI
  1058.                 ColumnIndex(lColumn) = 0
  1059.                 '/* Resize (we've added something)
  1060.                 pResize
  1061.                 RaiseEvent RePaint
  1062.             Else
  1063.                 '/* inserting this item:
  1064.                 m_iGroupedHeaderCount = m_iGroupedHeaderCount + 1
  1065.                 ReDim Preserve m_tGroupedCol(1 To m_iGroupedHeaderCount) As tGroupCol
  1066.                 For i = m_iGroupedHeaderCount To lOrder + 2 Step -1
  1067.                 LSet m_tGroupedCol(i) = m_tGroupedCol(i - 1)
  1068.                 Next i
  1069.                 With m_tGroupedCol(lOrder + 1)
  1070.                     .lColumn = -1
  1071.                     .lOrigColOrder = ColumnIndex(lColumn)
  1072.                     .lOrigColSize = ColumnWidth(lColumn)
  1073.                     .lColumn = lColumn
  1074.                 End With
  1075.                 tHI.Mask = HDI_WIDTH
  1076.                 tHI.cxy = 0
  1077.                 pbSetHeaderItemInfo lColumn, tHI
  1078.                 ColumnIndex(lColumn) = 0
  1079.                 '/* Resize (we've added something)
  1080.                 pResize
  1081.                 RaiseEvent RePaint
  1082.             End If
  1083.         End If
  1084.     End If
  1085.     
  1086. End Property
  1087.  
  1088. Friend Property Get ColumnImage(ByVal lColumn As Long) As Long
  1089.  
  1090. Dim tHI As HDITEMA
  1091.  
  1092.     tHI.Mask = HDI_FORMAT
  1093.     If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1094.         If (tHI.fmt And HDF_IMAGE) = HDF_IMAGE Then
  1095.             tHI.Mask = HDI_IMAGE
  1096.             If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1097.                 ColumnImage = tHI.iImage
  1098.             Else
  1099.                 debugmsg "Get column image error"
  1100.             End If
  1101.         Else
  1102.             ColumnImage = -1
  1103.         End If
  1104.     End If
  1105.    
  1106. End Property
  1107.  
  1108. Friend Property Let ColumnImage(ByVal lColumn As Long, _
  1109.                                 ByVal lImage As Long)
  1110.  
  1111. Dim tHI As HDITEMA
  1112.  
  1113.     With tHI
  1114.         If Not (ColumnImage(lColumn) = lImage) Then
  1115.             .Mask = HDI_FORMAT
  1116.             If pbGetHeaderItemInfo(lColumn, tHI) Then
  1117.                 If (pbValidImage(lImage) < 0) Then
  1118.                     .fmt = .fmt Or HDF_IMAGE
  1119.                     .Mask = .Mask Or HDI_IMAGE
  1120.                     .iImage = lImage
  1121.                 Else
  1122.                     .fmt = .fmt And Not HDF_IMAGE
  1123.                 End If
  1124.                 If (pbSetHeaderItemInfo(lColumn, tHI)) Then
  1125.                     If (ColumnIsGrouped(lColumn)) Then
  1126.                         RaiseEvent RePaint
  1127.                     End If
  1128.                 Else
  1129.                     debugmsg "Set column image error"
  1130.                 End If
  1131.             End If
  1132.         End If
  1133.     End With
  1134.    
  1135. End Property
  1136.  
  1137. Friend Property Get ColumnIndex(ByVal lColumn As Long) As Long
  1138.  
  1139. Dim tHI As HDITEMA
  1140.  
  1141.     If Not (lColumn = m_lCol) Then
  1142.         tHI.Mask = HDI_ORDER
  1143.         If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1144.             ColumnIndex = tHI.iOrder
  1145.         End If
  1146.     Else
  1147.         ColumnIndex = m_lColOrder
  1148.     End If
  1149.    
  1150. End Property
  1151.  
  1152. Friend Property Get ColumnIsGrouped(ByVal lColumn As Long) As Boolean
  1153.  
  1154. Dim i As Long
  1155.  
  1156.     For i = 1 To m_iGroupedHeaderCount
  1157.         If (m_tGroupedCol(i).lColumn = lColumn) Then
  1158.             ColumnIsGrouped = True
  1159.             Exit For
  1160.         End If
  1161.     Next i
  1162.    
  1163. End Property
  1164.  
  1165. Friend Property Let ColumnIsGrouped(ByVal lColumn As Long, _
  1166.                                     ByVal bState As Boolean)
  1167.     
  1168.     ColumnIsGroupedSub lColumn, bState, -1
  1169.  
  1170. End Property
  1171.  
  1172. Friend Property Let ColumnIndex(ByVal lColumn As Long, _
  1173.                                 ByVal lOrder As Long)
  1174.  
  1175. Dim tHI As HDITEMA
  1176.  
  1177.     If Not (ColumnIndex(lColumn) = lOrder) Then
  1178.         tHI.Mask = HDI_ORDER
  1179.         tHI.iOrder = lOrder
  1180.         If Not (pbSetHeaderItemInfo(lColumn, tHI)) Then
  1181.             debugmsg "Set column order error"
  1182.         End If
  1183.     End If
  1184.    
  1185. End Property
  1186.  
  1187. Friend Property Get ColumnOwnerDraw(ByVal lColumn As Long) As Boolean
  1188.  
  1189. Dim tHI As HDITEMA
  1190.  
  1191.     tHI.Mask = HDI_FORMAT
  1192.     If pbGetHeaderItemInfo(lColumn, tHI) Then
  1193.         ColumnOwnerDraw = ((tHI.fmt And HDF_OWNERDRAW) = HDF_OWNERDRAW)
  1194.     End If
  1195.    
  1196. End Property
  1197.  
  1198. Friend Property Let ColumnOwnerDraw(ByVal lColumn As Long, _
  1199.                                     ByVal bState As Boolean)
  1200.  
  1201. Dim tHI As HDITEMA
  1202.  
  1203.     tHI.Mask = HDI_FORMAT
  1204.     If pbGetHeaderItemInfo(lColumn, tHI) Then
  1205.         If bState Then
  1206.             tHI.fmt = tHI.fmt Or HDF_OWNERDRAW
  1207.         Else
  1208.             tHI.fmt = tHI.fmt And Not HDF_OWNERDRAW
  1209.         End If
  1210.         If Not (pbSetHeaderItemInfo(lColumn, tHI)) Then
  1211.             debugmsg "Set column owner draw error"
  1212.         End If
  1213.     End If
  1214.    
  1215. End Property
  1216.  
  1217. Friend Property Get ColumnSortBitmap(ByVal lColumn As Long) As EHdrSortBitmapTypes
  1218.  
  1219. Dim tHI As HDITEMA
  1220.  
  1221.     tHI.Mask = HDI_FORMAT
  1222.     If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1223.         If (tHI.fmt And HdrSortBitmapUp) = HdrSortBitmapUp Then
  1224.             ColumnSortBitmap = HdrSortBitmapUp
  1225.         ElseIf (tHI.fmt And HdrSortBitmapDown) = HdrSortBitmapDown Then
  1226.             ColumnSortBitmap = HdrSortBitmapDown
  1227.         Else
  1228.             ColumnSortBitmap = HdrSortBitmapNone
  1229.         End If
  1230.     End If
  1231.  
  1232. End Property
  1233.  
  1234. Friend Property Let ColumnSortBitmap(ByVal lColumn As Long, _
  1235.                                      ByVal eSortBitmapType As EHdrSortBitmapTypes)
  1236.  
  1237. Dim tHI As HDITEMA
  1238.  
  1239.     tHI.Mask = HDI_FORMAT
  1240.     If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1241.         If (eSortBitmapType = HdrSortBitmapDown) Then
  1242.             tHI.fmt = tHI.fmt Or HdrSortBitmapDown And Not HdrSortBitmapUp
  1243.         ElseIf (eSortBitmapType = HdrSortBitmapUp) Then
  1244.             tHI.fmt = tHI.fmt Or HdrSortBitmapUp And Not HdrSortBitmapDown
  1245.         Else
  1246.             tHI.fmt = tHI.fmt And Not (HdrSortBitmapUp Or HdrSortBitmapDown)
  1247.         End If
  1248.         If (pbSetHeaderItemInfo(lColumn, tHI)) Then
  1249.             If (ColumnIsGrouped(lColumn)) Then
  1250.                 RaiseEvent RePaint
  1251.             End If
  1252.         Else
  1253.             debugmsg "Failed to set ColumnSortBitmap"
  1254.         End If
  1255.     End If
  1256.    
  1257. End Property
  1258.  
  1259. Friend Property Get ColumnTag(ByVal lColumn As Long) As String
  1260.     ColumnTag = m_sTag(lColumn)
  1261. End Property
  1262.  
  1263. Friend Property Let ColumnTag(ByVal lColumn As Long, ByVal sTag As String)
  1264.  
  1265.     If (lColumn < ColumnCount) Then
  1266.         m_sTag(lColumn) = sTag
  1267.     Else
  1268.         debugmsg "Error setting column tag."
  1269.     End If
  1270.     
  1271. End Property
  1272.  
  1273. Friend Property Get ColumnTextAlign(ByVal lColumn As Long) As EHdrTextAlign
  1274.  
  1275. Dim tHI As HDITEMA
  1276.  
  1277.     tHI.Mask = HDI_FORMAT
  1278.     If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1279.         ColumnTextAlign = tHI.fmt And &H7&
  1280.     End If
  1281.    
  1282. End Property
  1283.  
  1284. Friend Property Let ColumnTextAlign(ByVal lColumn As Long, _
  1285.                                     ByVal eAlign As EHdrTextAlign)
  1286.  
  1287. Dim tHI As HDITEMA
  1288.  
  1289.     With tHI
  1290.         .Mask = HDI_FORMAT
  1291.         If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1292.             .fmt = tHI.fmt And Not &H7&
  1293.             .fmt = tHI.fmt Or eAlign
  1294.             If (pbSetHeaderItemInfo(lColumn, tHI)) Then
  1295.                 If (ColumnIsGrouped(lColumn)) Then
  1296.                     RaiseEvent RePaint
  1297.                 End If
  1298.             Else
  1299.             End If
  1300.         End If
  1301.     End With
  1302.     
  1303. End Property
  1304.  
  1305. Friend Property Get ColumnWidth(ByVal lColumn As Long) As Long
  1306.  
  1307. Dim i   As Long
  1308. Dim tHI As HDITEMA
  1309.  
  1310.     If lColumn = m_lCol Then
  1311.         ColumnWidth = m_lCXY
  1312.     Else
  1313.         If (ColumnIsGrouped(lColumn)) Then
  1314.             For i = 1 To m_iGroupedHeaderCount
  1315.                 If (m_tGroupedCol(i).lColumn = lColumn) Then
  1316.                     ColumnWidth = m_tGroupedCol(i).lOrigColSize
  1317.                     Exit For
  1318.                 End If
  1319.             Next i
  1320.         Else
  1321.             tHI.Mask = HDI_WIDTH
  1322.             If (pbGetHeaderItemInfo(lColumn, tHI)) Then
  1323.                 ColumnWidth = tHI.cxy
  1324.             Else
  1325.                 debugmsg "Get column width error"
  1326.             End If
  1327.         End If
  1328.     End If
  1329.  
  1330. End Property
  1331.  
  1332. Friend Property Let ColumnWidth(ByVal lColumn As Long, _
  1333.                                 ByVal lWidthPixels As Long)
  1334.  
  1335. Dim i   As Long
  1336. Dim tHI As HDITEMA
  1337.  
  1338.     If Not (ColumnWidth(lColumn) = lWidthPixels) Then
  1339.       If (ColumnIsGrouped(lColumn)) Then
  1340.          For i = 1 To m_iGroupedHeaderCount
  1341.             If (m_tGroupedCol(i).lColumn = lColumn) Then
  1342.                m_tGroupedCol(i).lOrigColSize = lWidthPixels
  1343.                Exit For
  1344.             End If
  1345.          Next i
  1346.       Else
  1347.          tHI.Mask = HDI_WIDTH
  1348.          tHI.cxy = lWidthPixels
  1349.          If (pbSetHeaderItemInfo(lColumn, tHI)) Then
  1350.             RaiseEvent ColumnWidthChanged(lColumn, lWidthPixels)
  1351.          Else
  1352.             debugmsg "Set column width error"
  1353.          End If
  1354.       End If
  1355.    End If
  1356.    
  1357. End Property
  1358.  
  1359. Friend Property Get ColumnX(ByVal lColumn As Long) As Long
  1360.  
  1361. Dim i As Long
  1362. Dim x As Long
  1363.  
  1364.     For i = 0 To ColumnCount - 1
  1365.         If (ColumnIndex(lColumn) = i) Then
  1366.             Exit For
  1367.         Else
  1368.             If Not ColumnIsGrouped(ColumnAtIndex(i)) Then
  1369.                 x = x + ColumnWidth(ColumnAtIndex(i))
  1370.             End If
  1371.         End If
  1372.     Next i
  1373.     ColumnX = x
  1374.    
  1375. End Property
  1376.  
  1377. Friend Property Get CustomHeader() As Boolean
  1378.     CustomHeader = m_bCustomHeader
  1379. End Property
  1380.  
  1381. Friend Property Let CustomHeader(ByVal PropVal As Boolean)
  1382.  
  1383.     m_bCustomHeader = PropVal
  1384.  
  1385. End Property
  1386.  
  1387. Friend Property Get DragImageList(ByVal lColumn As Long)
  1388.  
  1389.     ClearDragImageList
  1390.     If (ColumnIsGrouped(lColumn)) Then
  1391.         Dim i As Long
  1392.         Dim lIndex As Long
  1393.         Dim lWidth As Long
  1394.         Dim lHeight As Long
  1395.         '/* Need to create a new image list for dragging:
  1396.         For i = 1 To m_iGroupedHeaderCount
  1397.             If (m_tGroupedCol(i).lColumn = lColumn) Then
  1398.                 lIndex = i
  1399.                 Exit For
  1400.             End If
  1401.         Next i
  1402.         lWidth = m_tGroupedCol(lIndex).tR.right - m_tGroupedCol(lIndex).tR.left
  1403.         lHeight = Height
  1404.         m_hImlDragImageList = ImageList_Create(lWidth, lHeight, ILC_MASK Or ILC_COLOR32, 1, 1)
  1405.         '/* Now need to create an image of the item to be dragged to add to the drag image list:
  1406.         Dim lhDCDisp As Long
  1407.         Dim lHDC As Long
  1408.         Dim lhBmp As Long
  1409.         Dim lhBmpOld As Long
  1410.         Dim tR As RECT
  1411.         Dim hFontOld As Long
  1412.         tR.right = lWidth
  1413.         tR.bottom = lHeight
  1414.         lhDCDisp = CreateDc("DISPLAY", ByVal 0&, ByVal 0&, ByVal 0&)
  1415.         lHDC = CreateCompatibleDC(lhDCDisp)
  1416.         lhBmp = CreateCompatibleBitmap(lhDCDisp, lWidth, lHeight)
  1417.         DeleteDC lhDCDisp
  1418.         lhBmpOld = SelectObject(lHDC, lhBmp)
  1419.         '/* Draw the item onto the DC:
  1420.         hFontOld = SelectObject(lHDC, m_hFnt)
  1421.         DrawGroupedHeaderItem lHDC, lIndex, tR
  1422.         SelectObject lHDC, hFontOld
  1423.         '/* Select the bitmap out:
  1424.         SelectObject lHDC, lhBmp
  1425.         '/* Clear up DC:
  1426.         DeleteDC lHDC
  1427.         '/* Add the bitmap to the ImageList:
  1428.         ImageList_AddMasked m_hImlDragImageList, lhBmp, &H10101
  1429.         '/* Clear up the bitmap:
  1430.         DeleteObject lhBmp
  1431.     Else
  1432.         If m_bIsNt Then
  1433.             m_hImlDragImageList = SendMessageLongW(m_lHdrHandle, HDM_CREATEDRAGIMAGE, lColumn, 0)
  1434.         Else
  1435.             m_hImlDragImageList = SendMessageLongA(m_lHdrHandle, HDM_CREATEDRAGIMAGE, lColumn, 0)
  1436.         End If
  1437.     End If
  1438.     DragImageList = m_hImlDragImageList
  1439.  
  1440. End Property
  1441.  
  1442. Friend Property Get DragReOrderColumns() As Boolean
  1443.     DragReOrderColumns = m_bDragReorderColumns
  1444. End Property
  1445.  
  1446. Friend Property Let DragReOrderColumns(ByVal bState As Boolean)
  1447.  
  1448.     If Not (m_bDragReorderColumns = bState) Then
  1449.         m_bDragReorderColumns = bState
  1450.         If Not (m_lHdrHandle = 0) Then
  1451.             pSetStyle HDS_DRAGDROP, bState
  1452.         End If
  1453.     End If
  1454.    
  1455. End Property
  1456.  
  1457. Friend Property Get Enabled() As Boolean
  1458.    Enabled = m_bEnabled
  1459. End Property
  1460.  
  1461. Friend Property Let Enabled(ByVal bEnabled As Boolean)
  1462.  
  1463. Static bResetOnEnable As Boolean
  1464.  
  1465.     If Not (m_bEnabled = bEnabled) Then
  1466.         m_bEnabled = bEnabled
  1467.         If Not m_bEnabled Then
  1468.             If m_bButtons Then
  1469.                 HasButtons = False
  1470.                 m_bButtons = True
  1471.                 bResetOnEnable = True
  1472.             End If
  1473.         Else
  1474.             If bResetOnEnable Then
  1475.                 If m_bButtons Then
  1476.                     m_bButtons = False
  1477.                     HasButtons = True
  1478.                 End If
  1479.             End If
  1480.         End If
  1481.         EnableWindow m_lHdrHandle, Abs(m_bEnabled)
  1482.     End If
  1483.  
  1484. End Property
  1485.  
  1486. Friend Property Get FilterBar() As Boolean
  1487.     FilterBar = m_bFilterBar
  1488. End Property
  1489.  
  1490. Friend Property Let FilterBar(ByVal bFilterBar As Boolean)
  1491.  
  1492.     If Not (m_bFilterBar = bFilterBar) Then
  1493.         m_bFilterBar = bFilterBar
  1494.         If Not (m_lHdrHandle = 0) Then
  1495.             pSetStyle HDS_FILTERBAR, bFilterBar
  1496.             pResize
  1497.         End If
  1498.     End If
  1499.    
  1500. End Property
  1501.  
  1502. Friend Property Get FilterChangeTimeOut() As Long
  1503.     FilterChangeTimeOut = m_lFilterChangeTimeOut
  1504. End Property
  1505.  
  1506. Friend Property Let FilterChangeTimeOut(ByVal lTimeOutMs As Long)
  1507.  
  1508.     m_lFilterChangeTimeOut = lTimeOutMs
  1509.     If m_bIsNt Then
  1510.         SendMessageLongW m_lHdrHandle, HDM_SETFILTERCHANGETIMEOUT, 0&, lTimeOutMs
  1511.     Else
  1512.         SendMessageLongA m_lHdrHandle, HDM_SETFILTERCHANGETIMEOUT, 0&, lTimeOutMs
  1513.     End If
  1514.    
  1515. End Property
  1516.  
  1517. Friend Property Get FullDrag() As Boolean
  1518.     FullDrag = m_bFullDrag
  1519. End Property
  1520.  
  1521. Friend Property Let FullDrag(ByVal bFullDrag As Boolean)
  1522.  
  1523.     If Not (m_bFullDrag = bFullDrag) Then
  1524.         m_bFullDrag = bFullDrag
  1525.         If Not m_lHdrHandle = 0 Then
  1526.             pSetStyle HDS_FULLDRAG, bFullDrag
  1527.         End If
  1528.     End If
  1529.    
  1530. End Property
  1531.  
  1532. Friend Property Get GroupBoxHintText() As String
  1533.     GroupBoxHintText = m_sGroupBoxHintText
  1534. End Property
  1535.  
  1536. Friend Property Let GroupBoxHintText(ByVal sText As String)
  1537.     m_sGroupBoxHintText = sText
  1538. End Property
  1539.  
  1540. Friend Property Get GutterButtonColor() As Long
  1541.     GutterButtonColor = m_lGutterButtonColor
  1542. End Property
  1543.  
  1544. Friend Property Let GutterButtonColor(ByVal PropVal As Long)
  1545.     m_lGutterButtonColor = PropVal
  1546. End Property
  1547.  
  1548. Friend Property Get GutterButtonSkinned() As Boolean
  1549.     GutterButtonSkinned = m_bGutterButtonSkinned
  1550. End Property
  1551.  
  1552. Friend Property Let GutterButtonSkinned(ByVal PropVal As Boolean)
  1553.     m_bGutterButtonSkinned = PropVal
  1554. End Property
  1555.  
  1556. Friend Property Get HasButtons() As Boolean
  1557.     HasButtons = m_bButtons
  1558. End Property
  1559.  
  1560. Friend Property Let HasButtons(ByVal bHasButtons As Boolean)
  1561.  
  1562.     If Not (bHasButtons = m_bButtons) Then
  1563.         m_bButtons = bHasButtons
  1564.         If Not m_lHdrHandle = 0 Then
  1565.             pSetStyle HDS_BUTTONS, bHasButtons
  1566.         End If
  1567.     End If
  1568.    
  1569. End Property
  1570.  
  1571. Friend Property Get HeaderBackColor() As Long
  1572.     HeaderBackColor = m_lHeaderBgColor
  1573. End Property
  1574.  
  1575. Friend Property Let HeaderBackColor(PropVal As Long)
  1576.     m_lHeaderBgColor = PropVal
  1577. End Property
  1578.  
  1579. Friend Property Get HeaderColorAuto() As Boolean
  1580.     HeaderColorAuto = m_bHeaderClrAuto
  1581. End Property
  1582.  
  1583. Friend Property Let HeaderColorAuto(PropVal As Boolean)
  1584.     m_bHeaderClrAuto = PropVal
  1585. End Property
  1586.  
  1587. Friend Property Get HeaderSkinStyle() As Long
  1588.     HeaderSkinStyle = m_lHeaderSkinStyle
  1589. End Property
  1590.  
  1591. Friend Property Let HeaderSkinStyle(ByVal PropVal As Long)
  1592.     m_lHeaderSkinStyle = PropVal
  1593. End Property
  1594.  
  1595. Friend Property Get Height() As Long
  1596.     Height = m_tR.bottom - m_tR.top
  1597. End Property
  1598.  
  1599. Friend Property Let Height(ByVal lHeight As Long)
  1600.  
  1601.     m_tR.bottom = m_tR.top + lHeight
  1602.     pResize
  1603.    
  1604. End Property
  1605.  
  1606. Friend Property Get HideGroupingBox() As Boolean
  1607.     HideGroupingBox = m_bHideGroupingBox
  1608. End Property
  1609.  
  1610. Friend Property Let HideGroupingBox(ByVal Value As Boolean)
  1611.  
  1612.     If Not m_bHideGroupingBox = Value Then
  1613.         m_bHideGroupingBox = Value
  1614.         RaiseEvent Resize
  1615.     End If
  1616.    
  1617. End Property
  1618.  
  1619. Friend Property Get HotTrack() As Boolean
  1620.     HotTrack = m_bHotTrack
  1621. End Property
  1622.  
  1623. Friend Property Let HotTrack(ByVal bHotTrack As Boolean)
  1624.  
  1625.     If Not (m_bHotTrack = bHotTrack) Then
  1626.         m_bHotTrack = bHotTrack
  1627.         If Not (m_lHdrHandle = 0) Then
  1628.             pSetStyle HDS_HOTTRACK, bHotTrack
  1629.         End If
  1630.     End If
  1631.    
  1632. End Property
  1633.  
  1634. Private Property Get IdealHeaderHeight() As Long
  1635.  
  1636. Dim lr      As Long
  1637. Dim lHeight As Long
  1638. Dim cx      As Long
  1639. Dim cy      As Long
  1640. Dim tHDL    As HDLAYOUT
  1641. Dim rc      As RECT
  1642. Dim pwpos   As WINDOWPOS
  1643.  
  1644.     tHDL.lprc = VarPtr(rc)
  1645.     tHDL.lpwpos = VarPtr(pwpos)
  1646.     lr = SendMessageA(m_lHdrHandle, HDM_LAYOUT, 0&, tHDL)
  1647.     lHeight = pwpos.cy
  1648.     ImageList_GetIconSize m_hIml, cx, cy
  1649.     If (lHeight < cy + 4) Then
  1650.         lHeight = cy + 4
  1651.     End If
  1652.    
  1653.     IdealHeaderHeight = lHeight
  1654.  
  1655. End Property
  1656.  
  1657. Friend Property Get IdealHeight() As Long
  1658.  
  1659. Dim lHeight As Long
  1660.    
  1661.     lHeight = Height
  1662.     If (m_bAllowGrouping And Not (m_bHideGroupingBox)) Then
  1663.         If (m_iGroupedHeaderCount = 0) Then
  1664.             lHeight = lHeight + lHeight + 12 + 8
  1665.         Else
  1666.             lHeight = lHeight + lHeight + 12 + (m_iGroupedHeaderCount * 8)
  1667.         End If
  1668.     End If
  1669.    
  1670.     IdealHeight = lHeight
  1671.    
  1672. End Property
  1673.  
  1674. Public Property Get IHeader() As StdPicture
  1675. '/* header image
  1676.     Set IHeader = m_pHeader
  1677. End Property
  1678.  
  1679. Public Property Set IHeader(PropVal As StdPicture)
  1680.     Set m_pHeader = PropVal
  1681. End Property
  1682.  
  1683. Friend Property Get left() As Long
  1684.     left = m_tR.left
  1685. End Property
  1686.  
  1687. Friend Property Let left(ByVal lLeft As Long)
  1688.  
  1689. Dim lOrigLeft As Long
  1690.  
  1691.     With m_tR
  1692.         lOrigLeft = .left
  1693.         .right = lLeft + .right - .left
  1694.         .left = lLeft
  1695.         pResize Not (.left = lOrigLeft)
  1696.     End With
  1697.     
  1698. End Property
  1699.  
  1700. Friend Property Get HeaderLuminence() As Long
  1701.     HeaderLuminence = m_lHeaderLuminence
  1702. End Property
  1703.  
  1704. Friend Property Let HeaderLuminence(PropVal As Long)
  1705.     m_lHeaderLuminence = PropVal
  1706. End Property
  1707.  
  1708. Friend Property Get HeaderThemeColor() As Long
  1709.     HeaderThemeColor = m_lThemeColor
  1710. End Property
  1711.  
  1712. Friend Property Let HeaderThemeColor(ByVal PropVal As Long)
  1713.     m_lThemeColor = PropVal
  1714. End Property
  1715.  
  1716. Friend Property Get top() As Long
  1717.     top = m_tR.top
  1718. End Property
  1719.  
  1720. Friend Property Let top(ByVal lTop As Long)
  1721.  
  1722.     With m_tR
  1723.         .bottom = lTop + .bottom - .top
  1724.         .top = lTop
  1725.     End With
  1726.     pResize
  1727.     
  1728. End Property
  1729.  
  1730. Friend Property Get UseHeaderTheme() As Boolean
  1731.     UseHeaderTheme = m_bUseHeaderTheme
  1732. End Property
  1733.  
  1734. Friend Property Let UseHeaderTheme(ByVal PropVal As Boolean)
  1735.     m_bUseHeaderTheme = PropVal
  1736. End Property
  1737.  
  1738. Friend Property Get Visible() As Boolean
  1739.     Visible = m_bVisible
  1740. End Property
  1741.  
  1742. Friend Property Let Visible(ByVal bVisible As Boolean)
  1743.  
  1744.     m_bVisible = bVisible
  1745.     If Not m_lHdrHandle = 0 Then
  1746.         If bVisible Then
  1747.             ShowWindow m_lHdrHandle, SW_SHOW
  1748.         Else
  1749.             ShowWindow m_lHdrHandle, SW_HIDE
  1750.         End If
  1751.     End If
  1752.  
  1753. End Property
  1754.  
  1755. Friend Property Get Width() As Long
  1756.     Width = m_tR.right - m_tR.left
  1757. End Property
  1758.  
  1759. Friend Property Let Width(ByVal lWidth As Long)
  1760.  
  1761.     m_tR.right = m_tR.left + lWidth
  1762.     pResize
  1763.    
  1764. End Property
  1765.  
  1766. Friend Function AddColumn(ByVal sText As String, _
  1767.                           Optional ByVal lWidth As Long = 64, _
  1768.                           Optional ByVal eTextAlign As EHdrTextAlign = HdrTextALignLeft, _
  1769.                           Optional ByVal lExtraData As Long = 0, _
  1770.                           Optional ByVal lImage As Long = -1, _
  1771.                           Optional ByVal lInsertAfter As Long = -1) As Long
  1772.  
  1773. Dim b()     As Byte
  1774. Dim lr      As Long
  1775. Dim wP      As Long
  1776. Dim tHI     As HDITEMA
  1777. Dim tHIW    As HDITEMW
  1778.  
  1779.     With tHI
  1780.         .Mask = HDI_TEXT Or HDI_WIDTH Or HDI_FORMAT Or HDI_LPARAM
  1781.         .fmt = eTextAlign Or HDF_STRING
  1782.         If Not m_hIml = 0 Then
  1783.             If (pbValidImage(lImage)) Then
  1784.                 .Mask = .Mask Or HDI_IMAGE
  1785.                 .fmt = .fmt Or HDF_IMAGE
  1786.                 .iImage = lImage
  1787.             End If
  1788.         End If
  1789.         .cxy = lWidth
  1790.         .lParam = lExtraData
  1791.         If Len(sText) = 0 Then
  1792.             .Mask = .Mask And Not HDI_TEXT
  1793.         Else
  1794.             .pszText = sText
  1795.             .cchTextMax = Len(sText)
  1796.         End If
  1797.     End With
  1798.     If (lInsertAfter < 0) Then
  1799.         wP = ColumnCount + 1
  1800.     Else
  1801.         wP = lInsertAfter
  1802.     End If
  1803.     
  1804.     If m_bIsNt Then
  1805.         '/* Copy to tHIW:
  1806.         With tHIW
  1807.             .Mask = tHI.Mask
  1808.             .fmt = tHI.fmt
  1809.             .iImage = tHI.iImage
  1810.             .cxy = tHI.cxy
  1811.             .lParam = tHI.lParam
  1812.             .cchTextMax = tHI.cchTextMax
  1813.             If (Len(sText) > 0) Then
  1814.                 b = tHI.pszText
  1815.                 ReDim Preserve b(0 To UBound(b) + 2) As Byte
  1816.             Else
  1817.                 ReDim b(0 To 1) As Byte
  1818.             End If
  1819.             .pszText = VarPtr(b(0))
  1820.         End With
  1821.         m_lR = SendMessageW(m_lHdrHandle, HDM_INSERTITEMW, wP, tHIW)
  1822.     Else
  1823.         m_lR = SendMessageA(m_lHdrHandle, HDM_INSERTITEM, wP, tHI)
  1824.     End If
  1825.       
  1826.     If (ColumnCount > 0) Then
  1827.         ReDim Preserve m_sTag(0 To ColumnCount - 1) As String
  1828.     End If
  1829.            
  1830. End Function
  1831.  
  1832. Friend Sub ClearAllFilters()
  1833.  
  1834.     If m_bIsNt Then
  1835.         SendMessageLongW m_lHdrHandle, HDM_CLEARFILTER, -1, 0
  1836.     Else
  1837.         SendMessageLongA m_lHdrHandle, HDM_CLEARFILTER, -1, 0
  1838.     End If
  1839.  
  1840. End Sub
  1841.  
  1842. Friend Sub ClearDragImageList()
  1843.  
  1844.     If m_hImlDragImageList Then
  1845.         ImageList_Destroy m_hImlDragImageList
  1846.         m_hImlDragImageList = 0
  1847.     End If
  1848.    
  1849. End Sub
  1850.  
  1851. Friend Function ColumnHitTest(ByVal xPixels As Long, _
  1852.                               ByVal yPixels As Long) As Long
  1853.  
  1854. Dim i       As Long
  1855. Dim j       As Long
  1856. Dim lIndex  As Long
  1857. Dim yHeader As Long
  1858. Dim rc      As RECT
  1859.  
  1860.     lIndex = -1
  1861.     yHeader = yPixels
  1862.     If (m_bAllowGrouping And Not (m_bHideGroupingBox)) Then
  1863.         GetWindowRect m_lParentHwnd, rc
  1864.         yHeader = yPixels + rc.bottom - rc.top - Height
  1865.     End If
  1866.     For i = 0 To ColumnCount - 1
  1867.         If Not (ColumnIsGrouped(i)) Then
  1868.             If m_bIsNt Then
  1869.                 SendMessageW m_lHdrHandle, HDM_GETITEMRECT, i, rc
  1870.             Else
  1871.                 SendMessageA m_lHdrHandle, HDM_GETITEMRECT, i, rc
  1872.             End If
  1873.             If Not (PtInRect(rc, xPixels, yHeader) = 0) Then
  1874.                 lIndex = i
  1875.                 Exit For
  1876.             End If
  1877.         End If
  1878.     Next i
  1879.    
  1880.     If lIndex = -1 Then
  1881.         For i = 1 To m_iGroupedHeaderCount
  1882.             If Not (PtInRect(m_tGroupedCol(i).tR, xPixels, yPixels) = 0) Then
  1883.                 lIndex = m_tGroupedCol(i).lColumn
  1884.                 Exit For
  1885.             End If
  1886.         Next i
  1887.     End If
  1888.    
  1889.     ColumnHitTest = lIndex
  1890.    
  1891. End Function
  1892.  
  1893. Friend Sub ColumnStartFilterEdit(ByVal lColumn As Long)
  1894.  
  1895.     If m_bIsNt Then
  1896.         SendMessageLongW m_lHdrHandle, HDM_EDITFILTER, lColumn, 0
  1897.     Else
  1898.         SendMessageLongA m_lHdrHandle, HDM_EDITFILTER, lColumn, 0
  1899.     End If
  1900.    
  1901. End Sub
  1902.  
  1903. Private Sub HeaderThemeSettings()
  1904.  
  1905.     Select Case m_lHeaderLuminence
  1906.     Case  HdrSortBit
  1907.         ImageList_Destroy m_hImlDraRnd Sub
  1908.  
  1909. Private Sub f m_bIsNe  Hdr
  1910.    Rnd Sub
  1911.  
  1912. PrivN(d SuaderLum    '/* Copy ttings()
  1913.  
  1914.     Select Case m_lHeright - m_tR.left
  1915. m   lProperwGrouping And Not (m_bHidelnd Sub
  1916.  
  1917. PrivN(d Suad(i lProperwdCol(i).lColumn
  1918.      Exit ForroperwGro If m_bIsNt Then
  1919.         SendMessageLongW m__________extMax = tHI.cchTextMax
  1920.         rty Get top() As Long
  1921.     top = m_tR.top
  1922. End Property
  1923. roperty
  1924. rope/ O   top = m_tR.top_lHdrHandle r_bIsNt Then   SendMessageLongA mdnd Property       SendMessageLongW m_lHdrHandle, HDM_EDITFILTER, lColumn, 0
  1925.     Else
  1926.  ot (PtInRect(ageLongW m_lHdrHandle, HDM_EDIT Pate SuGd PrR, lC
  1927.     Else
  1928.  ot (Pt   Eg And Not (mg
  1929. Dim lIndeFILTER, lColight + lHeight + 12 + 8
  1930.         Else
  1931.       hLEARFILTER, -DM_GETITEMR8
  1932.         E1GetIconSize S.cchTextMax
  1933.         rty Get top(Heightt (Colu     .lParam = lExtraDderBackColo
  1934. Dim i As nR
  1935.  
  1936. Privat   HIfOEperty
  1937.  
  1938. FrUsible = bVisiblS.cchTextMax
  1939.        Select Cam_lHdal sText As String, _
  1940.               electring, _Obo.(
  1941.  vN(d     Sel, HDM_GETITEMRECT, i, rc
  1942.             Else
  1943.            = bVi Sel,lse
  1944.             debugmsg "Set column width error"
  1945.          EnDlectring, _Obo.(
  1946.  vNl,lse
  1947.    WIDT'tR.top + lHeight
  1948.     HIfOEpd If
  1949.    l As                                          Nl,ls    t Case Dlectring, _Obo.(
  1950. fpSet columR
  1951.    geList(ByVaEperty
  1952.  
  1953. FrUsible erColumns = m_bDragRDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDhTextMax
  1954.         rty Get       .lPaDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDCrcolumR
  1955.    geList(ByVaEpe   geList(ByVaEpe   geList(ByVaEped Ife (Colu     .lParam =wElse
  1956.        QColu     .lParam =
  1957.    GetIconSize S.cchTexParam
  1958.         End   m_lR =Sd Property
  1959.  
  1960. Friend Property LetVal lC                               Nl(gImageList Then
  1961.         ImageList_Destroy m_hImlDraI    lIndex = -1 Cgs -
  1962.         '/* if it is,LNot (LetVal lC d IfeRct) Thens -
  1963.         '/* ifo.(_lGutte  geL        End If
  1964.     End If
  1965.    
  1966. End Proelsll        lIndex = iaI   m
  1967.     End If
  1968.      End If
  1969.    
  1970. End Proelsll   RW_s If
  1971. rty
  1972. rope/ O   top =      DDDDDDDDDhTextMaxd &H7&
  1973. th error"
  1974.     oley          errotMax
  1975.        nIf m_bIsNt THg) As Long
  1976. a End Function           Nl(gImageList Then
  1977.         ImageList_Des As THg)  With
  1978.           geList(ByVaEped Ife (Colu   olSiDDDDDDDDCrcolumR
  1979.    geLiong
  1980. a Enlu   olSiDDDs THg)  WithnIf m_bIsNt THg) As Long
  1981. i As THg)  With
  1982.     Dl1sroperty Get IHeader() As StdPicture
  1983. '/* header image
  1984.     Set IHeader ,NlHdrHandn Or HDF_STRING
  1985.     StdPi!oe
  1986.     Set IHeader =ngW m_l HeaderThemeSettings()
  1987.  
  1988.     Select Case m_lHeaderLuminenceHandle = 0 TderLu  geList(ByVaEped   WIDT'tR.top + lHeight
  1989.     HIfThene =, -1, W WIDHeaderLucUDDDDDDDDDDDDDhTdMessageLon3KngW m_l HeaderThemeSettageLon3KngW m_l HeaE,LNot (LetVal lC d IfeRct) Thens -
  1990.         '/* ifo.(_lGutte  geL        End If
  1991.  geList Then
  1992.         ImageList_Des As THg)  With
  1993.           gePnd  geL      lDDDD1        Wieer() As StdPicture
  1994. '/* headulGutte  geL        End If
  1995.  geList2
  1996. Privat lDDDD1        Wieer(_ THg)   geL        End If
  1997. L        End IResize Not (.left =     Else
  1998.     DDD1      Re Not (.lesk =B
  1999.         '/*         Ene No3eerty Get HotTrIcte         End      As   Exit For
  2000.         d    Set IHeader =ngW m_bHasButtonsQ    C
  2001.         '/* Add the bitmap to the ImageList:
  2002.         ImageList_AddMasILTER, lColumn, 0
  2003.     Else
  2004.         SendMessageLongu =ngW m_bHa      iT*hiblS.cch  Set IHeaderl = 0 Then
  2005.   ong
  2006.     left = h -
  2007.         '/*Cen
  2008. a   e
  2009.     Set IHeader =ngW m_l HeaderThem    As RECT
  2010. Dim pwpos (LetVal lC dLetVal lC d IfeRct) Thit         End If
  2011.     Else
  2012. rt RePaint
  2013.      1, W WIDHeaderLucUDDDDDDDDDDDDDhTdMetHeaderItemInfo(lCB
  2014.         '/*     n)
  2015. DDDDDDDhTdMetHeaderItemInfo(lCB
  2016.         '/*     n)
  2017. DDDDDDDhRchTexttn (LetVal  Sub CoIDHeaderLucUDDDDDDerty GM   Dim ls As(lCB
  2018.         '/* exttn (LetVal  Sub lGutte  geL       sageLongum ls As(lCB
  2019.         '/t(ByVaEpe   geList(1W m_l HeaderThem    As R3KngW m_l HeaderThemeSettageLon3KngW m_l Hea (.left =     Else
  2020.     DDD1      Re Not (.lesk =B 3T'tR.top + lHeiThen
  2021.     W m           If No       sE   Re Not (drTexTHg       End If
  2022.                 If (pbSetHeaderI     Iet IHeader =ngW m_bHasButtonsQ    C
  2023.         '/* Add the bitmapperty Get IHeadepperty Get IHeadept_pHeader
  2024. End Prrrrrrrrrrr            ong End If
  2025.     End If
  2026.     
  2027. End Property
  2028.  
  2029. Frrr      s m_bI0
  2030.  ReOrderColumns() As , HDM_CREATEDRAGIMAGE, lColumn,     pResize
  2031.     HDM_CREATEDRAGIM    DDDDDhRchTextm lr        End If
  2032.    
  2033.     ColumnHDhRchTextm lr       rm_bHaLu  geLis Iet IHeader =ngW m_bHasButto Then
  2034.   ong
  2035.     left =
  2036.         debugmsg "ErrHeadebStateTHg)  LetVal lC dLe As Los -
  2037. c    pResize
  2038.     HDM_CREATEDRAGIM    DDDDDhRchTextm lr        End If
  2039.    
  2040.     ColumnHDhRt(ByVaEub CoIDHe1) As Byte
  2041.         oT    debuTTTTTTTf
  2042.    
  2043.     ColbuTThemeSettageLon3Kng   oTCYm_lGutterButtonColorVal lC dLe As Los -
  2044. c    pResizem_bGutterButtonc    pResizem_bGutterButtonc    pResizem_bGu.A    Exit Forrot IHeadepperty GIM    DDDDDhRchTexttTTTTTTf
  2045.    
  2046.     Colbb CoIDHe1) As Byte
  2047.     DDDhRchTODHe1) As Byte
  2048.     DDDhRchmeeiTAbSetHeaEor(Brty
  2049.  
  2050. Frieniiiiiiiiiiiiiiiiiic   y(Proper8oa
  2051.     ColuColbb CoIDHe1) As Byte
  2052.   
  2053.     Colbb CoIDHe     der =ngW m_bHas Iet IHeader =ngW  =ng   End If
  2054.    
  2055.     ColumnHHHHHHHHHEDRAGIoa
  2056.     ColuC8s Byte
  2057.  SmRader =ngW m_l HeaderThemeSettings()
  2058.  
  2059.       Senl HeaderTheme()
  2060.  
  2061.          pResizeaderTh          = bVi Sel,lse
  2062.         HeaC dLe As Los -
  2063. c    pReTextMax
  2064.         p1) As         = bVi Sel,lse
  2065.         HeaC dLe As Los -    gme()
  2066. endMessageLongA mdnd Prop=)
  2067.     End With
  2068.    EATEDRAGI SelediIf
  2069.   dt     End   m_lAAi!iiiiiiiiiiiiic   y(Proper8oa
  2070.     ColuColbb CoIckColoHeaderLucUDDDDDDerty GIckCng   m UR, -DM=DD1      Re Not (DEe   oTtHI.fmt Or HdrSortBitmapDown And Not HdrSortBitm eLongW m_lngW m_l H   m UR, -DM=DD1      Re Not (DEe   oTtHIProperty       SendMessacbIsNe  Hdr
  2071.    Rnd m_l H   m UR, -DM=DD1    ntHea-L  m UR, -DM=DD1    ntHeaR ColbuTThemeSettageiiiiiii
  2072.     DDDhRchmeeiTAbaderThemeSeOAGIoa
  2073.     ColuC8s Byte
  2074.  SmRader hemeSettage.soloonc    pResiiiiiiiiiiiiiiiiiiic   y(Proper8oa
  2075.     DDDhRcc    pResiiiiiii  der -
  2076. c    pResizelnd utto TeLongA mdnd ProN+ 1
  2077.          ShowWindo itmapD Pro_
  2078.     lIoa
  2079.   Sd Get FilterBCSy
  2080.    
  2081. End 
  2082.         ShowWim pwpos (LetVal lC 'eiiiiiii
  2083.  cmn
  2084.      Ioa
  2085.   lbb(aOdDRoperku
  2086. '/* head Ioa
  2087. iiiiii
  2088. itmapD Pro_
  2089.  Byte
  2090.   -DM=Diend PropertRagAal lC 'eiiiiiii
  2091.  cmn le As Los -
  2092. c    pResi.agAhemeSettageLon3KngW m_l Hea (.lef      pResi.Header =ngW  =tHI.lParams      perty Let HeaderThemeColor(ByVal PropVal As Long)
  2093.     m_l mdnd PrWend P(DEe   opAuto(PropVal As BooleaaaaaaaaaaaaaaaaangW  AAAAAAAAeDim Preserve b(0aaaaagW  AAAAAAAAeDim Pre_tR.right -n_l Hea (.lef      pResi.HsageLongA mdnd Pr   ColumsW  AAAAAAAAeDim Pre_tR.right -n_l Hem Preserve b_Db"A mdnDM=DD1    ntHeQ    RchTerty
  2094.  c     RaiseEvhRchmeeiTAbaderThemeSeOAGIoa
  2095.     ChmeeiTAbaderThemeSeOAGI  Else
  2096.         SendMessageLongA m_lHdr            Chg
  2097.         Dim lWidth Asr
  2098.    
  2099.         Dim lWidth d Ifit =  8oa
  2100.     DDDhRcc    pResiiii     If (m_tGDM=DD1    ntHeQ    RchTerts,Width Asr
  2101.  Ifit =  8oa
  2102.     DD_l mdndeLon Asr
  2103.    
  2104.         Dim lWidth d Ifit = NsageLongA TCm  Els -DM=Dao   Ch_EDITFILTER, lColumn, LDDDhRcc    pRFngA mOl(Ioa
  2105.     ColuC8s Byte
  2106.  SmRader =ngW mn leEls -DM=Dao   Ch_EDITM=DD1  sButtons    DDoluC8sht -n_l Hea (.lef ITFILTER, lColund Sub Colns    DDolef ITFe
  2107.     DDD2n le As LrThemeIEnd Pr  C   DDolef ITFe
  2108.     DDD2n le As LrThemeIEnd eNdee
  2109.     Dor() As LoD.lef ITFILTTTTTTnSortBitmap = Hdry Let Visible(ByumnIsGrouped-perkilterBCible(ByumnIsGroup4 nd PropertRagAal ty Get FilterBar() As 2Get IcfOee
  2110.  LAAAASortBdrHandley Get FilterBar() As 2Get im pwponCoXeQ    RchTerts,Width Asr
  2111.  Ifit =  Ifdth d Ifit =  8oa
  2112.     DDDhRcc    pResiiii  ao   Plef ITFnd Not (m_oXeQ  s  Plef ITFnd t (m_oXeQ  sITFIL Colu &H7&
  2113. th error"
  2114.                         A&
  2115. th err  = bVi Sel,ls
  2116.         End If
  2117.     Next i, bState, -1
  2118.  
  2119. End Pro = HDI_TEXT ror und(bTL>Rader   DDD2n le e1) As BytT   pResi.HsageLongA mdnd Pr   ColumsW  AAAAAAAAeDim Pre_e1) AsageLongA m_lHdrHan
  2120.     m_lHeadAAAesi.HsageLoL_lHdrHan
  2121.     m_lHeadAAAesSettage.soloonc    peadAAAesi.HsageLoL
  2122.  
  2123. FriendtWindowRect me b(0 To UBounsroperty Get IHeaddrHahTdMetHeaderItemInfo(lCeList
  2124.      s  Plef ITFnd t (m_oX0d    End   m_lAAirHahTd
  2125.     m_l,HdrHan
  2126.     m_lHeadAAAesSettage.sssssssssssGutterButtonrrrrr            onrThemeSeOAGNssssssssssGuXeQ  s  Plef ITFn  End   m_lAAirHaL=ot                     Nl(gIALoX0d    End   RyVaM6ToX0d    End  eOOOOOOOOOOOOn eTextAlign As EHddnd Pr  Next i8s Byte
  2127.  SmRader =ngW mn leEls -frUsible = bVisiblS.cchTextMaxtr =ngW  lLeftttonrrrrr            onrThemeSeOAGNssssssssssGuXeIet IHea sssssssssssssssssssssssssss     lhDCDisp = CreateDc("DIblS.cch  Set IHeaderl = 0 Then
  2128.   ong8oa
  2129. ra
  2130.     ColuC8aL=ot                  = ColuC8aL=ot         roperty      iiii
  2131.  cmn   n)
  2132. DDDDDDDhRchTexttn (LetVal  Sub CoIDHeaderLusSett= CreoiDDDhumsWMmdnd Pr   '/* Add the bitmap to t If m_bIsNt ThParam = lExtraD         = ColuCrl =     = ColuCrl =  m_lFilterChan  m_lFilterChan  m_lFilter = ColuCrl =     = ColuCrl =  m_lFilterChan  m_lFilter Long
  2133.         Dim lhBmp As Long
  2134.         Dim lhBmpOld As Long
  2135.         Dim tR As RECT
  2136.         (adA
  2137.   o   Plef ITFnd Not (     (adA
  2138.   o   Plef ITFnd Not (    E ImageList:
  2139.        E   (ar    E ImageList:
  2140.       Wieer() As StdPicch  e2rouped-perkilterBCible(ByumnIsGroup4 nrouped-perkilteolumn
  2141.               
  2142.   o   Plef ITFnd Not (                  onrThemeSeRyVaM6ToX0d dAAAesSettage.sssssssssssGutterButtonnrThemeSeRyVaM6To() As 2Get IcfOee
  2143.  LAa.sssssssssss.soloon= ColuCrl =  ilteolumnT o   PliT      Dim lhBmp As Lole, SW_HIDE
  2144.         End I -
  2145. c    pRState,  Plef ITFnd Not (m_oXeQ  s  Plefiiiiiiic   y(Proper8oa
  2146.     Cm =,TFnd Not (m_oXelter PlefiiiiiiiAf
  2147.    
  2148. EnPlefiiiiiiiAf
  2149.    _DD1 N  DDolef ITFe     iiii
  2150.  cmn   n)
  2151. DDDDDDDhRchTexC     
  2152. En_n)
  2153. DDDDDDDhRchTexC As EHdrTextAlit (    
  2154.   o   Plef ITFnd Not (                  onrThemelefiiiiiiiAf
  2155.    _DD1 N  DDolef hexC     
  2156. En_n)
  2157. DD   
  2158. En_n)
  2159. DDDDDDDhRchT
  2160. DDDuCrl =  ilteolu=   _DD1 N  DI.lPar (    
  2161.      (arThemeSeR2f
  2162.    _DD1 N  DDolefmelefiiiiiiiAf
  2163.    _DD1B*DD1 N  IDel            us2rouped-perkilterBCible(ByumnIsGroup4 nroupte,  Plef ITFnd Not (m_oXeQ  s  Plefiiiiilnd     P  o   Plef d the bitI (adA
  2164.   o L Plef Ihmeet:
  2165.       Wieer(w N  IDel  n
  2166.                 Exit t Then
  2167.   R  P  o   PDawl  n
  2168. Friend Property Get Col t Then
  2169.   R iiiiilnd     P OAG        tet IHeaddrHahTdMetHeaderIt_bHas umnTag_bHas umnTag_bHas umnTag_bHas umnTag_bHas ubrHahTdMet)en
  2170.      an
  2171.     m_lHeadAAAesSe     AAAesi.HsageLoL
  2172.  
  2173. FriendtWindowRect me b(0 To ieer(w N  IDel  n
  2174.                rHan
  2175.    le(ByumnIsGroup4 nd Prop+E' an
  2176.     mGrack
  2177.      (               ader1 N  DDolef ITFe    ht FilterBCSy
  2178.    
  2179. End 
  2180.         ShowWim pwpos (LetVal lC 'ei Property
  2181.  
  2182. Friend PrelterChan  Nse
  2183.         m_lR = SendMessageAouped-perkilteolumn
  2184.       a
  2185.     Coly3
  2186. Friend PrelteButtonnrThemeSeRyVaD3
  2187. Friend Pre                                                                                                                                                                             wRect me b(0 To ieer(w N  IDel        N  I   ct me DluCrl                            =ngW  =t s  Plef ITF m_bI0
  2188.  ReOrderColumns() Aolor
  2189. End Propert(B       lWidthPixels
  2190.   T      Dim lhBmp As Lole, ddrHahTdMilnd                 .fm                    Lonn
  2191. Youp4 nroupEDITM=DD1  s  Plef ITF m_bI0erveGo ieer(wn
  2192. Yst:
  2193.       Wieer() 0 Then
  2194.   ong8oa
  2195. ra
  2196.     ColuC8aL=otg_bHas ubrHahTdMet)en
  2197.       m_bDndMessageLongA mdnd Prop=)
  2198.  N  DDolLoageLf
  2199.  y GIckCnrHahTdMet)eneQ    '3
  2200. Friend umnnTee
  2201.     Set IHeader = m_pHennTee
  2202.    d Property Get Col t Then
  2203.   R iiiiilnd     P OA)N(d Suad(i lP
  2204.     Coly3
  2205. Friend Preltegit       ag_bHan
  2206.   R iiiiilnd     P OAG     lWidthPixels
  2207. CB      ILiiiilnd     P OAGhag_bHan
  2208.   iiilnd     ixels
  2209.   T KAbaderThemeSeOAGIoa
  2210.   rop=)
  2211.  N  endtWropeOOOOOOO          If  iiiT KAbaderThemeSeOAGIoa
  2212.   ilteolumnT o   P  rop=)
  2213.  N  endtT KAberror     
  2214.    d PropeLetVa                    HHeaderBackColor() A
  2215.   ong8oC ifo.(_lDDDh     A&
  2216. th err  = bVi Sel,EmnT o   P  ropeO Property Get Col t Then
  2217.   R iiiiilnd     P OA)N(d Suad(s Iet IHeader =ngW m_bHaoperty
  2218. Iet IHeader =ngW m_bHaoperty
  2219. Iet IHeadas umnTKAberro  rop=)
  2220.  itmapDown   m_bUseHea)
  2221. DDDDDDDhRchT
  2222. DDDVal PropVal As Boolea5Toup4 nd Prop+E' andjETpVal As BooleatmapDown  Laolor() As Long
  2223. AoolePlefiiiiiiiAf
  2224.    _DD1 et IHeader =ngW tt Enatt Enatt Enatt EnaTer() 0 Then
  2225. e             ByVal e(wnYst:
  2226.      ropAs Long
  2227. Ao     erTssssssssssGuttg
  2228. Ao  Val e(wnYstderBa      e(wnYst:
  2229.      ropppppppppppppppp= lHeight
  2230. sGuttg
  2231. Ao  Val e(wnYstdOAGIoa G    P OAG   alhBmp rTssssssssssGuttg
  2232. A_DD1 et IHeader =n(d Suad(strTsssssssssnGIoa G    P ght
  2233. sGuttg
  2234. Ao  Val e(wnYstdOAGIouad(strTsssssssssnGIoa G    P ght
  2235. sGuttg
  2236. Ao OAGITee
  2237.    d Property N   
  2238. End Poa
  2239.   rop=)
  2240.  N  endtWr =ngW tt Enatt Enatt E  Val As LongrHahTdderty Get Col t Then
  2241.  ea)
  2242. Dixels
  2243. CB      ILiiiilnd     P OAhTdderty Get Col t ,   d Property N   
  2244. EndImea)
  2245. Dixels
  2246. CB      ILiiiilnd     P OAhTdderty Get Col t ,   d ProperBBBBBBBBBBBBBBBBBBBBpfOeerop=)
  2247.  N  Boolean
  2248.     CustomHeader = m_bCustomHeader
  2249. HI.cchTextMax
  2250.         rty Get top() As Long
  2251.     top = m_tR.top
  2252. End Property
  2253. roperty
  2254. rope/ O   toIet IHmnTKAbeEpppppppppppppppppppp PrHmnTKA= m_tR.top   DicY=ngW  lLefttacIHeader =ngW tt Enat ProperpD  
  2255.   ot IHeader =ngW tt Enap lColumnfttacIhT
  2256. DDels
  2257. CB      ILiiiilnd          WXeIet I)) As Loolean
  2258.    ong
  2259.     top = m_tR.top
  2260. E-n_l Hx
  2261.   ot IHeader =nS.   ong
  2262. L  onrThemeSeolec  onrTonrThemeSeolec emeSeolec erTheme-A Loolean
  2263.    ong
  2264.     top = m_tR.topibFilterBty = m_tR.tomeSe(d SuBBBBBpfOeIi"
  2265.                         A&Propm    y = m_tR.tomeSe(s()
  2266.  
  2267.       A Else
  2268.         'i   Dim lhBmp As Lole, SW_HIDE
  2269.    +ct) Thens -
  2270.         '/* ifo.(_YstdOAGIoa G    P OA     A&Propm    y =m eLongW m_lngW m_l H   m UR, -DM=DD1         ILiiiilst(1W m_l R   Dim lhBmp As Lole, SW_HIDE
  2271.    +ct) Thens -
  2272.        GIoa G  m lWiongW m_lngW m_l H   m UR, -DM=DD1        N  I   ct me ot) Thens -
  2273.  
  2274.   o      ILii  ao   Plef ITFnd Not (m_oett Enat ProperS                  dnd PongW m_lnglBBBBBBBB         ByVal e(wnYsiilndM=DD1         ILiiiilste(wneDE
  2275.  (e.soloonc    pRv8dM=DD1         ILiieSe(d       ByVal e((nTKAbeEppp' G  m lWiongW m_lngW 'WIyiiiii  derrrrrrrrrrrrrrrrrrrrrrrrrrr       dnd PongW m_Ond I -
  2276. c  m_lHdrHan   dndAAeDim       dndLetteSeolec erTheme-A((nTTheme()
  2277.  
  2278.          pRest I)) As Loolean
  2279.  fIE   As Long
  2280. Dim lk IHeCeolec erTheme-nd N: Tg
  2281. Dim lk IHeCeolec erTheme-nd N: Tg
  2282. Dim lk IHeCeolec erTheme-nd N: Tg
  2283. Dim lk IHeCeolec erTheme-nd N: Tg
  2284. Dim lk IHeCeolec erTheme-nd N: Tg
  2285. Dim lk IHeCeoleA ot) -DM=DD1        N .PixelshPiPoleA otndtl  Sub CoIDHeaderSetl  Subm_bGu.A    Exit Forrot IHeadepperty GIM ight -n_l Hea (.lef   nor
  2286.                 End If
  2287.             Next i
  2288. ty N   
  2289. End Poa
  2290.   roI -
  2291. c  m_lHdrHan  E-
  2292. c  m_lHdrHIf
  2293.           t i
  2294. nor
  2295.                 End Ifiiiilste: m_lngW m_l H   m UR, me-nd                  =ngW  =t s     ILiii        End Ifiiiilste:     End IfiiiilsI  End If
  2296.     For i = l  SehemeColor eolumn
  2297.    _l Hea (.left =      End If=fngWerSetl  Sub*   End Ifiiii
  2298.  
  2299. Dim =re-nd N: Tg
  2300. Dim lk IHeCeoleA ot) -DMre-nd N: Tg
  2301. Dim lk IHeCeoleA ot) -fiiii
  2302.  
  2303. Dim =re-nd NNNNNNNNNNNNNNNNNNNNNNNNNNNnd NNNNNNNNNNNNNNNNumsW  AAAAAAAAeDim Pre<lhBmp As Lole, SW_HlefO IHeCeoleA ot) -DM=DD1        N .PixelshPiPoleA otndtl  Sub CoIDHleA oSube, SWheme()
  2304.  
  2305.    
  2306.     ColumnHDhRt(ByVaADSubeeeeeeee   ColumnHDhRt(BoIDHleA oSube, SWheme()
  2307.  
  2308.    
  2309.     Colum
  2310.     ColumnRe
  2311.                 olumnRe PongW m_lnRk oa
  2312.     ChmenleA oSR=               P OAH   m eLongA mdnd Pr   ColhmenleA    _e()
  2313.  
  2314.    
  2315.  l  SehemeColor e  End   m_lAAirHahTd
  2316. im lk IHeCeA otndtl  Sub CoIDHl= m_tR.tomeSe(sk IHeCeA otndtl  Sub CoIDHl=ahTd
  2317. im lk IHeCeA 1 N  DI.lPar (   s ubr  Sub -          Dimste:     End IfiiiilsI  slBBBBBBnP OAGhag_bHan
  2318.   iiilnd     ix    ntHeaREmnTe
  2319.             lHeigoperS     I m_lnRk oerSs Lole, SW_Hnoiilnd     ix    ntHeaREmnT-perkilteolumn
  2320.       a
  2321.    dChilteolumn
  2322.       a
  2323.  s_BnP Oi=               P OAH   m ewRb
  2324.   Tg
  2325. Dim h As L  ntHeaREmnTe
  2326.             lHeigoperS     I m_lnRk oerSs Lole, SW_Hnoiilnd     ix    ntHeaREmnT-perkie, SW_HnoiigoperS  lColu lhBm =rEs LongngA m_lHdrHan
  2327.   ntHeaREmnT-perkilteolumn
  2328.       ct me b(0 To UBt As ntH
  2329.    T-perkidnd (As Boolean
  2330.     CustomHearEs LongngA bHaolomHearEs LongngA bHaolomHea (As BongngA bH CoIDHl= mDVaaaaaaaaaaaoSR m_tR.left
  2331. m   lProperwGrouping And Not (m_bHidelnd Sub
  2332.  
  2333. PrivN(d Suad(i lProperwdCol(iHidelnd Sub
  2334.  
  2335. PrivN(d Suad(i lProperwdCol(iHidelndttings()
  2336.  
  2337.  
  2338.   o                             _l Hea (.left =      End If=i
  2339. gW m_lnge&IH CoISe(d       fOeIi"
  2340. mu"Color e  End   m_lAAirHahTd
  2341. im l,I6 m_l H          EI(i lProH CoISe(d Ief ID= Endt       '/* ifo.(_YstaREmnTTTTTTTTTTTTTTTTT     A              ByVal ychTd
  2342. imTTT     A hTd
  2343. i3D
  2344. PrsNNNNNNNNNrf=atIL Colu E geList2
  2345. Privat lm UR, -DM=DD1        olu E geList2
  2346. Privat lm U ColnI = lEe list:
  2347.        
  2348. c  ms8dM=DDidnd (As Boolean
  2349.     CustCeoleA ot) -DOnd If
  2350.    
  2351. End Property
  2352.  
  2353. FrienDtth
  2354.    eolec erTh3oleim lhBIongngA r
  2355.    
  2356.  ean)rrrrc( I m__________B   
  2357.  ean)rrrrc( IA .Mac2       .leftan)strTigoperS  mhBIongngA r
  2358.   $oa G    P ght
  2359. seCeA NNNNNNrf=atIL C                        _l Iyr()TO Re Not (.ler=DDidnd (As Boolean
  2360.     CLdM=DDidloHeaderLucUDDDDDDerty GIckCe     iiii
  2361.  cmn   TO ReoNNNNNNNNNNNNNNNHdrHan  E-
  2362. c  m_lHdrLA AAA iiii
  2363.  cmn   TO ReoNNNNNNNNNNNNNNNNNNNNYhNNHdrHan  E-
  2364. c  m_ywr Pry
  2365. rodrLA AAA iiii
  2366.  cmnist:
  2367. xtALignLeft, _
  2368.           mHearEs LongngA bHaolomHeme()
  2369.  
  2370. drLA
  2371. xtALignLeaREmnTe
  2372.  
  2373.         '/*     lIndex = m_tGroupedCol(i).lColumn
  2374.                 Exhllumn
  2375.     Exhlluc     lIsText)
  2376.  ggggggggggggii
  2377.  cmnist:Column
  2378.   lPrL   lIcccccccwndtticccnd PongW m_Ond I -ID
  2379. PsmHemeimeOut(ByVal lTimeO   Col
  2380.    da     tR.bottom = lHeXC?en
  2381.         GetWindowWindowWindowWinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnns  CLdM=DDidloHeadekend PropeWS lIcccccccwndtticccnnnnIOg, _meO   Col
  2382.  nnnnnnnnnnnnnnnnnnnnnnns  CLdM=DDidloHeadekend Pnnnnnns  CLdM=DDidlE0Mac2       .lerop=nnnnnnnnnnnnnnns  CLdM=DDidloHeadekend Pnnnnnns  CLdM=Dn r
  2383.  dlo
  2384. PsmHemeimeOut(B End I"rc( IA .Mac2     im lWS lIcccccccwndttiupedCollNNNNNNNNNNN_vCam________________y.ndexekend SubDerty GIcI(i lPhB   
  2385. rsNNNNNNNNNNN_vCamtWindoeBBBBBBBBBBBv     I m_lnRk oerSs Lo       mHeDwA otnWindoeBBBBBBBBBBBv x = mA End W erwdCol(iHidelndttings()
  2386.  
  2387.  
  2388.   o                             _AGet HendoeBBBB Re Not (.leNNNNHdrHan m_l O I m_lnRk oerSs Lole, SW_HnFriend PrelterChan  Nse
  2389.        A End WCam________________TT                              m_l O I m_lnRk odG               _reltgggggii
  2390.  
  2391.   oLiiiilnd                                                           g8oa
  2392. ra
  2393.     ColuC8aL=ot                       Exh cmn   TO Reo       G m_lnRr_____y.ndexekend SEnnnnnnnnnnnnnnnnnnnnnnEnd Property LrTsize Not (.left = lOrigLeft)
  2394.     End With
  2395.     
  2396. End Property
  2397.  
  2398. Friend Property Get HeaderLuminence() As LngA bHaolomHith
  2399.     
  2400. En      4Property
  2401.  
  2402. FRk o     G m_lnRr_____y.ndexekend SEnnnnUolomHith
  2403.     
  2404. En      4Property
  2405. (As Boolean
  2406.     CustC left = lOr,eft
  2407. End Property
  2408.  
  2409. FEnencI_________TT oft
  2410. End Property
  2411.  
  2412. FEnencI_________TT ofindowWinnnnnnnnnnnnnnnty
  2413. _______TT ofindowW   SenTe
  2414.         4 nrortyCs()
  2415.  
  2416.  
  2417. perty
  2418.  
  2419. FEnE4Propertta5ITM=DD1  s  Plef ITF m_bI0erveGo ieer(wn
  2420. Yst:
  2421.      ic ITF m_bI0erveGo ieer(wn
  2422. Yst
  2423.  
  2424.  
  2425. perty ITF m_De -perkillm UR, -DM=DD1  Headed Property
  2426. LbI0erveGo ieer(DDhTdMetHeaderIs    t 
  2427.  
  2428.      n)strTigoperS  mhV Theme-A((nTTheme()
  2429.  
  2430.      TigopeerveGo ieer(DDrTigeadec    pC(DDrTwperty rveGo ieer(DDrTige        g8oa
  2431. ra
  2432.     CDDrTige   -perkillm UR, -DM=DD1  Headed Properd WCam______   -perkillm URRRRRRRRRRRRRRRRYst
  2433.  
  2434.  
  2435. perty ITt PnnnnsS:erty rveGo ieer(DDrTigevDDDerty GIckCng   m UR, -DM=DD1   Derty nnn8  Re PongW m_lnR=HdrTexieer(DDrHsageLo ubr  = bFullDrage.sssssssLt
  2436.  
  2437.  
  2438. perty ITm_ln-Ke/ O   top =      DDD m UR, - OEIim lk IHOogeLo u=_ln  top =   A lHeXC?en
  2439.         GetWindowWindowWindowWinnnnnnnnnnnnnnxM oft
  2440. Ef      naderIs    w   GetWindowW5t, _
  2441.         lTTTTTT WindowWindowWinnnnnnnnnnnnnnxM oft
  2442. Ef      naderIs    w   GetWirortyCs()
  2443. , - OEIim lk IHOogeLo u=_ln  top =   A lHeXC?en
  2444.         GetWindorIs .top
  2445. End Property
  2446. T-perb  -("DI    Lperty
  2447. T-perb  -("DI    Lperty
  2448. T-perb  -("DI    Lperty
  2449. T-pe(A
  2450.  ea)
  2451. Dixels
  2452. CB      ILiiiilnd     P OAhTdderty Get Col t ,   d Prope     n_______B   
  2453.  ean)=O
  2454. T-per-("DI RRRRRRRRR("DI dtticO
  2455. T-ThemeSeRyVaM6ToX0(Hith' andjETpVal As Boo      R(DDrHr(wn
  2456. YClefii)     R(Doh' andjETpVal As Boo      R(DDrHr(wn
  2457. YClefii)     R(Doh' andjETpValt  P oE m_hIIIIIIxtMax
  2458. B   
  2459.  ean)=O
  2460. T-per-("DI RRRRRRRRR("DI dtticO
  2461. T-ThemeSeRyVaDDerty GIckCng   m UR, -DM=DD1   Derty n
  2462. T-ThemeSe UR, -DM=DD1  -perkillm UR, -DM=DD   im lWS lIcccccccwndttiupedCollNNNNNNNNNNN_vME geList2
  2463. Privat lm U Coist2
  2464. Privat lm U rivat lm U CoW     ShhhhhhhhhhhhhhhhhhhhhhhhdtticO
  2465. T-TIHeader =   A lHeXC?en
  2466.       EDITFI Coist2
  2467. Privat lm U rivat lm U CoW      I m_lnRk oerSs Lo       mHeDwA otnWindoeBBBBBBBB("DI    LperetStylE Coist2retStylE Coist2retStylE Coist2retSty
  2468. xtAtHeaREmnT-pernE4PropertylE Coist2retStylE Coist2m oerSs Lo  Dt2retSty
  2469. xt   BBBnP OAGha__TT o ColuC8s Byte2retStyll N  endt   LpereAmiiiAf
  2470.    _DD1 N  DDolef hexC     
  2471. En_c erTheme-nd N: TgR         &H7&t2retStylE Coist2mP OAh- erTheme-nd N: Tg    
  2472. En_c erThemeR.blm_lnRr____Lubr  = bFullDragTTTTTTTTTTTTT
  2473.  
  2474.       nIf WCam______ As L  ntHeaREmnTeAam____mra
  2475.     ColuC8aL=ot                       Exh cmn   TO4oerty rveGo ieer(DDrTigevD&&&&&&&xr -
  2476. c    pResizelnd utto TeLongA mdnd ProN+ 1
  2477.          ShowWindo itmapD Pro_
  2478.     lIoa
  2479.   Sd GeklB("DI ,tEIHeader =ngW m_bHaoperty
  2480. IecccccccwndttiupedCollNNN.topibFevD&&&&&&&xr -
  2481. tyCs()
  2482.  
  2483.  
  2484. perty
  2485.  
  2486. FEnE4PPPPPPPPPPPPPPPPPPPPP=DDidloHeadekend Pnn0deadek4oertyNNNrf=atIL C  ope     n___s
  2487.         Ifth ernnnnEnd Property LrTA  Dt2retSty
  2488. xt   BBBnP OAGh,T-ThemeSeRyVaM6ToX0(Hith' andjETprrr      s m_bI0
  2489. ()
  2490. O    cullDraR    LperetStylE Coist lndCs(  DDeeeeeeeeR    Lpe(EDITF( Dt2retStg
  2491. lcty
  2492. Iecccccccwndtti Byte2retStyll N  endt  /nEnd Propertrrrrrrrrrrrr  iiiiiiiii___B   olumn width error"
  2493. oTT
  2494.  
  2495. nEx Ief ID= Endt      _B   D1         ILiiiilst(1W m_l R   Dim lhBmp Ay= Endt      _uDITF( Dt2retStg
  2496. lcty
  2497. IP=DD
  2498.   ot IHeadelnRk oHrrrrc( I m__________B   
  2499.  = roperEDITFI Coist2
  2500. PrdCs(  DDeeeeee6H  -("DI    LpHDhRtith tHIW
  2501.    
  2502. Aool m       _B   
  2503.  =feolumn
  2504.       a
  2505.  s_BnP Oi=       s L  ntHeaREmsageA(mVg
  2506. M6ToX0(HitDDDhTextMaCtStylE Coist2retStylE Coist2retSty
  2507. xtAtHeaRL Byte2retStyll N  endt   Lpe olumekendd GekGeklB("DI ,tEIHeader =ngW m_bHaoperty
  2508. IeccSM=DD1   Derty nnn8 1   DeretStylE Cl  HeaderColorAuto = m_bHeaderClrpVal As Boo      R(2retStyll N  endRRRRRR("DI dtticO
  2509. T-rpVal As Boo      R(2retStyll N  endRRRRRR("DI dtticO
  2510. T-rpVal As Boo      R(2retStyll Hea-rpVal As Boo      R(2retStyll N  endo = m_bHeaderClrpVal As tlDragTTbHeaderClrpVal As tlDceaderClrpVal          ShowWindow m_lHdrHandleeeeeeeeeeeeeeeeeeee endt  /nAGh,T-ThemeSeRyVaM6ToX0(Hith' ieer(DDrTioist2
  2511. PrdCs(rpVal       feeeeeee endt  /nAGOltg
  2512. lcty
  2513. IP=DD
  2514.   ot IHeaIP=DD
  2515.   ot ISd GekLheeeee endt  /nAGh,T-Th        SendMessageLongW m_lHdrHandle, HDM_EDITFILTER, lColumn, 0
  2516.     Else
  2517.         SendMessageLongA m_lHdrHandnd Ifiiii
  2518.  
  2519. Dimot IHeaIP=DD
  2520.   ot ISd GekLEOEpd If
  2521.    l As              HtStyll     ShowWir
  2522. EnVal As tlll Hf As tlDceaderClrpStyll             )    pReDD
  2523.   oEnVal As ttHI
  2524.         Dim lhBmpOld As Long
  2525.         Dim tR ___B   
  2526.  ean)=O
  2527. T-per-("o      R(2rettHI
  2528.        N   hemeSeOAGIoaA Thit         End If
  2529.     Elsh GpertttttttrwdCol(iHidelnd Subd pReDD
  2530.   oEnVttHI
  2531.  A .Merty 0
  2532. ()
  2533. O    cfee
  2534.    d PropTigopeem      End<uT   cfee
  2535.    d PB      Dim tR ___B   
  2536.    Val "DI dttindoeBBBBBBBBBBBv     I m_lnRk oe
  2537. nEx .sssssLt
  2538.  
  2539.  
  2540. eoX0(Hith' ieer(DDrTioist2
  2541. PrdCs(rpVal     Val As OOOOOOOOOX0(Hith' ieer(DDrTioist2
  2542. PrdCOOOOOX0(HithhhhDOp)eeeeeeFretS)xsOX0(H      ekGek   
  2543.    Val "DI dttindoeB
  2544.   dam____d&G EDITFI Coist2
  2545. Privat lm U       '/*         Ene No3eerty Get HotTrIcte     Messaek   
  2546.    oEnVal As tA6I Ene No3eerty Get HotTrIcte     Messaek   
  2547. BBBnP OAGh,T-ThemeSeRyVt2
  2548. Privat lm U rivat lm U CoW     Shhhhhhhhhhhhhhhhhhhhhha   oo      R(2retStyll N _lnglBBBBB    MeWOAGh,T-ThemeSeRyVt2
  2549. Privat lm U rivat lm U ubd pReDD
  2550.   oEnVttHI
  2551.  A .MerB    MeHeader =   A per-("DI RRRRRRRRR("DI dtticO
  2552. T-ThemeSeRyVafthhhh     EndN  DDolef hexi m UR, -DM=DD1   DHdrHan
  2553.     m_lHeadA   nEnd Pim lhBmpmDolef hexi Gh,T-Tht lm U riN pRS8t  /nnmnnm__d&G EDITFI Coist2L Byte2B    MeHeme-nd N: TgR         &H7&t2ty Get st2roperty
  2554.  
  2555. Friend Propertyst2roperty
  2556.  
  2557. FD= Endt      _B   D1         ILiiiilst(1W m_l R   Dim lhBm_bHailst)m_lHeadA   n2L By(1W m_l ailst)m_l1 EDITFIdCg lhBm_bHamHith
  2558.     
  2559. En      4Property
  2560.  
  2561. FRk o     G m_lnRr_____y.nde ailsttttttttttttDD1  s  Plef ITF m_ope2roperty
  2562.  
  2563. FD= Endt      _B   D1         ILiiiilst(1W m_l R   ty
  2564.  
  2565.      Ie ailstnd          WXe  DDDDDDDDD
  2566.     Elsh GpertttttttrwdCol(iHidelnd Subd pReDD
  2567.   oEnVttHI
  2568.  A .MertyusLtReDD
  2569. EnVttHId_CREHidexit ForyVaOkH  -l R   ty
  2570.  
  2571.      Ie ailstnHea (.lgeLongu =ngW )EnVttH.Messam lhBm_bHailst
  2572.  
  2573.  
  2574. rtyVttHI
  2575.  DHdrHan
  2576.     m_lHeadA   nEnd Pim lPexi nR, -DM=DD1   DHdrHan Lole, deeaRLsl(iHil    End If
  2577.     ElseRr_____y.nde ailsttttttttttttDD1  W m_lHdrHadbaWgOEIim lk IHOogeLooooooooooooooooooooooom_bhbropfHadbaWLole, deeaRLsl(iHil  t 
  2578.  
  2579.      n)strTigoperS  mhV Theme-A((nTTheme()("DI    Ls Lo        n)strTigoperS  mhV Theme-A((nTindowWindCImageList Then
  2580.         ImageLi
  2581.      vat lm U rivat lm N   hemeSestrV Theme-A((nTTheme()("DI    Ls Lo Theme-A((nTTheme()("DI    Ls Lo Theme-A((nTThemeLm Ls Lo Dolef CoI   EIst(1W m_l R   ty
  2582.  
  2583.      Ie ailstnd          WXe  DDDDDClstnd          WXe  DDDDDClstnd /O(ty
  2584.  
  2585. Frs Boo      R(2retu =ngW )EnVttH.Messam lhBm(.lgeLongu =ngW )EnVttH.NaWLolsssssssssssssssssssssssssssssssaRr_____ lHeXC?eC     
  2586. bm_bGu.A    Exit)
  2587. (,sssssssssssssssssssssaRr___HeadeoW     ShhhhhretSty
  2588.    Exit LoleTro_
  2589.  yte2B    i:SssssssssssssssssaRr___HeadeoW   Col(iHidelnd Subd pRLoleTro_
  2590.  yte2B  0Lsl(iHil  t 
  2591.  
  2592.      n)sstnHea (.lgesssem_hIISssssssssssssssaRr___tssssssssss   Elsh Gpertttttttrweme-A 
  2593. c  ms8dea (.levD&&&&&&&xr   ms8aderLuminenceadekend Pnnnnnns  Theme-oettIiiic   y(Proper8oa
  2594.   s
  2595.  yte2   
  2596. MBnenceadekenmineper8oa
  2597.   s
  2598.  yte2   
  2599. MBnence, deepAyte2   
  2600. MneadeoW   Col(i__B   olumn widthAc Hea (.left =     Els ailstnd         End If
  2601.    
  2602.   c_B   rHan,(i_OHeadbHamn widthAc Hea (.left =   o    O/i  c_B   , PB     e ailstnd   Exit)
  2603. (Messam_       onrThessssGu(.left =  pRertyusLtReDD
  2604. EnVttHId_CREHidexit ForyVaOkH  -l R   ty
  2605.  
  2606.      Ie ailstnHea (.lgeLongu =ngW )EnVtt2mP OAh- erTheme-nd N                 .fmt = .fmt O =n2mP OOOOOOOOOOLopfH
  2607.  
  2608.      n)ss (.lgess  n)ss (. PnnnnnnOAh-L    .fBLongu =ngSonnnnnOAh-L    .fBLongussssaRr___HeadeoW   Col( )EnVtt2AoI        opertyngussssaR       wP = lInsertAfter
  2609.     End If
  2610.     f s
  2611.  yte2   
  2612. MBnence, deepAyte2   
  2613. MneadeoW   Col(i__B   olumn widthAc Hea sk =B 3T'tR.toot ForyVaOkH  -l R   ty
  2614.  
  2615.      Ie ailstnHea (.lgeLongu =ngW )EnVtt2mP OAh- erThatyll N  endo = m_bHeaderClrpVal As tmP OAh- erThatyll N  endo = m_bHeaderClrpatyll N  enerkili__B  -l R   ty  EIst(1W m_l R   ty
  2616.  
  2617.      Ie ailstnd          WXe  DDDonrThongngA bHaolomHeaG Lo       mHL1W m_l R   rkili__B  -l R   ngA bHaolomHe    mHL1WdeoW   CoR   ngA bHaolomHe    rV Theme-A((nTTheme()("DI    Ls L    m tR _omHe    rV Theme-A(       kili__B  -l WXe W m_lHe    rV Theme-A((nstnHea (.lol(iHidelnd Subd pRLoleTro_
  2618.  yte2B  0Lsl(iHil  t 
  2619.  
  2620.      n) wWindowWin
  2621.    (nTThLs L   t
  2622.  
  2623.  
  2624. rtyVttHI
  2625.  DHdro   n) wWiwWin
  2626.  mp As Lole, SW_Hle 
  2627. AootyusL R   ty
  2628.  
  2629.      Ie ailstnH  kili__B  -l TThLs L   t
  2630.  
  2631.  ith
  2632.    EAT3o                            wRect me b(0 Tnd If
  2633.     f skili__B  -<perwRect t  -<A                            wRect me b(0 Tnd If
  2634.     f skili__B  -<perw<<A      -<A lefii)     R(Doh' andjETpValt  P oE m If
  2635.     Elsh GpertttttttrDEe   opAuto(PropVal As Btttttfii)     R(Doh'al As tlDceaderClder =ngW m_bHasBuR(Doh'al As tlDceaderC/i yds
  2636. ra
  2637.     ColuC8aL=o A((nTTheme()("DI    LsR(Dohe()(   n)asBuR(DohnRDR(Dohe()(   n)asBuR(DohnRDR(Dohe()(   n)asBuR(Df
  2638. End Property
  2639. ropertyY          .fmt = .fmt O =n2mP OOOOOOOOOOLopfH
  2640.  
  2641.      n)ss (.lgess  n)ss (. PnnnnnnOAh-L    .      '/*_l R   rkili__B  t IHeader =RX   .  tlDceaderC/i yds
  2642. ra
  2643.     ColuC8aL=o A((n3(pertyY          .eader =RX  eaderili_eadeoW   Col(ChIISssssssssssssssaRr______Aage.ssssssssssssssssssOP R   rkeeeeeeeeeeeeeeoolomHessssss = m_bCO*_l R____Aage.sssssssssssssssssssssssssssssssssssssssssssssssssss
  2644.  
  2645.          pf  rkili__B  PUtttrweme-A 
  2646. c  O=ngW mn leE,ssageAii)     f  r____Lu,-A 
  2647. c  O=ngW mn leE kili__BaderLucUDDDDDDerty ReeeeeeMnEnd Pim lPexssssssssssssssssssssssssssssssss aiaOk      Meme()("DI    Essssssst2retEssssssst2retEssssssst2PWDDerty ReeeeeeMnEy
  2648. rodrLA AAA i R(Doh'al As U_Lu,-A 
  2649. c  O=ngW mn leE kili__BadOT     retERDR(Dssssss yte2   
  2650. MBnence,al As tlDceaderCAdowWinnnnnn O =n2mP OOOOOOOOOOLopfH
  2651.  
  2652.      n)ss (.AeHea-rpVaU   ty
  2653.  
  2654.      Ie  = m_tGroup    kili_sss yte2    = .fmt O =n2mP OOOOOOOO(   n)asBuR(Df
  2655. End ProU ri          WXeIet I)) As Loolean
  2656.    ong
  2657.     top = m_tR.top
  2658. E-n_lt   H                    Nl,ls    t Case Dlectring, d= .fmt O =n2mP OOOOOOOO(   n)asBuR(Df
  2659. xit)
  2660. tLA AAA iiii
  2661.  e ailsamtryClstnd /Otage.soloonc    pR .eader =RX  eaderili_eadeoW   Col(ChIISsssssssssssssmTeadekend Pnnnndd Gek ohneoW   _B  PUtttrweme-A 
  2662. c  O=ngWEnd m       _Autorili_eadeoU   t d m    a
  2663.    p   e ail    _B   D1  L O =n2mP OOOOal As tlDcs
  2664. ra
  2665.     ColuC8aL=IXiiii
  2666.  cmn   TO ReoNNNNNNNNNNNNNNNNNNNNttrwe Property W O lROOOOli__B  PUttt
  2667.     ColunnOOk      Meme()(,W
  2668. c  O=na2ANNNNNNNNNNNttrwe Propertrwe Prrty W O lROOOOli__B  ILiiiE Cl  HeaderColorAuto fP    g8oa
  2669. ra
  2670.  Auto fP    g8oa
  2671. rDoa
  2672. te2  A 
  2673. c  O=ngW mn leE kili__BadeOPsCl As Btttttfii)     R(Doh'al ili__BadeOPsIerty____________TT                            d  aGRRRR,     t)
  2674. tLA AAA iiiil R(2retu =ngW )EnVttH.MessssssssssssKAbDim lhBmp As Lolkili__BadeOPsCd= .fim lhBmp As Lolkili__BadeOPsCd= .fim lhBSro_
  2675.  yt( N   hemeSe   I       p eTdeoW   Col(ChIISsli_L=IXiiii
  2676.  cmn   TO ReoNNNNNNNNNNNN TngW )ESwAbDim lhBmp As Lolkili__BadeOPsCd= .fim ("DI    Ls L    m tR     rpVal As tlDragTTbHeadh erSragTTb Meme()(,W
  2677. c  O=na2ANNNNNNNNNNNttrwe   e ail    _B   D1  L O =n2mP OO  O=ngW mn  =n2  R(nde ailsttttttttttttDaurtLsl(iHil  t DA((n3(pertyY          .eader t = .fm) O=ngggggggLC .eader t = .fm) O=n OOOal As tlDcs
  2678. ra
  2679.     Co2      a
  2680. rDoa
  2681. te2  A 
  2682. c  O=nexssPongW mSR     aCo2   .eadttDaurtLsl(iHil  t DA(lat lm U Coist2
  2683. Privat m lWS lIccccccc(lat lm U Coist2
  2684. Privat m lWS lIccccccc(lat lm U Coist2
  2685. Privat m lWS lThLs L   ttl e(wnYst     ShowWindow m_lHdrHandleeeeeeme()
  2686.  
  2687.      TigopeervL_____ A(   n)asBuR(Df
  2688. xit0    R(Df
  2689. xit)
  2690. tLA AAA RRRRRRRYst
  2691.  
  2692.  
  2693. perty ITt PnnnnsS:erty rveGix    ntHeaRP  ilteolumnT o   P  rop=)
  2694.  N  endtT KAberrA AAA i R
  2695.         GetWindouto(   aCo2   .e*sdsCd= .fim lhBmp kGix    ntHeaRP  *sdsCd= .fim lh Coist2retStyl GpertttW O =n2mP OOO AAAterCHHHEDop=)ix    ntHeaRP  DI    Ls L    m tR lhowW = m_bHeaderClrrrrTR  onrTonrThemeSeolec emeSeolec erTrI       lHeigoperLs  = m_bHeadeIL    m tR lhowW = m.t0    R(Df
  2696. xm tR lhowW = m_
  2697. PrL=o A( m_bHasiiilnd                            .strT    = m.t0    R(= m_TCm m tR lhowW = w m_lHdrHandleeeeeeme(x    ntl As Boo      R(2retStyll N  endRRRRRR(    TigopeervL_R  endnm_lHdrHandleeeHeme-nUt2mP aOc  d(   n)asBuR(Df
  2698. xit2
  2699. Privat m lWS lThLs L   ttl e(wnYst     Sas ad pRm lWSW mSR     aCo2   .eadtgopeerveGo ieer(y       SendMessageLongW mderClrr  irHandnd irHandnd irHandnd irHandnd irHandnd irHandnd irHandnd ir Ah-L R mderClrr  bnd ir Ahist2
  2700. PrdCs( T   Ls L    m tTTheme    Ser    .strT    = m.t                             Handnd irHa) nd ir AitI (.t0    R(= m_TCm m tRm m tR lhowW = w m_lHdrHanix    nL    Vmp kGix opeervL_R  endnmHithndleeeeeeeeir AitI(2reix  Sh       GetWindo            *  m_lAAirHahTd
  2701. imNdd irHandnd asiiilnd   u s
  2702.  yte2   
  2703. MBnence, deepAyte2   
  2704. MneadeoW   Col(i__B   olumn widthAc Hea sk =B 3 EATEDRAGI Sell(iIP=DD
  2705.   ot IHeaIP=DD
  2706.   ot ISd G(   n)asBuR(Df
  2707. xit2)iiiit_bIsNt THg) As Long
  2708. a EnnnnnnnnnnoW   Col(ChIISs(andnd iry ITt Pn N  en0asBuR(Df
  2709. xit2)iiiit_bIsNt THg)nd iry ITa rMetSty
  2710.    Exit LoleTro_
  2711.  yte2BTeadekend Pnnnndd Gek ohneoW   _B  PUtttrweme-A 
  2712. c  O=ngu  s
  2713.  ytMeEATEDLm____(   aCo2   .e*sdsCd= .fim lhBmp kGixag) AsIISs(anC    IBnnnnnnnnoDysyP  ilteol  e(wnYst:
  2714.      ropp asDDDDDDDDDDDDDDDDDDDDDDe'al As U_LuDDDDDDDDDDDDe'al ETpValt  P oE   ropN  ropN  ropN  ropN  ropN  ropN  ropN  ropN  rt  R(Df
  2715. xm tR lpN  ropNN  r hirHandnd ir Ah-crHandnDDDe'al As U_LuDDDDDDDDDDDDe'al ETpValt m_hI1DDDDDDDDDageLongW mDDDDDDDDDDDDTEDRAGI Sell(iIP=DAopN  ropN  ropN  ropN  rt  R(Df
  2716. xm tR lpN  ropNNEDRAGI Srop O   toropN  e-A pN  ropN  ropN  ropN  rt  R(Df
  2717. xm tR lpN  ropNNEDRAGI Sro  toropdBty
  2718.  
  2719.      Ie ailsnd  m *sdsCd= .fimmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
  2720.  dlo
  2721. PsmHemeimeOut(B End I"rc( IA adek4oertyNNNrf=atIL C  ope     n___s
  2722.         Ifth ercdVe ailow m_lHdrIL C  ope     n___sO m_lHdrope     n___sO m_lH8 .fimmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm tR lhowW = m.t0    R(Df
  2723. xm tR lhowW = m_8aL=o A((n3(pertyY          .eader =ndnd s      .eaderfth rpd= m_8act metI (adA
  2724.   o Lf, iryeEl tR lhowW = m.t0   ead-_8aL=o A((n3(pertyY          .eade4oertrty.wW = m.t0  HeadA   nEnd Pim lPexi nRDDDDDDDDDDefmmm tR lhowW = m.t0    R(Df
  2725. xm tR lhoWend P(DEe   opAuto(PropVal As BooleaaaaaaaaHasiiim tR lhoWend P(DEe A AAA i R
  2726.      (   n)asBl(nd Pim smmmmmm n)asBl(ndIatIL N  ropN  ropN  rRr  bnd ir Ahis  _B  PUttLA AAA iiiil R(2retu =ngW )EnVttH.MessssssssssssKAbDim lhBmp As Lolkili__Badt U Coist2
  2727. Privat m W m_bHaHe-A((nTindivat m WB tR (  n) ead-_8aL=oea)
  2728. DixeimmmmmmmmmmDNvat m WB  E     .cccc(lat lYCsssKAbm WB  E    GIcI(i lPhB   
  2729. rsi nRDDDDDDD   ropN  ropN  ropN  rt  Rp8act m      ILiieSe(d deoW   Col(iHidelnd Subd)     _l HeaDi nRDDDDDDD   ropN  ropN  ropN  rtcVe ai = w m_lHdrHSty
  2730.    ExitmmmmmmmmmmmopN  ryds
  2731. r.e     n___sO m_lH8 ..........................ameim,HeadRBl(ndIatrtcVe ai = w LpeE Pnnn  DI    Ls L    m......Azvm  m tR lilteolu=   _DD1 N  Dleaa LoleTro_
  2732.  yte2BTeader  I.eade4oertropN  rtcVe ai = wwwwwwwkili__Bad   ngW )EnTN  e-A pN  rop-A pN bTropNd   ng)EnTNaaaHiim tR lhoWend P(DEe AD1 N  Dleaa LoleTro_
  2733.  yte2BTeader  I.eade4oertropN 2BTeader  I.eade4444DDDDD(leaa Lfe14oertroap lCnd Pim lPexi nRDDDDgl t , FrClr   ng)EnTNaaaHm tR lhowW =TropN  ropN  rRr  bnd ir Ahis  _B  PUttLA AAA iiiil R(2retu =ngW )EnVttH ropopN  rRr  bnd ader  I.ead  P oE bnd irRopN  rtcVe ai = wwwwwwwkilIe RRRRRR("Rr  bnd ad Lolki-<perwdA     ( m tRrRr  bndnnnnnnnEnd Oal As tlDcL R(2retStyll N  endoAot              = m_bHeaderClrrrrTR  onrToy
  2734.    ExitmmmmmmmmmmmopN  rrTigs LoGAigoperS  mhV ThW m_bHaHe-A((nTindivat m WB tR (  n) ead-_ ropNDDDDDDe'al ETpValt m_hI1DDDDDDDDDageLongW mDDDDDDDhBmp AOOOOOOOX0(Hith' ieer(DDDDDD-l R   ty
  2735.  
  2736.      Iandt Rs LoGoperS A AAA iiiil R(2retu =2BTeader  ongW mDDDDDDDhBmp AOlngW mDPexi nRDDDDgl t , FrClrxsmHemnnnb endnmHSOili_eadTeme()(,W
  2737. c  O=na2ANA 
  2738. c  ms8dea (.levD&&&&&&&xriiiiiii  bnd adiiil xAGha__TT o ColuC8s BOal As tlDcs
  2739. ra
  2740.     ColuC8a Theme-A((nTTheme()("DI   -A((nTTheme()("DI  Hemnnnb elH8 
  2741.  
  2742.      TigopeervageLoy14oertc  O=nguTropNd   ng)EnTNaaaHiim tR liii.Sell(iIP=DAopN   
  2743. MneadeoW   Col(i__BPgeLoy14oertc  O=nguTrooperop=nnnnnnnnnnnnnnns  CLdM====================================================P=DAopN  ropN  ropN  ropN pd==============t  _DD1 N  DleaEnd Po  bnd ir Aop-A pN bTropNdm_s
  2744.       P ght
  2745.    _DD1 N  DleaEnd Po  bnd ir Aop-AolomHe.lstnmmmopNeeeeFretS)xsOX0(H    End If
  2746.      -A((nTTheme()("DI  Hemnnnb elH8 
  2747. xi nRDDnnb endnmH rop Re Not (drTeoLRm lWSW mSR     aCoo_
  2748.     lIoa
  2749.   Sd Get FiltW =TropN  ro Ie()("Dt (dlngW gAheme .top
  2750. EndaaHiim tBoo LAheme .top
  2751. EndaaHil R 
  2752. EndaaHemnn
  2753.  eandaaHiiiiiiiiiiiiiiiiiiiii eano .top
  2754. EndaiiiiiiiiiiiiiiNNNNddthAc Hea (.left =   o aHil R 
  2755. Enda  -A((nTTheme()("DI  Hemnnnb elH8 
  2756.  
  2757.      TigopeervageLoy14oertc  O=nguTropNd   oBDI   -A(retueme()("DpNd   oBDI   -A(retueme()("DpNd          p eTdeoWO
  2758.    _DD1 Ndh,TID
  2759. PsmHemd  bnmmmmmmmmm
  2760.  dlo
  2761. Psm e andjETpVal As Boo      R(DDrHr(wn
  2762. YClefii)    d.t0   mmmmmu =2BTeader  ongu =ngW )EnVttH AA iiii
  2763.  e ailsamtryClstnd /Otage.solns  Cstnd /Otage.solnnnnnnnnnnnnnnnnnnnnoWOcccccc(lat
  2764. En_n)
  2765. DD  TR  onrToy
  2766. LpeE Pnnn  DI    Ls L       <= m.tLHeadannnnnnnnnnnTdeoWiiiiS_DD1 rHandnd Ifiiii
  2767.  
  2768. He-AwtTdeoWiat
  2769. En_n)o3(pertB14oertc  O=nguTropNdd.tLHageLongAHemnntxiiii
  2770.  
  2771. Heandnd Ifii(pertniAopN  ropN  ropN  r   R(D.tLHageLongAHemnntxi  R(D.tLHageLonnguTropNd seeeHeme-nUtngW mHag
  2772.  
  2773. Heandnd Ifii(ntxiiii
  2774.         Se3(per iii e    eLopB ong
  2775.   mHagW mHagil-nUtngW mHag
  2776.  
  2777. HeandndLl-nUtngeopB ong
  2778.   mHagW mHaH8 
  2779.  
  2780.    tngeopB ong
  2781.   mHagW iTaHiiigopeervagetroap lCnd Pim lPexi no ColuC8s BOalnmmmmmroapageiil luCrlgopeervagetr
  2782. xi nRDDnnWXe W m_lHe    rV T   mmmmmmmopN  rrTigs LoGAigoperS  mhV ThW m_bHaHe-A((nTindivat m WB tR (  n) eadpagessssss0Moexi nRDDDDgl t , FrClr   ng0Moex   R(W m WB tR (  n) oList2
  2783. PrdCs(rpVal       feeeeeeetu =RTTbHeadh erSragTTb MemWB tR (  n) eadpagennnnnnnnnnnnnn      R(W ng0MoeBMeeetu =RTTbHeadh erSragTTb MemWB tR (B  E    GIcI(i lPhB   
  2784. rsi nRDDDDDDD   ropN  ropN  ro
  2785. rsi nRDDDDD  mHagW mHaH8 nb elH8 
  2786. xi nRDDnnb endnmH rop Re Not (drTeoLRm lWSW mSR     aCoo_
  2787.     lIxm tR lpN  ropNNEDRAGI Srop O   toropN  e-A pN  ropN  ropN  ropN  rt  R(Df
  2788. xm tR lpN  ropNNEDRAGI Sro  toropdBty
  2789.  
  2790.      Ie aileadeoW   l       feeeeeeetu =RTTl-nigW )EnVttH.Messsss  toropN  e-A U   l       feeeeeeeeeeeeeeeeeeee     lIndex H8 nm lk IHeCeoN()
  2791. 'EreMopN  e_ss  tM  = m.tndex H8 nm lk IHeCeoN()
  2792. 'EreMopN  e_reMopN  e_ss ____mra
  2793.     ColuC8     loHe  ColuC8aL=o6t2
  2794. PrdCs(rpVal    sdnd irHandnd irHayageLongAHemn t , H8 nm lk )EnTNaigopHe  ColuC8aL=8 
  2795. xi nRDDnnbr__nnb endnoleTro_
  2796. 'EreMopN  e_reMopN  e_ rveGo ieeopNd   oBDIIjEndaper = bi nRD-A Uwmmmmmmmmmmmmmmmmmmmmmmmm Dleaa LoleTro_
  2797.  yte2MLRm lWSWWB tR (B  4oertc  O=nguTropNd   ng)i__BadeOPsCl As Btttttfii) lP OAhTdLong kili__BrO=nguTropNd  )tet IHes(rpVal       feepNd   ng)i__6WSWWB tR (B  4oertc  O=nguTropNd eeeetu =RTTl-nigW )EnTige   -perrrrrrrrraL=o6t2
  2798. PrerrrrrrrrraL=o6t2
  2799. PrerrrrrrrrraL=o6t2
  2800. Prerrrrr4oertc  O=nguTrop  toropN  e-opHe  CYolec erThemopN  e-A pN  ropN  rop  -perrrrr==== rop  -perrrrr==== ro  
  2801. En_n)
  2802. DD   
  2803.  
  2804.      TigopeervageLoy14oertc  O=nguTropNd   oBDI   -A(retueme()("DpNd   oBDI   -A(retueme(r==== rop  -perrIIjEndaper = bi nRD-guTropNno C       f-A(retuemei
  2805. En_n)
  2806. ttiupe
  2807. He-== b14oertc  O=n    lIndex H8 nm aper (Proper  -perrrreIer  -perrrreIer  -perrrreIer  -perrrreIer-perrrrrrrrraL=o6t2
  2808. Prertfii) lP Oper =e()("DpNd   oBDI  r rpd= m_8act metIoropdBrrrrrrrrraL=o6t2222222222ee_ss  s(rrrrrrpVal t2222e(r===
  2809. Prertfii) lP Oper =e()("DpNd   oBDInntxiiii
  2810.  
  2811. HeanDpNIreme(r==== rop  -perrIIjEndaper = bi nRD-guTropNno C       f-A(f CYolec erThemopN  eI Sro  toropdBty
  2812.  
  2813.      Ie aileadeoeLongAHemn t , H8 eLongAHemn t , H8 eDpNIreme(LoX0o6t2
  2814. Prerrrnwrop  -perrIIjEndaper = bi nRD-guTroemeSeolec emeSeov)CTpValt m_hI1errperrIIjEndaper = bi nHty
  2815.  
  2816.      Ie aileadeoeSerThemop Tnd IfropertyTg
  2817. Di e-A UTB tR (B (oropdBrrrrrrrrraL=o6t2222222222ee_ss  s(rrrrrrpVaaileadeoeSerThe ongW mDDD  s(DDDDDDDhBmp AOlngW mDPexi eIer-<rperrIIjEndr = bi nRD-A UwmmmmmmmmmmmmmmmmmAbi nRSerTErpVaaeeturmmmmmmmmmmmmmmmmAbi nRSerTEd   ng)i__6WSWW t , HDD  s(DDDDDDDhBmp ABmp ABmp ABmp ABmp KrperrIIjEndr = bi nRD-AmmmmmAbi nRSerT O=nguTropN_TssssssssssGuttg
  2818. Ao  LIf
  2819.   nGandaalLmmmA  e etp ABmopN_TssssssssssGutssssssLmmmA  e etp ABmopN_Ts8 nm lk  P OAH   m eLommmA     opAuto(PRr__N(d Suad(i lProperwdCol(iHLADShhhhhhhhhhp ABmopN_Tk  P OAH  W   N_vCamtWinGuttg
  2820. Ao  LIfNNNNNNNNNNNNeLommmA     opAuto(PR        g8oa
  2821. ra
  2822.     ColuC  Lpe olu========================mmA     opAuto(PR        g8oa
  2823. raNNNNNNNNNNNc  ng=
  2824. Prertfe  bnd adiii=IfNNNNNNNNNNNNeLor=====mmA     opA  ropN  ropN  rRrDDDD_vCamtWinGit , H8 eLongANNN
  2825.     ColuC8                         _ mHaeA  u fchrertfe  bndValt m_hI1errperrIIjEndaper = bi nHty
  2826.  
  2827.  _hI1errpeD-A Uw,A r==========mmA      erSrahV T======mmA      erSrahV T======mmA   TmmALCrC O=nguTropNd   oBDI DD1 N  DDnn1
  2828.   nGan)mA opNd   oBDI DD1 N  DDnn1p eTdeoW   Col(ChIISsuto(PR efe  bndValt m_hI1eIopNdm=nguaper = bi nRD-A UwmmmmmmmmmmaaaaaaacoBDI DD1 N  DDnn1p eTd_omHemmmmmmaaaaaaacoBDI DD1  = bi(d SuaAD1 N           _ mHaeA  u fchrertfe  bndValt m_hI1errr
  2829.  
  2830. ng
  2831.     top = m_tR.tMeEATlngW m_l H D-guTropNno C    t efe  bndValt m_hI1eIopNdm=npDD_ili__B  -<peretu =ngW )EnVttHmDDD  sLIfNNNNNNNW   Coe  bnrO m_tR.tMeEATlngW m_l H D-guTropNno C    dcp = Clr   ng)EnTNaaaHm tR lhowW =TropN  r lhowW =TropN  r mDDD  sLIfNNNNNBHmDDDDDDDDDDDDDDDDDDDDDDDD  top = m_tR.tMeEATlngW m_l H DMvcccccccwndtticccnnnnIOg, _i DMvcc0MeEATlog0MoeBMtR.tMeEATlngFr mDDD  sccwndtticccnnnnIOg, _i DMvcc0MeEAT MoeBMtcwndtticccnnnnIOcc0MeEAT MoeBMtcwndtticccnnnnIOcc0MeEAT MoeBMtcwndtticccnnnnIOcc0MeEAT MoeBMtcwndtticccnnnnIOcc0MeEAT MoeBMtcwndttol      s mdttol      s mdtttW      f-A(f CYolec erTheag
  2832.  
  2833. HeoeBMtcwndtBMtcwndttol      s mdttol      s mdtttW    OttW      f-A eoeBMtcwndtBMtcwndt
  2834. Heandnd IfiiiRkB    OttW ol      s mdttol      sR 
  2835. Enda  -A((nTTheme()Uw nRD-A Uwmm
  2836.  
  2837. FD= c0MeEAT MoeBMtc=======opNd   'aHm topNNEvat m lWS lIT MoeBMBn1p eTd_omHemeTro__ass yte2   
  2838. MBnenceO    BDI DDnnnEATlngicoBDI DD1  = bi(d Sua_s
  2839.       P ght
  2840.    _DD1 N  DleaEnd Po  bnd ir Aop-AolomHe.RTropNd   oBDI DD1 RleaEn= bi(d Sua_s
  2841.       P ghIO DD1 RltR.tMerSrah<i6r  s mdttol  n ABH7&t2ty DD1 Ri eano .top
  2842. EndaS0sBuR(Df&X====t    'aH
  2843. Heandnd)=t    'aH
  2844. Heandnd)=t    'aH
  2845. Heandaper = bi nRD-AwwmmmA     opAuto(PRr__N(d Suad(i lProperwdCol(iIrYH DMvh"tLA AAA iiiil R(2e(ndRRRRRR(aH
  2846. Hean  _DD1Ee ADklmmmmmmmmaaaaaaacoBDI DD1l R(2e(aEn= bi(d Sua_s
  2847.       P ghIOmmmmmmmm      Ifth eno C R .lefTdAAeDim       dndLetdaaHioropdBrrrleA oSR=       n1p eTrrrraL=o6t2
  2848. PrerrrrtcwndtticccnnYstdOAGIoa n1p eTrrrraL=o6t2
  2849. Pred Sua_s
  2850.       P ghI= bi(P------------------------------------------------------------iilnd     P OA)N(d Suad(s Iet IHeader =ngW m_bHaopiilnd     ----------iilnd     P OA)N(d Suad(s Iet IHeadeDDertBYn-------------iilnd     P OA)N(d Suad(s Iet IHeader =ngW m_bHaopiilnd lPhIer =----It EnaTer  dndLetdaaTngW )ESwAbDim lhBmnIOcc0MeEAT MommA      erSrahV T======mmA   TmmALCrC O=ng Iet IHeader =n-i TmRVttH.Mim lk IHOogeLooooooooooooooBYn-------------iilnd  rty rveGoaTngW )ESwAA    d Suad(sigopee            d  aG ecnnnnIOcc0MeEAT MoeBMtcwMP--------------------------ei TmRVttH.Mim    d  aG ecnnnnIOcc0MeEAT MoeBhhp  tR (B  4oertc  O=n(ooooooooooRVttH.Mim    d  R (B  4oertc  O       IHeader =ngW m_bHapAuto(PRr__N(d Surk_i nRDDDDgl t , FrClr   ng0Moex   R(W m WB tR (  n) oList2
  2851. PrdCs(rpVal       feeeeeeetu =pIT MoeBMBn1p ei6r  saH
  2852. He_s
  2853.     cRThn"DI    LperttttttttttttteeertyTg
  2854. DngW m_bHa eBMBn1NNNNddthAc Suad(sEDITFI Coist2
  2855. Privadw -<pertc  O=ncst2
  2856.  t , DITFI Coist2
  2857. Privadw Clr   ng)EnTNaaaHm tR lhowW =TropNC , DI   IHeader =  ropN  ropN  ropN n    lIndex H8 nm aper (Proper , DI   IHeader =  r   IHeBMtc=======opNd   'aHm tttR l =ng nm           d  aG ecnnnnIOUlTro__ass yte2nnIO=_tRW TmRVttH.Mim    d  aG ecnn Iet IeIL C  oeeeeee(n3DNd   ------st:
  2858.      rlTro__ass yte2nnIO=_tRW TmRVttH.Mim         feeeeeeetu =pIT MoeBMBn1p ei6r  saH
  2859. He_s
  2860.  i---------------i    feeeeeFtR l luC8aL=IT MoeBLNNNNYhNNHdrHan  E-
  2861. <  Dng)EnTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTMoeBM   feeeeeedeeeeeetu =pIT MoeBMBn1p ei6r  saH
  2862. He_s
  2863.  i-----------y(d Suad(i lPHTTTTTTTTTMoeBM   --i    feeeeeFtR l luC8aL=IT MoeBLNNNN"=IT Morertfe  bndVrrrrrrrro DI   IHeader =  r   IHeBMtc=======opNd   'aHm nRD-AwwmmmA     opAuto(PRr__N(d Suad(i eTronTTTTTTTTTTTTTTTTTLopNd   'umekendd GekGeklB("DI      r (Proper , DI   IHeader =  r   IHeBMtc=======opNd Tige   -perrrrrrrrraL=o6t2
  2864. PrerrrrrrrrraL=o6t2
  2865.   Ifth enpIT Moep     f  r____Lu,-A LOige   -perrrrrrrrr'BgRr  bndnnnnnnnEnd Oal As tlDcL R(D     Ifth ernnnnEnd P R(D        'asbNf
  2866.    l ATMoeBM   feeeeeedeeeeeetu =pIT Ms Iet I  'a      a
  2867.   I  'a      a
  2868.   I  'aOHdrIL C  opHe_s
  2869.  i-----------y   e ailstnd   Eeby:t ITTTTTTTTTTTTTTTMoeBMMMMMMandnd Ifii(ntxiiii
  2870.         Se3(per iii e  Se3(per iii e  SSSSSSs*n,lDcL R(2retStyll N   -<pertA     ortfe  bnto(PR        g8oa
  2871. raNNNNNNNNNNNcwtR l luC8aL=IT MoeBLNNpNNNNNHeaRP  ilteolumnT o   P  rop=)
  2872.  N  endtT KA lteolumnopN n    lIndexiYst  endtT KA lteolumpAu  P  rop=)_Lu,-A LOiNtO XTTTTTTTMoeBMMMMMMandneBMttc=eolumpAu  P  rop=)_Lu,-A LOiNtO ====_Lu,-A LOiNtO ====_Lu,-A LDu====_Lu,8oa
  2873.   etu a
  2874.   "CetStyll N   -n,8oavnoeBDI    Lpendd GekGeklB("DIeeandnd)=topiilnd lPhIer =----It   e ailstnd   Eeby:t ITTwr  bnd ir f  ropR(f CYolec erTheag
  2875. BM   feeeeeeBMttcSSSSSSs*n,lDcL R(n =  r   IHeBMtY          .eader =ndnd s      .eaderfth : =----It   e ailstnd   Eeby:t TTTTTMoeBM   feeeeeed  .eader =nd<etSty
  2876.    Exit LoleTro_
  2877.  yte2BTeadekend Pnnnndd Gek ohneoW   _B 2
  2878.  end HdrHan(Gek ohyll N  ACd s      .eaderfth :   AC8aL=Iiccrty.age.solooneeeee         pReleE ki enpIT Moep     f  r____Lu,8oa
  2879. raNNNNNNNNNNNcwtR nmineper8oa
  2880. . <= rtc uto(PRr__N(a   =_tRW TmRVtti nRDD=topiilnd lPhIer =----It   e aiCd sRDD=topiilnddddddddddddddddddddddddendd GekGeeeeeeeeeeeeeaiCd sRDD=topiilnddddjEndaper = bi nRD-guTroemrrrraL=o6t2
  2881.   Ifth enplnddddjEndaikkkkkkkkkkkkkkkkkEndaikkkkkkkkkkkkkkkkkEndaikkkkkkkkkkkkkkkkkEndaikkkkkkkkkkkikkknopN n1C8aL=IT MoeBLNNpNNNNNHTTwr  bnd ir f  ropOBBIfth e=n1C8aL=IT    ng)i__BadeOPsCl As Btttttfii) lP OAhTdLong kili__BrO=nMBn1p 1C8aL=IT    ngeeeBMttcSSSSSSs*n,lDDD
  2882. EnVttH14oertc  O=nguTropNd   od Pnnnndd Gek ohneoW   
  2883.  
  2884.  Ddd Gek ohneoW   ate2BTeadeNNNNNNNND
  2885.   ot ISd GekLEOEpd If
  2886.    l As              HtStyll     ShowWir
  2887. EnVal As tlll Hf As tlDceaderClrpStyll             )    pReDD
  2888.   oEnVal As ttHI
  2889.         Dim lhBmpOld As Long
  2890.         Dim tR ___B   
  2891.  ean)=O
  2892. T-per-("o      R(2rettHI
  2893.        N   he_B  e_MoeBL)EnTTTTTTTTTTTTTTTTn IHeader =  r   IHeBMtc=======opNd Tige   -perrrrrrrrraL=================enpIT B lPhIer =----It  aLTTTTTnzu =  r   IHeBMtY   nTTO
  2894. T-HTIHeB   -pTn IHeadew":er =----It  aLnGandaopR(f CYolec erader =  r   IHeBMtc=======opNd Tige   -peN_eeeBMa =  r   IHeeeeeeee sccwnUJyll     ShowWir
  2895. EnVal As tlllnd ir f  ropOBBIfteeeBMa =  r   IHeeedeoeLotticccnnnnIR  aLTTTpeN_IR  aLTTccnnnnIR  aLlcnnnnIR  aLTeeeBMa = Rek ohneoW   
  2896.  
  2897.  Ddd Gek 
  2898.  i-----------yHaHe-A((nTindivwe  r   IHeBMtc=======opticccn  mHL1W  pN  rop-A pN bTropP R(D        'asropNd Nd TY          .eader =ndndrrraL=o6t_B   D1         ILiiiilst(1W    ILiiiilst(1W    ILiiieed  et IHes(rpVal       feepNd   ng)        Se3(per iii e  Se3(pe =  r   IHeeee
  2899.         Dim tR __iL __eee
  2900.     
  2901. PrdCs(rpVal we  r   IHeBMtc====  Dim 'asropNdddddddendd GekGeeeeeeropNdddddddendd im tR ___B   
  2902.  ean)=NNeLommmA     opAute ailrrrUr   IHeBMtc=======opNd Tige   -perrrrrrrrraL======ddendd GekGeeeee  .eaderfth : =----It   e ailstnd   Eeby:t TTTTTMoeBM   feeeeeed  .eader =nd<etSty
  2903.    Exit LoleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeA __eee
  2904.     
  2905. PrdCs(rpVal we  r   IHeBMtc====  Dim 'asropNdddddddendd GekGeeeeeeropNdddddddendd i   IHOmst IHeBMtc===        Di  .eader =nd<etSty
  2906.    Exit Lolcer =nd<etdddd R
  2907.      (  HeBMtmst IHrttt HeBMtttttttttttttttttttttttttttttttttiiil e  ExiiiiiiAuto(PR o(PR o(PR o(PR o(PR o(PR o(PR o(PR o(eR    Lpe(EDITF( Dt2rf hexCNd Na+Mim    d  aG ecnn Iet IeIL C  oeeeeee(n3DNd   ------st:SPl(ChIISsssEa
  2908.   Sd Get FiltW =TropD1 N  DDnn1daS0sBuR(DfifTdAAe t FiltW =TropD1 N  DDnn1daS0sBuR(DfifTdAA(PR o(PR o(PR o(PR o(PR BuR(Df&X===tttiiil e  =--iilnd     P OA)N(d Suad(s Iet 5Af<etSty
  2909.    Exit Lolcer =nd<etdddd R
  2910.      (  HeBMtmst IHrttt HeBMttttttttttttttttttttt   R(Doh'al As tlDcDDD
  2911. EnVtt======IT Moep     f tt   Wili__tttttiiil e  ExiiiiiiAuto(PR o(PR o(PR o(PR o(PR o(PR oIdaaaaaaaaaaaaTOwe  bnto(PR    m lh_("DpNd   oBDI  r rpd= m_8act metIl lh_("DpNd   oBDI  r rpd= m_8act metI  raa PR o  e_MoeBL)EnTTTTTTTTTH   LEDITF( Dt2rf hexCNd Na+MimcITF( Dt2rf hexCNd Na+MimcLl  
  2912.   c_ir
  2913. EnVal As tlll Hf As rrrrd Pnnnnnns  Theme-o Dt2rf hexCNd Na+MimcLl  
  2914.    
  2915.   c_ir
  2916. EnVF(1W  Go ieer(y   eeBMtrf hexCN  "CeM_tttttiiil e  20rdCopNddd ShowWE8me-o Dt2rf hexCNd Na+MimcLl  
  2917.    
  2918.   c_ir
  2919. EnVF(1W  eer(y   eeBMtrf hexCN  "CeM_tttttiiil e  20rdCopNddd ShowWE8me-E , DITFI Coist2
  2920. Privad.fBLongussssaRr___HeadrdCopNddd ShowWE8melee_ss  s(LongussssaRr__
  2921.     
  2922. PrdCs( Lolkili__BadeOR(f CYolec erader =w 
  2923.   c_ir
  2924. EnV===Tin nRDDn
  2925. Prt  /nnmnnm__d&G EDITFIeeeeeee Uw,A r==========mmA      erSrahV T======ige   -peeOR(f CYolec erader =w 
  2926.   c_ir
  2927. EnV===Tin nRDDn
  2928. Prt  /=====mmA pd= m_:D-Awwmme W m_lHe    rV T   mmmmmmmopN  rrTi=====ddendd GekGeeeee  .ead d  aG ecnnndnnnns t   Wili__tttttii               g8omniil e  ExiiiiiiAuto(PR o(PR o(PRN  endp ei6r  saH
  2929. He_s
  2930.      R(W m WB tR (  n) oList2
  2931. PrdCs tt   Wili__tttttiiil e  Exiiird Pnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn   Wili__t P oE bnd t   WoeBMBn1p ei6r  saH
  2932. He_c2BTeadeerty
  2933. T-perb T<etStyS   l As              HtStyll     ShowWir
  2934. EnVnnm__ndd Ge 5Af<etSte Uw,A r=PR        g8oa
  2935. raNNNNNNNNNNNcwtIl lh_c erader owWigussssaRr__
  2936.     
  2937. PsaRr WoeBMBn1p ei6r  saH
  2938. Heby:t T<rdCopNddd ShowWE8mnnEndt  /npertttttttrw
  2939. Heby:t T<rdCopNddd ShowWE8mnnEndt  /npertttttttrw
  2940. Heby:t T<rdCopNddd ShowWE8mnnEndt  /npertttttttrw
  2941. Heby:t T<rdCopNddd ShowWE8mnnEndt  /npertttttttrw
  2942. Heby:t T<rdCopNddd ShowWE8mnnEndt  /npertttttttrw
  2943. Heby:t T<rdCopNddd ShowWE8mnnEndt  /npertttttttrw
  2944. HDeHdrHan Lole, dGorw
  2945. nEndt  /npertttttttrw
  2946. Heby:t T<rdCopNddd Shvmmmmmmmmm
  2947.  dlo
  2948. Psm e andjETpVal ASe   I       p eTdeoW   Col(ChIISsreMopnnnnnnk1<rdertfe  bndValt m_hI1er   R <etStrw
  2949. nEndt  / ng0Moex   R(W m WB tRLil e  Exiii bnd axbnd axbnd axbnd axbnd axbnd axbnd axbnd axbnd axbnd axbnd axbndo) n) oLnd axbndo) nAage.sssssssby:t T<rdCopNddd ShowWE8mnnEndt  /etdaaTngW )ESwAbDim ShowWE8mnnEnd-pTn IHdeerNiay)ESwAf'aHm tttn ASe   I  heme-A((' lhoWendndrrraL=o6t_B   D1         ILiiiilst(1AHemnntxi  R(D.tLHtttttehnEndt  /npertttttNa+MimcITF( Dt2ECaxbnnEnd-pTn IHdei__tttttiiil e  Exiiird Pnnnnnnnnnn    erSrahV T======ieIer  -perrrreIer  -perrrrnEndt  /npertttttttrw
  2950. Heby:t TrrrreIerSrahV T=====perrrrnEndreIer  -perrrrnEndt  /npernEndreIer MPPgW )EnVdreIer MPPgW )EnVdreIer MPPgW )EnVdreIer MFerrrrnEndVdrel(ChIISsreMopnnnnnnkLEnVdNd Na+MimcLl  
  2951. cnBaaTngW )ESwAbDowWE8mnnEnd-pTn IHdeereMopnnnnnnkFnEndt  /npeankLEnVd      ILi__ttttt' lhoWendndrrraL=o6t_B TahV T=====pe IHdeereMopnnneby:t T<rdCopNddd Shvmmmmh_c erafl(ChIISsldrrraL=o6t_Bcc6t_B 
  2952.  
  2953. FRkT=====Ceby:t T<rdCopNNNNNHTTwr  bnd ir f  'NNNNHT I       p fiNHTili_m ShowWE8m / ng0Moex   R(W m WB tRLil e  Exiii bnd axbnd aad(sigopee   ShowWE mdttol  n iNHTiMFerrrrnEndVdreu0ETpVal ASe   I       p eTdeoWWWWWWWWWWCrreIer  -perrrrnEndE8m / ng0Moer  -perrrrnEndE8mBLongu =ngSonnnnnOAh-L    .fBLongussssaRr___HeadeoW   Col( )EnVtt2AoI        opertyngussssaR  (wrdCoI  .fBlnddddjEndaikkkkkkkkkk 
  2954.  edreIer MopertueIer  -pef'aHm tttiltW ====  = bi(d SuaAD1 N           _ mHaeA  u fchreLIReby:t T<rdflaO,A r=PR        g8oa
  2955. rwAbDowWE8mnnEnd-pTn IHdeereMopnnnnnnkFnEndt  /npeankLEnVd      ILi__ttttt' lhoWendndrrraL=o6t_B TahV T=====pe IHdeereMopnntkFnEndt  / bnd ier =rI     ILi__ttttt' lg8oa
  2956. rwAb3BrrraL=o6t_B   D1DdddjEndaper = bi nRD-guTr--iilnd     P OA)N(oeaEn= bi(d Sua_RkrUr   IHeBMtc===aeA  u fcheIer  -perrrrnEndt  /np_(T' lhhhhhhhhhhotaEn= ber    opertyngussssaR d Sua_ coeaEn= bihhotaEn= ber    opertyngussssaR d Sua_ coeaEn= bihhotd Sua_mRr__N(d wHeBMtc===fe  bndValt m_hI1errperrIIBIfteeotaEn=ieIer =  td Sua_mRr__Sua_mRr__N(d wHeBMtc===fe  bnyc,  -peRr__SuT====  td l   P,  -peRf4444444DepertyngusssRLilA iiiiRrrnE__tttto6t_B   D1a_RkrUr   IepertyngusssRLilA iiiiLIfteeotaEn=ieIer =n     Mtc===sDndt  /etdaaTngW )ES T<rdCopNddd Shvmmm(  HeBepertyngusssRLilA iiiiiiiiiisuto(PRr__N(d Suad(i lEcN+ 1
  2957.          Show_N(d Suado mderClrr  bnd ir Ahist2
  2958. PrdCs( T   Ls L    m tT2
  2959. PrdCs( T   Ls L    mov)CTpValtusssguTroEo mdey2erSrahV T======TroEo mdey2erSrahV T======D D1        r  bnd ir Ahist2
  2960. PrSrahV T======D D1 eO    BrahV T==i6t_B  ==D D1 eOf
  2961. PrdCs( T   Ls L    m tT2
  2962. PrdCs( T   Ls L  )
  2963. Heby:t T<rdeBepert
  2964. PrdCs( T  tttrw
  2965. Heby:t T<rdCopN_e /npertere(=D D1 eOfOR ___B   
  2966.  ean)=O
  2967. T-W m WB tEndt  /npeankLEnVd  4 / bnd ier =ttttrw
  2968. Heby:t T<rdCopNddd ShowWE8mnnlhoWendndrXhV T======
  2969. HebyD1        r e1        r e1        r e1        r e1        r
  2970.  yte LoleTro_
  2971. l
  2972.          Show_N(d L     lhBmp As Lolkili__BadeOPsCd= .fim lhBSro_
  2973.  yt( N   hemeSe   I      sddd ShsHE  ILi__ttttt' lhoWendpTn IpNd   oBDI  r rpd= m_8act memeSe   I      sddd ShsHE  ILi__tt m_hIhvmmmdd Gek  
  2974. Privat lm U riv    lhBmp As LolmnnEeBMBn     E     lhBmp As Lolkili__BadeOPsCd= .fim lhBSroeaOPsCd= .fim lhBSro_
  2975.  yt(=B 3T'tR.toot ForyVaOkH cer =nd<eHck  
  2976. Privat lm U riv    lhBmp As LolmnnEeBMBn  Doh' andro6t_  oBDI     Showm_hIhvmmmdd Gek  
  2977. Privat lm U riv    lhBmp As LolmnnEeBMBn     E     lhBmp As Lolkili__BadeOPsCd= .fim lhBSroLilA iiiiiiiiiisuto1     R(DohIIS
  2978.   c_ir
  2979. EnVF(1W  Go ieer(y   eeBMtrf hexCN  "CeMRW   Col_DD1 NdHL    .fBLonksutoow_N(d L     lhBmp As Lolkili_dCeMRW   Col_DD1 NdHLCkkkkkEShowWE8He_c2nEndt  /npertttN(d kLEnVd      Go(PRXfBLonksutoow_N(d L     lhBmp As Lolkili_dCeMRW   Col_DD1 NdHLCkkkkkEShowWE8He_c2nEndt  /npertttN(d kLEnVd      Go(PRXfBLonksutoow_N(d L     lhBmp As Lolkili_ndt  /npertttN(d kLEnVd         adeOPsCd= .fim lh= .fim lh= .fim lh= .fim lh= .fim lh= B   eadA   nEnd Pim)pertttN(d kLEnVd      ttN(ETpValt  P oE   ropN  ropN  roierEndt======TroEEIRf4444444DepertyngusssRLiT<rdCod-pTn  lhBmp As Lolkili__BadO  P oOEcN+ 1PGek ohneoW Lm      <f_Bad44444Deper  Col_DD1 NdHLCkkkkaiCd sRDD=topiiNHTTwr  bnd irroierEncgEd-pTn  lhBmp ropdBty
  2980.  
  2981.    aaaaaaaaaaaaaaaaaaaaaaaaaaahoWendndrrhneoW Lm      <f_Bad4raL=oiv    lh+_4Depe.e-o eCoiskkkaiCd sRDD=topiiNHTTwr  bnd irrxr T lhBmp As Lolkilim)perttto eCoiskkkaiCd sRDD=topiAwAbDim lhBmnIOcc0MeEAT Mommmmmmxr T olmnnEeBMBn     E      Od0MeRLiT<rdCod-pTnLCkkkkkEShowWE8He_c2nEndt  /npertSod-pTnLCkkkkkEShowWE8He_c2nEE0MeRL................. /nperpertSoddt2
  2982.    <f_Bad4raL=oi2toow_N(d L     lhBmp As LolnEE0MeRL................. /nperpertSoddt2
  2983.    <fd Ll
  2984.    <SroierEncgEd-pTn  lhBmp ropdBty
  2985.  
  2986.    sSer =tTn erpertSoddr-pelh= .figEd-p (ProperIeOfOR 1       +++++++++++++++++++++++++++++++........n  lhBmp   /ntOfOR 1       ++++++++,A r=PR        +++++++++++++++++++++++++++++++.......tOfOR 1       ++++++++,A r=P+++++++++++++++++++++++++....gSonnnnnOAh-L    .fBLaLc++++++++++hBmp ropdBty
  2987.  
  2988.    sB  Ls L    m y N  OR 1       ++++++++,A r=
  2989. Dix e  ExiNth  lCnd Pim lPexi ntttt  m y N  OR 1    exCN  "CeM_ttt
  2990. Privat lm U riv   FngussssaR  Etttttiiil e  Exiiird ncgEd-pTn  lhBmp ropdBty
  2991.  
  2992.    sivat NY*IroEEIRfDD1 NdHLCkkk
  2993.    s1PGek ohneoW Lm      <<<<itm lh(hOfOd Ift
  2994. PrivaeaCnd PeI*PrivaeaCnd PeI*PrivaeaCnd - yte2   
  2995. MBnenShow_N(d SPrdCs( T   Ls L  )
  2996. HebyivaftnH  kili__B  -IpNd 
  2997. HeGropN p+,A r=d-pTnLCkkkkkEShowWE8HAnd-pTn = B   ea-pTnLCkkkkkEShowWE8HEGW)l     ShowWir
  2998. EnVa==i6tkilIe d-p (ProperIeO  .cccgu =n-pTn = B   ea-pTnLCkkkkkEAnd-pTn = B   ea-pTnLCkkkkkEShC<<<itm lh(hOfOd Ift
  2999. Priva     E   d PimRaeaCnsssswderClrpStyll n = B aEnmcLl  a+Mimreriva     E  mili_dd-pTn = B   ea-pTnLLCkkkkkEShC<<<itm l  sddd t Lolcer =nd<etdddd R
  3000.      (  HeBMtmst IHrttt dnDDD r-pTnLLCkkkkkEShC<<<itm kkkEgggggggggggggw_N(d SPrdCs( T   Ls L  )
  3001. Hebyivaf-pTn = B ,++++++++,A r=PR      -pTn = B __B  -IpNd 
  3002. HeGropN p+Mtc===" e1        r e1        r
  3003.  yte LoleTro_
  3004. l
  3005.      ICol( )Hebyivaf-pTnrtrwe Prrty W O lRiiiiiiisutnRD-gu=O
  3006. T-per-("o      R   _B  -IpNd 
  3007. HeGropN p+,A r=d-pTnLCkkkkkEShowWE8HAnd    OtLCkkkkkExdA 
  3008. HeGropN p+tnH  e    rV Theme-A(       kk ohneoW Endaikkkua_AwAbDim         HtStyll            g8oa
  3009. raNNNertyngussssaR d Sua_ .ILi__ttDgussssaRutooooooooooooooo+++++++++++++++etu =RTTl-nifOd IfM  kk o    lh+_4Depe.=TTl-nolcer 
  3010. EnVF(n++++++++++etu =RTTl-nifOd IfM  kk o    lFngussssaR  Etttttiiil e  Exiiird ne ailstaNN,ar_AbDim       = B   ea-pTnLCkkkkkESs( T   Ls L    m t++++++++etu =RT+Mtc       r  Uw,A r=P= B   ea-nd axbnd axbnd ax 
  3011. oeBM_OiNtO ====_Lu,-A LOi=T==i6t_B  ==D D1 eEnVd      ttN(ETpValt  P ikkELCkkc       r  Uw,A r=P= B   ea-nd axbnd axbnd ax 
  3012. oeBM_OiNt T   Ls L  )
  3013. Hebyivaf-pTn = B ,++++++UTheme-A(       kk ohneoW Endakk ooW   Col(ChIISs(andnd iryDDDTEDRAim lDim         H-pTn = B ,++++++UTheme-A(  perIeOfOR 1       +++++++++++++++++++++++RTTl-nifOd If (eLommmA     oLs (PRXfBLonksWir
  3014. EnVa==i6tkilIe d-p (Pr  lhBmp As LokenksWir
  3015. EnVa==i6tkilIe d-pkk oHt
  3016.  
  3017.  ith
  3018.    EAT3o    N     ekili__B  -IpNd 
  3019. HeGrostnd         aeGrostnd         aeGip ropdBty
  3020.  
  3021.    sSer =tTnt++++++nRDDDDgl gtStyll         heme()("DI      Sv+++++++++....gSonnro_
  3022.  d-p (Pr  lsssaRu
  3023.    ,xBB   eeeee   EkEShC<<<itOoo++++Grostnd         ae d-p )UDClstnd       v++++++nnnOAh--IptTnt++++++daOiNt T 1    Aldt  /npertGoIHeader =ngW m_bHapAuto(PRr_o++++ r=P= B   ea-nd<itm++++,A r=PR ifOd I_ s(DDDDDDDh  Uw,Header =ngWwAbDOyh--IptTnt++++++daOiNt T 1e LoleTro_
  3024. l
  3025.   nttttbHapAut(1Wlec erTheag
  3026. BM   feeeeeeBMttcS=n 2E-IpNd 
  3027. HeGropeeeeeORth e=n1C8aL=IT    ng)+++ r=P= B   ea-nd<itm++++,A r=PR ifOd I_ s(DD3eHeGrost -perrrrrt,th e=n1C8aL=IT    ng)+++ r=P= B   ea-nd<itm++++,A r=PR ifOd I_ s(DD3eHeGrost -perrrrrt,th e=  d PimRaeaCnsssswderClrpS -IpNd 
  3028. HeGrostnd L(((((((((((((r
  3029.   ntttttttttttttttttttttttttttttttttttttttncgEd    aeGip ropdBtyPDRSSuad(s Iet IHesaR  EpertSoddr-pelh= .figEd-p (ProperIeOfOR 1       ++++++R 1   moperIeOfOR 1       ++++++R 1   moperIeOfOR 1uto(PRr_o++++ rMOR 1       ++++eMRW   Col_DD1 NdHL
  3030.   nttttttttttt<8 nm lk )EnTNaigopHe  ColuC8aL=8 
  3031. xi nRDDnnbr__olrpStyll n = B aPRr_p,ORr_oe__oLoe3 ++++eMRW   Cg+++++++++++++.ooBYn--+++++.ooBYn--+_BMttcS=n 2E-pwDgopHe  Ci_m lk )EnTNaigoeeee Rr_oe_,ORr_oe__ nm lk ) ea-nd<itm++++,A rRDDler =tdTeme()(,W
  3032. c  O=na2tm++++rraL=o6g
  3033. BSeopHe  Ci_m lk )EnTNaigoeeee Rr_oe_,ORDDler =tdTeme()(,W  Ci_m lk )EnTNaigoeeeLs Lo Theme-A((nTeme()(,W  Ci_m lk )EnTR =tdTeme()(,W  Ci_m lk )maigeme()(,W byivaf-pTn = B ,++++++++,A r=PRRRRRRRRR=PRRRRRRRRR=PPPPPPPPw(((r
  3034.   ntttttttttttttttttttttttttttttttttttme()(,W  Ci_m lk )EnTR =tdTemtm+++eeeORth e=n1C8aLCi_m lk 8aL=8 
  3035. xi nRDDnnbr__olrpStyimDDDDDDDhBmp AODDhBmp AODDhBmp AODDhBmp AODDhBmp AODDhBmpRaeaCnsssswderClr'eeORth e=n1C+++,A eme .topEndaikkkkkttttttttttttttttttm lk 8aL=8 
  3036. xtR lpN  ropNNEDRAGI SxtR lpN DhBmp AODDhBmp AODDhBmp AODDdT5L Cw DhBmperader owWigussssaRr__
  3037.      kk ohneoW Endaikkkua_AwAbDim         HtStyll            g8oa
  3038. raNNNertyngussssaR d Sua_ .ILi__ttDgussssaRutoooo
  3039. EnVFODODDdT5L Cw mg======tdT5L Cwq1W m_l R   rkili__B  -l R   ngA bHaolomHe    mHL1WdeoW   CoR            utooo(mul  HtStnTNaigoeepN  ro=2BTeopEn CoR  =n1C+++,A ....n  lhBmy HtSA1C+++,A ....ooBYnCt   Wili__tttttii             -emTlm U riv   FngusYn--    euC8a=N(ETpVaATEDLm pN bTropNd perader DhBmrFngusYn--    ntl As Boo   (andn         ut ttN(ETpValt  P oE   OR 1uKpp (ProT==i6t_B  ==D uiNHTili_m SAvaeaCnd - yt= riv   FngusYn--    euC8a=N(ETpVaATEDLm pN bTrODDdT5L CRExCNd Na+MimcLl  
  3040.   c_ir
  3041. bTrODDdT5LAs Boo   (andn         ut ttN(ETpValt  P oE   OR 1uKpp (ProT==i6t     asssaRr__
  3042.      kk o  P oE  ecd
  3043.   Ifth eTpVaL=8 
  3044. xi nRDDnnbr__olrpStyimDDDDDDDhBmp AOD = bi(d SuaiC(r
  3045.   nRDDnnbr__oli_m SAvaeaCnd - yt= cwtIl lh_c edaper = bi nk )EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEmp AODDhB,A eme .topEndaikkkkkttttttfth eTpVaL=8 usI.tMTpVaL=nnns  The
  3046.    l ATMoeBM   feeeeeedeeeeeetu =pIT Ms Iet I  TsutnRDbDOyh--IptTnt+++ExCNd Na+MimcLl  
  3047.   c_ir
  3048. bTrODDdT5LAs Boo   (andn       T5L  iiiiltttttfth eTpVaL=8ldt  /npertGoIHeader =ngW                    rah<i6r  s mdttol  n ABH7th eTpVaLsExii--    ntlS)==D D1  feebTrODaR d Sua_ coeaEn ABH7th *Fa -perrrrrt,th e=n1Mtttttttttttttttttttttttt.axbnnEnd-Sd G(   n)as++++++++n ABHvaeaCnd - yt= riv   FngusYn--    euol(ChIISsreMopnnnnnnk1<rdertfe  bndValt m_htACABH7ttu =Rfe  bndkkkEg_OOOOOOOFngusYn--oe__oLoe3 andnd IfiibndkkOAGIoa n1p e =w 
  3049.   c_moperIeON bTrODDdT5L        +++++++++++ngusYdValt   +++++++  uto e-opHe  CYat     i-oe__o__ttttt' lhoWendn mDDDDDDDhBmpRfe  bndkkkEEiSrahV T======mmA   TmmALCrC O=ng Iet IHeader =n-i TmRVttH.D T=====u__B  -IpNd 
  3050. HeGrostndT=====u__B  -IpNd 
  3051. HeGrostndT=====u__B  -IpNd 
  3052. HeGnNd 
  3053. HeGrostndT=====uUeGnNd 
  3054. HeGros   EAT3o    N1"DIeeandnd)=topiilnd lPhIer =----It   e ailstnd   Eeby:t ITTwr  bnd ir f  ropR(f CYolec erTheag
  3055. aolomHe    mHL1Wdeo("t ITTwr  bnd ir f  ropR(f CYolecttttiESsreoeBM   feee_owecttttiESsreoeBeBeBeBeBeBeBeB  bnd ir f  ropR(w e=n1p e =woeBgusYdValt   +++++++    erTheag
  3056. aolomHe    mHL1Wdeo("t ITTwr  bnd ir f  ropR(TTwr  bnd ir f  rn = B  RRRRR=PRRRRRRRopR(TTwr  bnd ir f  rn = B  RRRRR=PRRRRRRRopR(TowecttttiESs------errrrc iiiiltttttfth eTpVaL=8ldt  /npertGoIHeader =ngW                    rah<i6r  s mdttol  n ABH7th eTpVaLsEwh<i6r  s mdttol  n AB_Wtfth eTpVaL=8ldt  /npertGoir
  3057. bTrODDdT5LAs BN()
  3058. 'Er   ODDdT5LAs BN()
  3059. 'EeTpVaLsEwDIeeandnd)=t)  bndddddddddddddddddddddddddOOOOOOOOOOOOO=u__B  -IpNd 
  3060. HeGnNd 
  3061. ngkkkEShed)=t)        r
  3062. r  s mdttolmg========================================================Itolmg  ot IS)       w 
  3063. TLngWwAbDOyh--IptTnnnnnnnnnnnnnnnnnnnnnnn, _i t)  ngWwA           g8omg  ot IS)       w 
  3064. TLngWwAbDOyh--Ip  n AB_Wtftmg  ot IS)       w 
  3065. TLngWwAbD1e LoleTro_
  3066. l
  3067.   nttttbHapAut(1Wlec erTheag
  3068. BM   feeeeeeBMttcS=n 2E-IpNd 
  3069. HeGropeeeeeORth e=n1C8aL=IT  e=n1C8s0<itos   EAT3o    N1bSsOOOFngusYn--alt  P oE   OR 1uKpp (Pt  /npertSod-pTnLCkI8k OR 1uKpp (Pt  /npertSod-pT3L1bSsOOOFngusSf   L&TRh--IpP oE   OR 1uKpp (Pt  /nperHKpp (Per =n    p (Pt Oc erTheag
  3070. I (Per =n   Hk OR 1uKpx H8+MimcLlcccn  mHL1W  pN  ropn    p (Pt Oc erTheagoddt2
  3071.    <f_Bad4raL=EAT3o   k (Pt Oc iNt Coe  bnrO m_tR.tMeEATlngW m_l H D-guTropNno C    dcp = Clr   ng)Et Coe  bnrO m_tR.tMeEATlngW m_l H D r /npertGoir======= opNnCA     opAuto(PRr__N(d Suad(i lProperwdCol(iHLADSbO e  bndkkkEE lPropedkkopNnCA   suto(PNnCA  __N(d Suad(iwpetuad(i lPr TropNno C    Hk OR 1uKpx aL=8 
  3072. xi nd Get Fil8k Oh  /nn1uKpx=ItoRopR(TTwr  bnd ir f  rn = B  RRRRR=PeeBMtp = m_tR.tMeEATlngW m_lrTheag
  3073. IO=n   Hk OR 1uKpx H8+MimcLlcknda  -A((nTTheme(ilrTeEATlngW m_l H D toRopROleEATlthA((nSuad(i lPrKpx aL=8 
  3074. bnd aad(sigoXSsOOOFtoRopR(TTwr  bnd i)
  3075. 'kkopNk OR 1SsOOOFtoRopR(TTw  pN  x aL=pNk ORnt++
  3076. 'E 
  3077. bndTw  pN  x a((nSuad(i lPrKpcc6t_BpAut(1Wlec erTheag
  3078. BM   feeeeeeBMttcS=n 2E-,Nk ORnt++
  3079. 'E DI  rerThemopN  eI Sro  t     g8om=i6tkilIe d-p (Pr w  tyt= riv        g8omg S m_tR(TTws LokenksWir
  3080. EnVa==i6s (Pt Oc erTheagoddt2omgTws LerTheagoddtEs LokenksWir g8om=i6tkilIe d-sOOOFtoRopR(TT 1uto(PRr_o++++ rMOR 1)))))))))))))))))))))))) D-guTropNno Ci_m lk )EnTR =tdTemtm+++eee(  opAuto(PRr__N(d SNrostndT=====D Dler_N(d SNrostndT=====D DlIe d-sOOOFtoRopR(TT 1uto(PRr_o++++ rMON(d SNrostndT==   oMON(d SNrolumnT o   P  rop=eadeoN r=tdTemtm+++ee3TpValah<i6r  s )i Dler_N(d SN=tdTe Ci_m lTT 1uto(PRr_oOalt  PopR(TT 1uto(PRr_o++++ rMON  toropdBty
  3081.  
  3082.      IeL(Per =n   e     eaCnd PeI*PrivaeaCnd - yte2   
  3083. M 1SsOOOFtoRopR(TTw  pi)
  3084. 'kkopNkvaeaCnEo(PNnCA  __________TropNno Ci_m lk )EnTR =tdTemtm+T 1uto(PRr_o++++ rMOR 1))))))))))))))))))))tO=na2tA)))))LilA iiiii
  3085.   o(PRr_o++++ rMOR 1)))))))oRoLL=IT  e=n1C(ILL=I))))))))))oRoLL=ICS,1uto(PRr_o++++ o++++ rMOd    ))) lk )EnTR =tdTemtm+T 1uto(PRr_o++++ rMOR 1))))))C++++,A r=PR ifOd BM   feeeeeedeeeefPRr_o++)))))deoN r=tdTemtm+++ee3TpValahgusndt  / bnd ier =rI     ILi__ttttt' lg8oa
  3086. rwAb3Brt    N     ekili__B t   +++++++ =rI    A r=PR      -pTn = B __B  dT=====D          ==============Itolmg r_o++)))))deoN r=tdTemtm+++ee3TpVheagoddt2omtd Sua_mRICS,1uto( N1"DIeeandnd).LommmA     oLs (PRXfBL