-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathucvhGrid.ctl
13895 lines (12007 loc) · 452 KB
/
ucvhGrid.ctl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
VERSION 5.00
Begin VB.UserControl ucVHGrid
BackColor = &H80000005&
ClientHeight = 3600
ClientLeft = 0
ClientTop = 0
ClientWidth = 4800
ControlContainer= -1 'True
BeginProperty Font
Name = "Arial"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MousePointer = 99 'Custom
ScaleHeight = 3600
ScaleWidth = 4800
ToolboxBitmap = "ucvhGrid.ctx":0000
Begin VB.Label lblName
AutoSize = -1 'True
BackStyle = 0 'Transparent
Height = 210
Left = 90
TabIndex = 0
Top = 45
Width = 1125
End
End
Attribute VB_Name = "ucVHGrid"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
'-> so, who has best kung-fu?
' _/ _/_/_/ _/_/_/ _/_/_/ _/_/_/
' _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/
' _/ _/ _/ _/ _/ _/_/ _/_/_/ _/ _/ _/
' _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
' _/ _/ _/ _/_/_/ _/ _/ _/_/_/ _/_/_/
'********************************************************************************************
'* vhGrid! vhGrid - Virtual Hybrid Grid Control 1.7 *
'* *
'* Started: November 18, 2006 *
'* Released: Febuary 19, 2007 *
'* Updated: July 07, 2007 *
'* Purpose: Ultra-Fast Virtual Grid Hybrid *
'* Functions: (partial listing) *
'* Revision: 1.7.0 *
'* Compile: Native *
'* Author: John Underhill (Steppenwolfe) *
'* *
'********************************************************************************************
'-> Initialization <-
'-> GridInit RowCount, Columns
'-> AddCell Row, Column, Text, TextAlign, IconIndex, BackColor, ForeColor, Font, Indent, RowSpanDepth
'-> FastLoad Or Draw properties
'/~ These are the three core functions involved in loading grid data.
'/~ GridInit: sizes the internal arrays, and sets the grids item count. This should be called before adding data.
'/~ AddCell: loads cell data into the GridItem class array.
'/~ FastLoad: turns on drawing once the last item (specified by the GridInit parameters), has been loaded.
'/~ Draw: manually toggles the draw switch for the grid.
'-> Theming <-
'-> ThemeManager eSkinStyle, UseSkinTheme, ThemeColor, ThemeLuminence, ColumnFontColor, ColumnFontHiliteColor, ColumnFontPressedColor, OptionFormBackColor, OptionFormOffsetColor, OptionFormForeColor, OptionFormTransparency, OptionFormGradient, UseXPColors, OptionControlColor, IncludeAdvancedEdit, IncludeColumnTip, IncludeFilter, IncludeCellTip
'/~ Most style parameters can be set through this one call. Each option has a corresponding function so that option properties
'/~ may also be set individually.
'-> eSkinStyle: the skin image group
'-> UseSkinTheme: use skin colorization
'-> ThemeColor: skin colorization base
'-> ThemeLuminence: skin colorization depth
'-> ColumnFontColor, ColumnFontHiliteColor, ColumnFontPressedColor: column text colors
'-> OptionFormBackColor, OptionFormOffsetColor, OptionFormForeColor, OptionControlColor: filter, tooltip, columntip, and advanced edit forms, base color scheme
'-> OptionFormTransparency, OptionFormGradient, UseXPColors: option window effects options
'-> IncludeAdvancedEdit, IncludeColumnTip, IncludeFilter, IncludeCellTip, IncludeTreeview: options to include in the theme change
'-> ThemeAutoXp [bool]
'-> Auto assigns skin elements based on users current theme. To be usewd in place of thememenager on xp systems.
'-> Row Spanning <-
'-> AddCell :=lSpanRowDepth
'/~ Row spanning allows customizable row heights beyond limitations of the listview class. Rows can span the visible
'/~ client area, allowing for a large amount of data to be displayed on a single row. This can be used to create header
'/~ or story cells, or to emulate variable row height.
'-> Cell Spanning <-
'-> CellSpanHorizontal Row, FirstCell, LastCell
'/~ Cells can be spanned across any variation of column lengths, allowing for caption or story cells. Cell spanning
'/~ has only a modest impact on processing, and so can be used at will.
'-> SubCells <-
'-> SubCellAddControl Row, Cell, Width, Height, ControlHandle, Position, Left, Top, UseVirtualRow, UseVirtualCell
'/~ Control Subcells contain a control window. There are 15 integrated control types you can use, but a control
'/~ subcell can also use external controls by passing in the controls handle to the subcell and setting the controls
'/~ parent property to the grid hwnd. Control subcells are meant to be used sparingly, as each one requires
'/~ a unique control instance, (so say, you want 3 controls per row, 1k rows, that's 3k controls!). I would not
'/~ recommend more then 30 controls per grid instance.
'/~ I have added the ability to switch between edit controls, (on the fly?), lending greater flexibility
'/~ with that usage, but current implementation of subcells will remain as it is.
'-> Virtual Access <-
'/* Some features are not supported in virtual mode, simply because they require the GridItem class to work.
'/* Currently not supported: row spanning, cell spanning, column filter, subcells, cell tips, and cell headers.
'/* Properties or functions that rely on an internal data for calculations are also bypassed, for example
'/* ColumnTextFitHeight and Find.
'/* Cell tips and cell headers might be added later, using an events interface to collect the data.
'-> Owner Drawn Cells <-
'-> OwnerDrawImpl = 'object'
'/* Cells can be ownerdrawn through various stages of the cell rendering process. The default draw
'/* behaviors can also be bybassed by setting the bSkipdefault param to true within the callback interface.
'/* The callback returns the row and cell numbers, cell hdc, and a reference to the rows griditem class
'/* instance. The griditem variables can be changed or used as a reference in the draw process.
'-> Hyper Mode <-
'/* This mode presents several advantages to loading a data set in the standard way. First, how it works.
'/* Most applications collect data through internal methods, then once those processes complete, they load
'/* that data into a display control. The disadvantages of this method are that you are reproducing all that
'/* data a second time when populating (say a listview) internal data structs. This is a serious waste of
'/* memory, and can be a very slow process. What hyper mode does, is allows you direct access to the grids
'/* internal storage class, you populate that directly instead of using arrays, then when data collection
'/* has completed, you simply pass the array pointer into the grid. So data is not reproduced, which means
'/* only half the memory footprint, and there is no need to populate internal structures, so the time saved
'/* in loading grid can be very dramatic. On my benchmarks, a standard listview takes almost 14 seconds
'/* to load 100 thousand items with 8 columns, compare that to 1/10th of a second using hypermode.
'*** Notes ***
'-! Disclaimer
'/~ I don't usually put serious restrictions on my source, but I can see this getting some
'/~ usage so, here is the nasty bit..
'/~ Copyright © 2006 John Underhill. All rights reserved world-wide.
'/~ This software is protected under a general GNU license. Intellectual and software
'/~ Copyrights reserved.
'/~ Terms and Conditions of Use
'/~ By using this software you agree to abide by the following conditions:
'/~ 1) John Underhill, (the author), shall accept no liability or responsibility for
'/~ the use of this software. No warranty, or guarantee of fitness, or promise of support
'/~ is either expressed or implied, and no responsibility for this software, in any way
'/~ imaginable, is assumed by the author.
'/~ 2) You may use this software in your personal projects as you like. Any commercial
'/~ product using this software, must acquire the authors expressed consent (email), before
'/~ publication. I reserve the right to refuse the use of this software in situations
'/~ where I do not think the usage, or product is appropriate.
'/~ 3) This software may not be used in any product that contains malicious code, including
'/~ spyware, malware, adware, or virii.
'/~ 4) You may freely distribute this source code where appropriate, but all notes must remain
'/~ intact, and the author should be given the proper credit.
'-* Credits/Kudos
'/~ Most of all, a thanks goes out for the inspiration drawn from Steve McMahon.
'/~ The sort routines are adaptations of Rohan Edwards non-recursive triquicksort routines.
'/~ The clsImageDrag and clsImageList are rewrites of Steve's classes, (www.vbaccelrator.com).
'/~ The subclasser is a rewrite of Paul Caton's WinSubHook with some small changes and unicode support added.
'/~ Thanks to Carles P.V. for his api treeview control, the basis of the integrated treeview.
'/~ Thanks to Keith 'Lavolpe' Fox, for his keen eye in bugchecking.
'/~ Thanks to Zhu, for his ongoing bugchecks, and help with unicode support.
'/~ The rest constitutes an original work, authored by yours truly..
'-# History
'/~ Steve McMahon had his sGrid II, and I have my little vhGrid ;o)
'/~ I started this project with rewriting sGrid II in mind, but soon realized that the methods Steve used
'/~ would not allow some of the ideas I had in store for this project, (like virtual listing, and row spanning).
'/~ So, using my HyperList as a framework, I began building this grid. There were a lot of challenging
'/~ technical bits along the way, like real-time vertically sizable headers, custom tooltips, filter menu, and
'/~ the advanced edit, (but the feature that caused me the most grief by far, was the spanning, lost a week on that)..
'/~ Several of the classes are portable, like tooltips, imagelist, and odcontrol. Odcontrol is an example
'/~ of creating controls strictly with api, they run faster, with less overhead, and have many
'/~ options accessible that are hidden in the vb com implementation.
'/~ I looked at a lot of grid controls while writing this, (sourceforge and codeguru/codeproject have some
'/~ good ones), and it seems to me, that as far as features and interface design go, sGrid II, still stood out
'/~ as one of the best. So then, how to make a better grid control then sGrid II? Well, I don't know if this is
'/~ better, but it is certainly a very powerful tool, with some unique features to it, you be the judge..
'-! Cautions
'/~ After publishing my listview, I was besieged by (hundreds!) emails asking basic deployment questions,
'/~ almost every one of these questions could have been resolved by the asker, if they had only taken the time
'/~ to read the documentation, follow the examples provided, or stepped through the code to see how it was
'/~ working. With this grid, I have expanded the documentation with clear examples, and explanations of
'/~ properties/routines. There are thousands of comments in the code, which should simplify the readers understanding
'/~ of the grids mechanics. That being the case, I will not entertain questions about the grids usage, you either
'/~ take the time to figure it out, -or don't use it-.
'/~ I also saw HyperList (v1), on a chinese website, with the guy claiming he wrote it, (looks like he might have even
'/~ been trying to sell it, har~har). Now, I don't ask for much, don't care about contest, (votes are only a tip of the hat,
'/~ as it should be..), but if you use my code, (or anyone else's), show some integrity, and give the credit due the author.
'/~ Don't ask me for features! There is enough code in this already, if you want treeview in cell, or ado connector, or
'/~ grid to turn into three-dimensional rotating cube when r-clicked (w/ talking yoda ai), whatever, do it yourself!
'/~ This is what I wanted in a grid. If you need something else, add it, you may even learn something..
'/~ ..and if you don't like my attitude, then why are you reading this?
'-! Compiling and Distribution
'/~ You compile this control, just like any other usercontrol. Highlight the uc in the project explorer, then go to
'/~ Project-> vhGrid Properties and RENAME THE CONTROL! If you do not, and someone else installs software with this grid
'/~ using the same name, but a different version number, your software will-stop-working. A good idea is to prefix it
'/~ with the software or company name. Goto File -> Make "mycompanynamegrid.ocx". Then go back to properties and change
'/~ the version compatibility from 'project compatibility' to 'binary compatibility' and compile it again.
'-? Recommendations
'/~ If you only intend to use one skin, then delete the other skin elements from the resource file. This should reduce
'/~ compile size by almost half.
'-@ 98/ME users
'/~ No unicode support for legacy operating systems. 98/ME, have only basic support using glyphs (hideous looking), so
'/~ I did not bother with it. I have not tested this on legacy system, but it should be ok, if not, send me an email with
'/~ -specific details- of the problem, (where/when/what), and if you want to work with me, I will try to fix it.
'-> Using vhGrid
'/~ Yes I know it looks complicated, and there is a learning curve, but if you study examples, and take the time to read
'/~ the comments, it is not that bad. Level of complexity is related to sophistication required of display. If you want a fancy
'/~ MP3 interface with pic frame and integrated controls, od cells, etc, then you will have to do some experimenting with
'/~ properties and methods, (just like every other control I have ever used). Dig in, put a button on a form and test
'/~ the properties one by one, step through routines, study the examples, what you create is limited only by your willingness
'/~ to learn, and depth of your imagination.
'-@ Bugfixes to Ver. 1.0, Feb 20/07
'/~ Compiler hanging when building demo exe. An error during uc termination causing a jump before all objects could be
'/~ resolved, (including manifest shell reference). Tested for the error with array check in DestroyFont routine.
'/~ Text only focus on cells with cellheaders was misaligned. Rewrote section and added CellCalcHeaderSize.
'/~ Pre-population focus and click events caused jump out of grid wndproc, added rowcount checks to called routines.
'/~ Checkbox hittest failing when grid is not using icons. CellDrawIcon was resolving a clip region call, added an additional
'/~ SelectClipRgn call to clear the clip region when icons are absent.
'/~ Removed many of the default handlers used for debugs during build up, and added various conditionals to bypass errors.
'/~ Header image 'blackout' on first column resize. This was a strange one.. The cause was that a getclientrect call in ColumnRender
'/~ was returning a very large rect (32k right) the first time column was sized, CreateCompatibleBitmap call failed
'/~ creating an empty dc. Looks like some max scroll width applied to header class. Compensated by building the rect
'/~ manually, using bmp max size of 5x the grid client width.
'/~ Skinned scrollbar dissappearing after toggling visible property (compiled), added a scrollbar.refresh to usercontrol_show.
'/~ Standard cursor showing when headersizable turned off, and cursor over that hittest region, adjusted logic in header proc.
'/~ Repeated sorts with direction changes led to gridcell corruption. Caused by a an error in the sortcontrol routine,
'/~ adjusted routine logic to compensate.
'/~ Column add/remove failing when multiple columns changed. Added a resize array call into griditem class to adjust internal
'/~ arrays for active cell count changes.
'/~ Cell colors lightening with each row added. Test for color dimensioned array before applying xp offsets in CellColor sub.
'-@ Bugfixes/Additions to Ver. 1.1, Feb 23/07
'/~ Found source of header size glitch. Was in grid proc HDM_LAYOUT sizing hack. Header size was using getwindowrect
'/~ and not subtracting left coord, so header was growing with every resize. Changed to getclientrect call.
'/~ FontHandle function was using isnt switch instead of isunicode on creating logfont structure, so fonts remained as
'/~ unicode default arial. Added more unicode support to peripheral classes.
'/~ Went over the property list and sorted out the propbag settings.
'/~ Added combo/imagecombo and listbox/imagelistbox to edit controls. Edit controls can now be swapped on the
'/~ fly using the eHEditRequest event, demonstrated in the subcell demo.
'/~ Added auto-scrolling to row drag and drop functionality.
'/~ Added the ForeColor auto property, (thanks to Keith 'Lavolpe' Fox, for the code snippet).
'/~ Fixed the headerhide property by bypassing the HDM_LAYOUT message.
'/~ Rewrote portions of odcontrol class, adding blended backcolor to list and textbox, and changes to combo
'/~ codes. Moved the edit textbox out of the uc, and to an odcontrol instance.
'/~ Added right click event.
'-@ Bugfixes/Additions to Ver. 1.2, Feb 26/07
'/~ Added esc, tab, and enter accelerators to close edit window. Added spacebar accelerator to toggle checkbox.
'/~ Fixed partial cell focus when editor is unloaded.
'/~ Fixed header drop icon in drag image by hiding icon while dropping, (was showing a black mask per m$
'/~ internal imagelist issue).
'/~ Fixed incorrect row count after filter is applied.
'/~ Fixed row drop scrolling with smoother downward descent.
'/~ Now hiding sort icon and bypassing filter when row count is zero.
'/~ Added focus forecolor property to items, thememanager and filter.
'/~ Adjusted row and cell counts in gridinit routine to reflect actual numbers.
'/~ Adjusted add/remove/clear row routines for starting row index now can add/remove by row.
'/~ Enhanced the glyphs on the scrollbar buttons.
'/~ Adjusted the enabled property and added disabled backcolor/forecolor properties.
'/~ Excluded spanned rows from column filters, you can not filter spanned rows. This is for technical reasons
'/~ but also because spanned rows are not meant for standard cell data, but as story or control cells.
'/~ Tool Tiptimer stopped when grid out of focus.
'/~ Rebuilt header proc, reduced hit testing from four routines to one. Cursor changes during header
'/~ changes are fixed. Dragging and passing mouse past header caused header to start sizing, fixed with
'/~ hittesting routine.
'/~ Rewrote portions of grid proc, dropping header into list client caused misfire of timer, and dropping
'/~ rows out of client area also caused issues, both problems resolved.
'/~ Added RowNoEdit sub, selected row will not be editable.
'-@ Bugfixes/Additions to Ver. 1.3, Mar 04/07
'/~ Added integrated treeview control! Now has an optional parallel treeview with all the trimmings.
'/~ Treeview is skinned, with custom checkboxes, and can be used standalone as class or uc.
'/~ Added left align scrollbar property to treeview and grid.
'/~ clsSkinScrollbars was completely rebuilt, it is faster, leaner, and can now be transported and
'/~ used on (some) other controls, as demonstrated with treeview.
'/~ Added refresh to filter unload, and backcolor change.
'/~ Added resize event to uc in response to display or settings changes.
'/~ Fixed horz scrollbar button size bug. When hz button was less then 50 px, it dissapeared when pressed.
'/~ Added a refresh to transition mask while header is in sizing state. Header was erasing portions of mask.
'/~ Fixed a logic bug in reloading rows, was taking a long time on secondary builds. Can now reload 1k rows
'/~ in 0.1 seconds.
'/~ Added demonstration of HyperMode. It is now possible to build data arrays directly into a clsGridItem
'/~ array, and pass only the pointer into grid. This means you can use the griditems for data storage in
'/~ your application, then load results near instantaneously into grid.
'/~ Benched on athalon 1.4, 512 ram: 100k rows, 8 columns of mixed data loaded in .09 s.
'-@ Bugfixes/Additions to Ver. 1.4, Mar 18/07
'/~ Added integrated 32 bit icon support with property page. clsImagelist is portable, and with property sheet
'/~ and a couple of simple changes can add an integrated 32b imagelist to any usercontrol.
'/~ Added comlete mousewheel support.
'/~ Fixed removal of last spanned row.
'/~ Fixed a number of focus issues, including set/kill full row select, added icon focus state, switched imls
'/~ to integrated class versions, and established inter-focus events between treeview and grid.
'/~ Added right leading font support throughout.
'/~ Added vertical scrollbar alignment properties to grid and treeview.
'/~ Fixed an issue with the timer subclassing, where it was unloading message when not in table.
'/~ Treeview can now be aligned to any coordinate (N/S/W/E).
'/~ Added a manifest to demonstrate icon alphablending with compiled project (subcell demo).
'/~ Fixed problems caused by manifest in odcontrol, mostly xp rendering bypassing cntl color subclassing.
'/~ Fixed a bug in row drag & drop where drag image did not load on compiled project, by altering image capture method.
'/~ Added drag capability between treeview and grid. Tree nodes can now be dropped into grid cells.
'-@ Bugfixes/Additions to Ver. 1.5, Mar 27/07
'/~ Complete rewrite of row spanning. Now vertical spanning has almost no cpu impact and can be used
'/~ on any number of rows, with no impact on performance. Also contributing to faster load/render times
'/~ when grid is using the spanning feature.
'/~ Added pageup/down home/end to scroll methods in clsSkinScrollbars.
'/~ Added 'S' and 'E' key accelerators that scroll to top and bottom of list, and now consuming other char input.
'/~ Moved checkbox state to griditem class, now checkboxes can be sorted.
'/~ Fixed an issue with column locking.
'/~ Finished unicode support for treeview, should now be fully compliant.
'/~ Fixed issue with cell spanning and removing columns by adjusting griditem cellspan internal counters.
'/~ Added stretchblt mode options to clsRender class.
'/~ Added built in alpha icon support, now alpha icons are available on any system with gdiplus installed.
'/~ Added three new visual styles, xp blue, xp green, and vista.
'/~ Added autoxp switch, which on xp system assigns skin elements based on current theme.
'/~ Barring any future bugfixes, this will be the last version in vb6.
'-@ Bugfixes/Additions to Ver. 1.6, July 07/07
'/~ Added four new styles, (vista/quicksilver/xp-blue/xp-green)
'/~ Added row tags: RowTag(row) = ""
'/~ Added auto xp style property: ThemeAutoXp = True
'/~ Fixed focus text only off coordinates when cell header is present.
'/~ Fixed text clipping in cells
'/~ Bunch of other stuff I can't remember..
'-> enjoy
'-@ steppenwolfe_2000@yahoo.com
'-> Cheers,
'-> John
Implements GXISubclass
Private Const BM_TRANSPARENT As Long = 1
Private Const CCM_FIRST As Long = &H2000
Private Const CCM_SETUNICODEFORMAT As Long = (CCM_FIRST + 5)
Private Const CCM_GETUNICODEFORMAT As Long = (CCM_FIRST + 6)
Private Const CLR_NONE As Long = -1
'/* edit control styles
Private Const ES_UPPERCASE As Long = &H8
Private Const ES_LOWERCASE As Long = &H10
Private Const EM_LIMITTEXT As Long = &HC5
Private Const FW_NORMAL As Long = 400
Private Const FW_BOLD As Long = 700
Private Const GW_HWNDNEXT As Long = &H2
Private Const GWL_STYLE As Long = (-16)
Private Const GWL_EXSTYLE As Long = (-20)
Private Const H_MAX As Long = &HFFFF + 1
Private Const HDF_LEFT As Long = 0
Private Const HDF_RIGHT As Long = 1
Private Const HDF_CENTER As Long = 2
Private Const HDF_IMAGE As Long = &H800
Private Const HDF_BITMAP_ON_RIGHT As Long = &H1000
Private Const HDF_STRING As Long = &H4000
Private Const HDI_WIDTH As Long = &H1
Private Const HDI_TEXT As Long = &H2
Private Const HDI_FORMAT As Long = &H4
Private Const HDI_IMAGE As Long = &H20
Private Const HDM_FIRST As Long = &H1200
Private Const HDM_GETITEMCOUNT As Long = (HDM_FIRST + 0)
Private Const HDM_GETITEMA As Long = (HDM_FIRST + 3)
Private Const HDM_SETITEMA As Long = (HDM_FIRST + 4)
Private Const HDM_LAYOUT As Long = (HDM_FIRST + 5)
Private Const HDM_GETITEMRECT As Long = (HDM_FIRST + 7)
Private Const HDM_SETIMAGELIST As Long = (HDM_FIRST + 8)
Private Const HDM_GETITEMW As Long = (HDM_FIRST + 11)
Private Const HDM_SETITEMW As Long = (HDM_FIRST + 12)
Private Const HDM_SETHOTDIVIDER As Long = (HDM_FIRST + 19)
Private Const HDN_FIRST As Long = H_MAX - 300
Private Const HDN_ITEMCHANGINGA As Long = (HDN_FIRST - 0)
Private Const HDN_ITEMCHANGEDA As Long = (HDN_FIRST - 1)
Private Const HDN_ENDTRACKA As Long = (HDN_FIRST - 7)
Private Const HDN_BEGINDRAG As Long = (HDN_FIRST - 10)
Private Const HDN_ENDDRAG As Long = (HDN_FIRST - 11)
Private Const HDN_ITEMCHANGINGW As Long = (HDN_FIRST - 20)
Private Const HDN_ITEMCHANGEDW As Long = (HDN_FIRST - 21)
Private Const HDN_ENDTRACKW As Long = (HDN_FIRST - 27)
Private Const HDR_MINHEIGHT As Long = 24
Private Const HDR_MAXHEIGHT As Long = 140
Private Const ICC_LISTVIEW_CLASSES As Long = &H1
Private Const ILC_MASK As Long = &H1
Private Const ILC_COLOR32 As Long = &H20
Private Const ILD_TRANSPARENT As Long = &H1
Private Const LOGPIXELSY As Long = 90
Private Const LF_ANTIALIASED_QUALITY As Long = 4
Private Const LF_CLEARTYPE_QUALITY As Long = 5
Private Const LVCF_FMT As Long = &H1
Private Const LVCF_WIDTH As Long = &H2
Private Const LVCF_TEXT As Long = &H4
Private Const LVCF_ORDER As Long = &H20
Private Const LVIF_STATE As Long = &H8
Private Const LVHT_NOWHERE As Long = &H1
Private Const LVHT_ONITEMICON As Long = &H2
Private Const LVHT_ONITEMLABEL As Long = &H4
Private Const LVHT_ONITEMSTATEICON As Long = &H8
Private Const LVHT_ONITEM As Long = (LVHT_ONITEMICON Or LVHT_ONITEMLABEL Or LVHT_ONITEMSTATEICON)
Private Const LVIR_BOUNDS As Long = &H0
Private Const LVIR_LABEL As Long = &H2
Private Const LVIS_FOCUSED As Long = &H1
Private Const LVIS_SELECTED As Long = &H2
Private Const LVIS_CUT As Long = &H4
Private Const LVM_FIRST As Long = &H1000
Private Const LVM_SETBKCOLOR As Long = (LVM_FIRST + 1)
Private Const LVM_SETIMAGELIST As Long = (LVM_FIRST + 3)
Private Const LVM_GETITEMCOUNT As Long = (LVM_FIRST + 4)
Private Const LVM_GETITEMRECT As Long = (LVM_FIRST + 14)
Private Const LVM_HITTEST As Long = (LVM_FIRST + 18)
Private Const LVM_ENSUREVISIBLE As Long = (LVM_FIRST + 19)
Private Const LVM_REDRAWITEMS As Long = (LVM_FIRST + 21)
Private Const LVM_GETCOLUMNA As Long = (LVM_FIRST + 25)
Private Const LVM_SETCOLUMNA As Long = (LVM_FIRST + 26)
Private Const LVM_INSERTCOLUMNA As Long = (LVM_FIRST + 27)
Private Const LVM_DELETECOLUMN As Long = (LVM_FIRST + 28)
Private Const LVM_GETCOLUMNWIDTH As Long = (LVM_FIRST + 29)
Private Const LVM_SETCOLUMNWIDTH As Long = (LVM_FIRST + 30)
Private Const LVM_GETHEADER As Long = (LVM_FIRST + 31)
Private Const LVM_SETTEXTCOLOR As Long = (LVM_FIRST + 36)
Private Const LVM_SETTEXTBKCOLOR As Long = (LVM_FIRST + 38)
Private Const LVM_GETTOPINDEX As Long = (LVM_FIRST + 39)
Private Const LVM_GETCOUNTPERPAGE As Long = (LVM_FIRST + 40)
Private Const LVM_UPDATE As Long = (LVM_FIRST + 42)
Private Const LVM_SETITEMSTATE As Long = (LVM_FIRST + 43)
Private Const LVM_GETITEMSTATE As Long = (LVM_FIRST + 44)
Private Const LVM_SETITEMCOUNT As Long = (LVM_FIRST + 47)
Private Const LVM_GETSELECTEDCOUNT As Long = (LVM_FIRST + 50)
Private Const LVM_SETEXTENDEDLISTVIEWSTYLE As Long = (LVM_FIRST + 54)
Private Const LVM_GETEXTENDEDLISTVIEWSTYLE As Long = (LVM_FIRST + 55)
Private Const LVM_GETSUBITEMRECT As Long = (LVM_FIRST + 56)
Private Const LVM_SUBITEMHITTEST As Long = (LVM_FIRST + 57)
Private Const LVM_GETCOLUMNW As Long = (LVM_FIRST + 95)
Private Const LVM_SETCOLUMNW As Long = (LVM_FIRST + 96)
Private Const LVM_INSERTCOLUMNW As Long = (LVM_FIRST + 97)
Private Const LVN_FIRST As Long = -100&
Private Const LVN_COLUMNCLICK As Long = (LVN_FIRST - 8)
Private Const LVN_BEGINDRAG As Long = (LVN_FIRST - 9)
Private Const LVN_BEGINRDRAG As Long = (LVN_FIRST - 11)
Private Const LVN_ENDDRAG As Long = (LVN_FIRST - 12) '/* undocumented?
Private Const LVS_REPORT As Long = &H1
Private Const LVS_SINGLESEL As Long = &H4
Private Const LVS_SHOWSELALWAYS As Long = &H8
Private Const LVS_SORTASCENDING As Long = &H10
Private Const LVS_SHAREIMAGELISTS As Long = &H40
Private Const LVS_OWNERDRAWFIXED As Long = &H400
Private Const LVS_OWNERDATA As Long = &H1000
Private Const LVS_NOCOLUMNHEADER As Long = &H4000
Private Const LVS_EX_CHECKBOXES As Long = &H4&
Private Const LVS_EX_HEADERDRAGDROP As Long = &H10&
Private Const LVS_EX_FULLROWSELECT As Long = &H20&
Private Const LVSCW_AUTOSIZE As Long = -1
Private Const LVSCW_AUTOSIZE_USEHEADER As Long = -2
Private Const LVSICF_NOINVALIDATEALL As Long = &H1
Private Const LVSIL_SMALL As Long = 1
Private Const LVSIL_STATE As Long = 2
Private Const NM_FIRST As Long = H_MAX
Private Const NM_CLICK As Long = (NM_FIRST - 2)
Private Const NM_DBLCLK As Long = (NM_FIRST - 3)
Private Const NM_RETURN As Long = (NM_FIRST - 4)
Private Const NM_RCLICK As Long = (NM_FIRST - 5)
Private Const NM_RDBLCLK As Long = (NM_FIRST - 6)
Private Const NM_SETFOCUS As Long = (NM_FIRST - 7)
Private Const NM_KILLFOCUS As Long = (NM_FIRST - 8)
Private Const NM_CUSTOMDRAW As Long = (NM_FIRST - 12)
Private Const NM_HOVER As Long = (NM_FIRST - 13)
Private Const NM_NCHITTEST As Long = (NM_FIRST - 14)
Private Const NM_KEYDOWN As Long = (NM_FIRST - 15)
Private Const NM_RELEASEDCAPTURE As Long = (NM_FIRST - 16)
Private Const NM_SETCURSOR As Long = (NM_FIRST - 17)
Private Const NM_CHAR As Long = (NM_FIRST - 18)
Private Const PRP_APT As Long = 130
Private Const PRP_BRDSTL As Long = 1
Private Const SB_LINEDOWN As Long = 1
Private Const SB_LINELEFT As Long = 0
Private Const SB_LINERIGHT As Long = 1
Private Const SB_LINEUP As Long = 0
Private Const SB_VERT As Long = 1
Private Const SIF_RANGE As Long = &H1
Private Const SIF_PAGE As Long = &H2
Private Const SIF_POS As Long = &H4
Private Const SIF_DISABLENOSCROLL As Long = &H8
Private Const SIF_TRACKPOS As Long = &H10
Private Const SIF_ALL As Long = (SIF_RANGE Or SIF_PAGE Or SIF_POS Or SIF_TRACKPOS)
Private Const SHGFI_ICON As Long = &H100
Private Const SHGFI_SYSICONINDEX As Long = &H4000
Private Const SHGFI_LARGEICON As Long = &H0
Private Const SHGFI_SMALLICON As Long = &H1
Private Const SHGFI_OPENICON As Long = &H2
Private Const SHGFI_SHELLICONSIZE As Long = &H4
Private Const SHGFI_USEFILEATTRIBUTES As Long = &H10
Private Const SW_HIDE As Long = &H0
Private Const SW_NORMAL As Long = &H1
Private Const SWP_NOSIZE As Long = &H1
Private Const SWP_NOMOVE As Long = &H2
Private Const SWP_NOZORDER As Long = &H4
Private Const SWP_NOACTIVATE As Long = &H10
Private Const SWP_FRAMECHANGED As Long = &H20
Private Const SWP_SHOWWINDOW As Long = &H40
Private Const SWP_HIDEWINDOW As Long = &H80
Private Const SWP_NOOWNERZORDER As Long = &H200
Private Const TVGN_ROOT As Long = &H0
Private Const TVGN_NEXT As Long = &H1
Private Const TVGN_PREVIOUS As Long = &H2
Private Const TVGN_PARENT As Long = &H3
Private Const TVGN_CHILD As Long = &H4
Private Const TVGN_DROPHILITE As Long = &H8
Private Const TVGN_CARET As Long = &H9
Private Const TVGN_FIRSTVISIBLE As Long = &H5
Private Const TVGN_NEXTVISIBLE As Long = &H6
Private Const TVGN_PREVIOUSVISIBLE As Long = &H7
Private Const TVGN_LASTVISIBLE As Long = &HA
Private Const TV_FIRST As Long = &H1100
Private Const TVM_INSERTITEM As Long = (TV_FIRST + 0)
Private Const TVM_DELETEITEM As Long = (TV_FIRST + 1)
Private Const TVM_EXPAND As Long = (TV_FIRST + 2)
Private Const TVM_GETITEMRECT As Long = (TV_FIRST + 4)
Private Const TVM_GETNEXTITEM As Long = (TV_FIRST + 10)
Private Const TVM_SELECTITEM As Long = (TV_FIRST + 11)
Private Const TVM_GETITEM As Long = (TV_FIRST + 12)
Private Const TVM_SETITEM As Long = (TV_FIRST + 13)
Private Const TVM_EDITLABEL As Long = (TV_FIRST + 14)
Private Const TVM_HITTEST As Long = (TV_FIRST + 17)
Private Const TVM_CREATEDRAGIMAGE As Long = (TV_FIRST + 18)
Private Const TVM_SORTCHILDREN As Long = (TV_FIRST + 19)
Private Const TVM_ENSUREVISIBLE As Long = (TV_FIRST + 20)
Private Const TVM_ENDEDITLABELNOW As Long = (TV_FIRST + 22)
Private Const TVM_SETINSERTMARK As Long = (TV_FIRST + 26)
Private Const TVM_SETINSERTMARKCOLOR As Long = (TV_FIRST + 37)
Private Const TVM_GETINSERTMARKCOLOR As Long = (TV_FIRST + 38)
Private Const TVN_FIRST As Long = -400
Private Const TVN_SELCHANGING As Long = (TVN_FIRST - 1)
Private Const TVN_SELCHANGED As Long = (TVN_FIRST - 2)
Private Const TVN_ITEMEXPANDING As Long = (TVN_FIRST - 5)
Private Const TVN_ITEMEXPANDED As Long = (TVN_FIRST - 6)
Private Const TVN_BEGINDRAGA As Long = (TVN_FIRST - 7)
Private Const TVN_DELETEITEM As Long = (TVN_FIRST - 9)
Private Const TVN_BEGINLABELEDIT As Long = (TVN_FIRST - 10)
Private Const TVN_ENDLABELEDIT As Long = (TVN_FIRST - 11)
Private Const TVN_BEGINDRAGW As Long = (TVN_FIRST - 56)
Private Const VER_PLATFORM_WIN32_NT As Long = 2
Private Const VK_LBUTTON As Long = &H1
Private Const VK_RBUTTON As Long = &H2
Private Const VK_TAB As Long = &H9
Private Const VK_ENTER As Long = &HD
Private Const VK_CONTROL As Long = &H11
Private Const VK_LEFT As Long = &H25
Private Const VK_RIGHT As Long = &H27
Private Const VK_ESCAPE As Long = &H1B
Private Const VK_SPACE As Long = &H20
Private Const VK_UP As Long = &H26
Private Const VK_DOWN As Long = &H28
Private Const VK_UCASEA As Long = &H41
Private Const WC_LISTVIEW As String = "SysListView32"
Private Const WM_SETFOCUS As Long = &H7
Private Const WM_KILLFOCUS As Long = &H8
Private Const WM_SETFONT As Long = &H30
Private Const WM_WINDOWPOSCHANGED As Long = &H47
Private Const WM_PAINT As Long = &HF
Private Const WM_KEYDOWN As Long = &H100
Private Const WM_MOUSEMOVE As Long = &H200
Private Const WM_TIMER As Long = &H113&
Private Const WM_VSCROLL As Long = &H115
Private Const WM_HSCROLL As Long = &H114
Private Const WS_TABSTOP As Long = &H10000
Private Const WS_THICKFRAME As Long = &H40000
Private Const WS_HSCROLL As Long = &H100000
Private Const WS_VSCROLL As Long = &H200000
Private Const WS_BORDER As Long = &H800000
Private Const WS_CLIPCHILDREN As Long = &H2000000
Private Const WS_CLIPSIBLINGS As Long = &H4000000
Private Const WS_VISIBLE As Long = &H10000000
Private Const WS_CHILD As Long = &H40000000
Private Const WS_EX_WINDOWEDGE As Long = &H100
Private Const WS_EX_CLIENTEDGE As Long = &H200
Private Const WS_EX_RTLREADING As Long = &H2000
Private Const WS_EX_LEFTSCROLLBAR As Long = &H4000
Private Const WS_EX_STATICEDGE As Long = &H20000
Public Enum EXTXpTheme
None = 0&
HomeStead = 1&
NormalColor = 2&
Metallic = 3&
End Enum
Private Enum EKNKeyNavigate
EKNLeft = 1&
EKNRight = 2&
EKNUp = 3&
EKNDown = 4&
End Enum
Private Enum TT_NOTIFICATIONS
TTN_FIRST = -520&
TTN_LAST = -549&
TTN_GETDISPINFO = (TTN_FIRST - 0)
End Enum
Private Enum SYSTEM_METRICS
SM_CXSCREEN = 0&
SM_CYSCREEN = 1&
SM_CXVSCROLL = 2&
SM_CYHSCROLL = 3&
SM_CYCAPTION = 4&
SM_CXBORDER = 5&
SM_CYBORDER = 6&
SM_CYVTHUMB = 9&
SM_CXHTHUMB = 10&
SM_CXICON = 11&
SM_CYICON = 12&
SM_CXCURSOR = 13&
SM_CYCURSOR = 14&
SM_CYMENU = 15&
SM_CXFULLSCREEN = 16&
SM_CYFULLSCREEN = 17&
SM_CYKANJIWINDOW = 18&
SM_MOUSEPRESENT = 19&
SM_CYVSCROLL = 20&
SM_CXHSCROLL = 21&
SM_CXMIN = 28&
SM_CYMIN = 29&
SM_CXSIZE = 30&
SM_CYSIZE = 31&
SM_CXFRAME = 32&
SM_CYFRAME = 33&
SM_CXMINTRACK = 34&
SM_CYMINTRACK = 35&
SM_CXSMICON = 49&
SM_CYSMICON = 50&
SM_CYSMCAPTION = 51&
SM_CXMINIMIZED = 57&
SM_CYMINIMIZED = 58&
SM_CXMAXTRACK = 59&
SM_CYMAXTRACK = 60&
SM_CXMAXIMIZED = 61&
SM_CYMAXIMIZED = 62&
End Enum
Public Enum ECTTextAlignFlags
DT_TOP = &H0&
DT_LEFT = &H0&
DT_CENTER = &H1&
DT_RIGHT = &H2&
DT_VCENTER = &H4&
DT_BOTTOM = &H8&
DT_WORDBREAK = &H10&
DT_SINGLELINE = &H20&
DT_EXPANDTABS = &H40&
DT_TABSTOP = &H80&
DT_NOCLIP = &H100&
DT_EXTERNALLEADING = &H200&
DT_CALCRECT = &H400&
DT_NOPREFIX = &H800&
DT_INTERNAL = &H1000&
DT_EDITCONTROL = &H2000&
DT_PATH_ELLIPSIS = &H4000&
DT_END_ELLIPSIS = &H8000&
DT_MODIFYSTRING = &H10000
DT_RTLREADING = &H20000
DT_WORD_ELLIPSIS = &H40000
End Enum
Public Enum ECHCellHiliteStyle
echStripe = 0&
echThin = 1&
echThick = 2&
End Enum
Public Enum ETVOLEDragConstants
tvdNone = 0&
tvdManual = 1&
End Enum
Public Enum ETVTreeViewAlignment
etvLeftAlign = 0&
etvRightAlign = 1&
etvTopAlign = 2&
etvBottomAlign = 3&
End Enum
Public Enum ESCScrollBarAlignment
escRightAlign = 0&
escLeftAlign = 1&
End Enum
Public Enum ETVNodeRelation
trnLast = 0&
trnFirst = 1&
trnSort = 2&
trnNext = 3&
trnPrevious = 4&
End Enum
Public Enum ECTEditControlType
ectTextBox = 0&
ectCombo = 1&
ectImageCombo = 2&
ectListbox = 3&
ectImageListbox = 4&
End Enum
Public Enum eSDSortDirection
esdDescending = -1&
esdDefault = 0&
esdAscending = 1&
End Enum
Public Enum EGDDrawStage
edgPreDraw = 1&
edgBeforeBackGround = 2&
edgBeforeIcon = 3&
edgBeforeText = 4&
edgPostDraw = 5&
End Enum
Public Enum EVSFrameStyle
evsNoBorder = 0&
evsThinBorder = 1&
evsInsetBorder = 2&
evsRaisedBorder = 3&
evsThickBorder = 4&
End Enum
Public Enum EVSFramePosition
evsUserDefine = 0&
evsTopLeft = 1&
evsTopCenter = 2&
evsTopRight = 3&
evsCenterLeft = 4&
evsCenterCell = 5&
evsCenterRight = 6&
evsBottomLeft = 7&
evsBottomCenter = 8&
evsBottomRight = 9&
End Enum
Public Enum EVSTextFormat
evsLeftAlign = 0&
evsTopAlign = 1&
evsRightAlign = 2&
evsBottomAlign = 3&
End Enum
Public Enum EVSControlType
evsCheckBox = 1&
evsComboDropDown = 2&
evsComboDropList = 3&
evsComboSimple = 4&
evsCommandButton = 5&
evsImageCombo = 6&
evsImageListBox = 7&
evsLabel = 8&
evsListBox = 9&
evsListBoxExtended = 10&
evsListBoxMultiSelect = 11&
evsOptionButton = 12&
evsPictureBox = 13&
evsTextBox = 14&
End Enum
Public Enum EVSFrameConnector
evsTopCap = 1&
evsJoined = 2&
evsBottomCap = 3&
End Enum
Public Enum EVSThemeStyle
evsAzure = 0&
evsClassic = 1&
evsGloss = 2&
evsMetallic = 3&
evsXpSilver = 4&
evsXpBlue = 5&
evsXpGreen = 6&
evsVistaArrow = 7&
evsSilver = 8&
End Enum
Public Enum ESTSortType
estNone = -1
estCaseSensitive = vbBinaryCompare
estCaseInsensitive = vbTextCompare
End Enum
Public Enum EBSBorderStyle
ebsNone = 0&
ebsThin = 1&
ebsThick = 2&
End Enum
Public Enum ERDCellDecoration
erdCellLine = 0&
erdCellSplit = 1&
erdCellBiLinear = 2&
erdCellChecker = 3&
End Enum
Public Enum ECUColumnAutosize
ecuColumnItem = LVSCW_AUTOSIZE
ecuColumnHeader = LVSCW_AUTOSIZE_USEHEADER
End Enum
Public Enum ECAColumnAlign
ecaColumnLeft = HDF_LEFT
ecaColumnright = HDF_RIGHT
ecaColumnCenter = HDF_CENTER
End Enum
Public Enum ECSColumnSortTags
ecsSortNone = -1&
ecsSortDefault = 0&
ecsSortDate = 1
ecsSortNumeric = 2&
ecsSortIcon = 3&
ecsSortAuto = 4&
End Enum
Public Enum EDCDropConstants
vbOLEDropNone
vbOLEDropManual
End Enum
Public Enum EDSDragEffectStyle
edsClientArrow = 0&
edsThinLine = 1&
edsThickLine = 2&
End Enum
Public Enum EGLGridLines
EGLNone = 0&
EGLHorizontal = 1&
EGLVertical = 2&
EGLBoth = 3&
End Enum
Public Enum ECPIconPosition
epiCenter = 0&
epiTop = 1&
epiBottom = 2&
End Enum
Public Enum ESTThemeLuminence
estThemeSoft = 0&
estThemePastel = 1&
estThemeHard = 2&
End Enum
Public Enum EHTTextEffect
hteTextNormal = 0&
hteTextEmbossed = 1&
hteTextEngraved = 2&
End Enum
Public Enum ECHTrackDepth
ehtNarrow = 0&
ehtWide = 1&
End Enum
Public Enum ETTToolTipPosition
etpRightBottom = 0&
etpRightCenter = 1&
etpRightTop = 2&
etpLeftBottom = 3&
etpLeftCenter = 4&
etpLeftTop = 5&
End Enum
Private Type tagINITCOMMONCONTROLSEX
dwSize As Long
dwICC As Long
End Type
Private Type RECT
left As Long
top As Long
Right As Long
Bottom As Long
End Type
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type DRAWITEMSTRUCT
CtlType As Long
CtlID As Long
itemID As Long
itemAction As Long
itemState As Long
hwndItem As Long
hdc As Long
rcItem As RECT
itemData As Long
End Type
Private Type LVHITTESTINFO
pt As POINTAPI
flags As Long
iItem As Long
iSubItem As Long
End Type
Private Type LVCOLUMN
Mask As Long
fmt As Long
cx As Long
pszText As Long
cchTextMax As Long
iSubItem As Long
iImage As Long
iOrder As Long
End Type
Private Type HDITEM
Mask As Long
cxy As Long
pszText As String
hbm As Long
cchTextMax As Long
fmt As Long
lParam As Long
iImage As Long
iOrder As Long
End Type
Private Type HDITEMW
Mask As Long
cxy As Long
pszText As Long
hbm As Long
cchTextMax As Long
fmt As Long
lParam As Long
iImage As Long
iOrder As Long
End Type
Private Type LVITEM
Mask As Long