This repository has been archived by the owner on Jan 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
comctl32.go
1138 lines (1034 loc) · 32.4 KB
/
comctl32.go
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
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
// go run internal/cmd/gen/gen.go
// +build windows
package win
import (
"syscall"
"unsafe"
)
var (
// Library
libcomctl32 uintptr
// Functions
createMappedBitmap uintptr
createPropertySheetPage uintptr
createStatusWindow uintptr
createToolbarEx uintptr
createUpDownControl uintptr
dPA_Create uintptr
dPA_DeleteAllPtrs uintptr
dPA_DeletePtr uintptr
dPA_Destroy uintptr
dPA_DestroyCallback uintptr
dPA_EnumCallback uintptr
dPA_GetPtr uintptr
dPA_InsertPtr uintptr
dPA_Search uintptr
dPA_SetPtr uintptr
dPA_Sort uintptr
dSA_Create uintptr
dSA_DeleteAllItems uintptr
dSA_Destroy uintptr
dSA_DestroyCallback uintptr
dSA_GetItemPtr uintptr
dSA_InsertItem uintptr
defSubclassProc uintptr
destroyPropertySheetPage uintptr
drawInsert uintptr
drawStatusText uintptr
flatSB_EnableScrollBar uintptr
flatSB_GetScrollInfo uintptr
flatSB_GetScrollPos uintptr
flatSB_GetScrollProp uintptr
flatSB_GetScrollPropPtr uintptr
flatSB_GetScrollRange uintptr
flatSB_SetScrollInfo uintptr
flatSB_SetScrollPos uintptr
flatSB_SetScrollProp uintptr
flatSB_SetScrollRange uintptr
flatSB_ShowScrollBar uintptr
getEffectiveClientRect uintptr
getMUILanguage uintptr
imageList_Add uintptr
imageList_AddMasked uintptr
imageList_BeginDrag uintptr
imageList_Copy uintptr
imageList_Create uintptr
imageList_Destroy uintptr
imageList_DragEnter uintptr
imageList_DragLeave uintptr
imageList_DragMove uintptr
imageList_DragShowNolock uintptr
imageList_Draw uintptr
imageList_DrawEx uintptr
imageList_DrawIndirect uintptr
imageList_Duplicate uintptr
imageList_EndDrag uintptr
imageList_GetBkColor uintptr
imageList_GetDragImage uintptr
imageList_GetIcon uintptr
imageList_GetIconSize uintptr
imageList_GetImageCount uintptr
imageList_GetImageInfo uintptr
imageList_LoadImage uintptr
imageList_Merge uintptr
imageList_Read uintptr
imageList_Remove uintptr
imageList_Replace uintptr
imageList_ReplaceIcon uintptr
imageList_SetBkColor uintptr
imageList_SetDragCursorImage uintptr
imageList_SetIconSize uintptr
imageList_SetImageCount uintptr
imageList_SetOverlayImage uintptr
imageList_Write uintptr
initCommonControls uintptr
initCommonControlsEx uintptr
initMUILanguage uintptr
initializeFlatSB uintptr
lBItemFromPt uintptr
makeDragList uintptr
menuHelp uintptr
propertySheet uintptr
removeWindowSubclass uintptr
setWindowSubclass uintptr
showHideMenuCtl uintptr
str_SetPtrW uintptr
taskDialog uintptr
taskDialogIndirect uintptr
uninitializeFlatSB uintptr
addMRUStringW uintptr
createMRUListW uintptr
createToolbar uintptr
enumMRUListW uintptr
freeMRUList uintptr
imageList_AddIcon uintptr
imageList_GetFlags uintptr
imageList_GetImageRect uintptr
imageList_SetFilter uintptr
imageList_SetFlags uintptr
)
func init() {
// Library
libcomctl32 = doLoadLibrary("comctl32.dll")
// Functions
createMappedBitmap = doGetProcAddress(libcomctl32, "CreateMappedBitmap")
createPropertySheetPage = doGetProcAddress(libcomctl32, "CreatePropertySheetPageW")
createStatusWindow = doGetProcAddress(libcomctl32, "CreateStatusWindowW")
createToolbarEx = doGetProcAddress(libcomctl32, "CreateToolbarEx")
createUpDownControl = doGetProcAddress(libcomctl32, "CreateUpDownControl")
dPA_Create = doGetProcAddress(libcomctl32, "DPA_Create")
dPA_DeleteAllPtrs = doGetProcAddress(libcomctl32, "DPA_DeleteAllPtrs")
dPA_DeletePtr = doGetProcAddress(libcomctl32, "DPA_DeletePtr")
dPA_Destroy = doGetProcAddress(libcomctl32, "DPA_Destroy")
dPA_DestroyCallback = doGetProcAddress(libcomctl32, "DPA_DestroyCallback")
dPA_EnumCallback = doGetProcAddress(libcomctl32, "DPA_EnumCallback")
dPA_GetPtr = doGetProcAddress(libcomctl32, "DPA_GetPtr")
dPA_InsertPtr = doGetProcAddress(libcomctl32, "DPA_InsertPtr")
dPA_Search = doGetProcAddress(libcomctl32, "DPA_Search")
dPA_SetPtr = doGetProcAddress(libcomctl32, "DPA_SetPtr")
dPA_Sort = doGetProcAddress(libcomctl32, "DPA_Sort")
dSA_Create = doGetProcAddress(libcomctl32, "DSA_Create")
dSA_DeleteAllItems = doGetProcAddress(libcomctl32, "DSA_DeleteAllItems")
dSA_Destroy = doGetProcAddress(libcomctl32, "DSA_Destroy")
dSA_DestroyCallback = doGetProcAddress(libcomctl32, "DSA_DestroyCallback")
dSA_GetItemPtr = doGetProcAddress(libcomctl32, "DSA_GetItemPtr")
dSA_InsertItem = doGetProcAddress(libcomctl32, "DSA_InsertItem")
defSubclassProc = doGetProcAddress(libcomctl32, "DefSubclassProc")
destroyPropertySheetPage = doGetProcAddress(libcomctl32, "DestroyPropertySheetPage")
drawInsert = doGetProcAddress(libcomctl32, "DrawInsert")
drawStatusText = doGetProcAddress(libcomctl32, "DrawStatusTextW")
flatSB_EnableScrollBar = doGetProcAddress(libcomctl32, "FlatSB_EnableScrollBar")
flatSB_GetScrollInfo = doGetProcAddress(libcomctl32, "FlatSB_GetScrollInfo")
flatSB_GetScrollPos = doGetProcAddress(libcomctl32, "FlatSB_GetScrollPos")
flatSB_GetScrollProp = doGetProcAddress(libcomctl32, "FlatSB_GetScrollProp")
flatSB_GetScrollPropPtr = doGetProcAddress(libcomctl32, "FlatSB_GetScrollPropPtr")
flatSB_GetScrollRange = doGetProcAddress(libcomctl32, "FlatSB_GetScrollRange")
flatSB_SetScrollInfo = doGetProcAddress(libcomctl32, "FlatSB_SetScrollInfo")
flatSB_SetScrollPos = doGetProcAddress(libcomctl32, "FlatSB_SetScrollPos")
flatSB_SetScrollProp = doGetProcAddress(libcomctl32, "FlatSB_SetScrollProp")
flatSB_SetScrollRange = doGetProcAddress(libcomctl32, "FlatSB_SetScrollRange")
flatSB_ShowScrollBar = doGetProcAddress(libcomctl32, "FlatSB_ShowScrollBar")
getEffectiveClientRect = doGetProcAddress(libcomctl32, "GetEffectiveClientRect")
getMUILanguage = doGetProcAddress(libcomctl32, "GetMUILanguage")
imageList_Add = doGetProcAddress(libcomctl32, "ImageList_Add")
imageList_AddMasked = doGetProcAddress(libcomctl32, "ImageList_AddMasked")
imageList_BeginDrag = doGetProcAddress(libcomctl32, "ImageList_BeginDrag")
imageList_Copy = doGetProcAddress(libcomctl32, "ImageList_Copy")
imageList_Create = doGetProcAddress(libcomctl32, "ImageList_Create")
imageList_Destroy = doGetProcAddress(libcomctl32, "ImageList_Destroy")
imageList_DragEnter = doGetProcAddress(libcomctl32, "ImageList_DragEnter")
imageList_DragLeave = doGetProcAddress(libcomctl32, "ImageList_DragLeave")
imageList_DragMove = doGetProcAddress(libcomctl32, "ImageList_DragMove")
imageList_DragShowNolock = doGetProcAddress(libcomctl32, "ImageList_DragShowNolock")
imageList_Draw = doGetProcAddress(libcomctl32, "ImageList_Draw")
imageList_DrawEx = doGetProcAddress(libcomctl32, "ImageList_DrawEx")
imageList_DrawIndirect = doGetProcAddress(libcomctl32, "ImageList_DrawIndirect")
imageList_Duplicate = doGetProcAddress(libcomctl32, "ImageList_Duplicate")
imageList_EndDrag = doGetProcAddress(libcomctl32, "ImageList_EndDrag")
imageList_GetBkColor = doGetProcAddress(libcomctl32, "ImageList_GetBkColor")
imageList_GetDragImage = doGetProcAddress(libcomctl32, "ImageList_GetDragImage")
imageList_GetIcon = doGetProcAddress(libcomctl32, "ImageList_GetIcon")
imageList_GetIconSize = doGetProcAddress(libcomctl32, "ImageList_GetIconSize")
imageList_GetImageCount = doGetProcAddress(libcomctl32, "ImageList_GetImageCount")
imageList_GetImageInfo = doGetProcAddress(libcomctl32, "ImageList_GetImageInfo")
imageList_LoadImage = doGetProcAddress(libcomctl32, "ImageList_LoadImageW")
imageList_Merge = doGetProcAddress(libcomctl32, "ImageList_Merge")
imageList_Read = doGetProcAddress(libcomctl32, "ImageList_Read")
imageList_Remove = doGetProcAddress(libcomctl32, "ImageList_Remove")
imageList_Replace = doGetProcAddress(libcomctl32, "ImageList_Replace")
imageList_ReplaceIcon = doGetProcAddress(libcomctl32, "ImageList_ReplaceIcon")
imageList_SetBkColor = doGetProcAddress(libcomctl32, "ImageList_SetBkColor")
imageList_SetDragCursorImage = doGetProcAddress(libcomctl32, "ImageList_SetDragCursorImage")
imageList_SetIconSize = doGetProcAddress(libcomctl32, "ImageList_SetIconSize")
imageList_SetImageCount = doGetProcAddress(libcomctl32, "ImageList_SetImageCount")
imageList_SetOverlayImage = doGetProcAddress(libcomctl32, "ImageList_SetOverlayImage")
imageList_Write = doGetProcAddress(libcomctl32, "ImageList_Write")
initCommonControls = doGetProcAddress(libcomctl32, "InitCommonControls")
initCommonControlsEx = doGetProcAddress(libcomctl32, "InitCommonControlsEx")
initMUILanguage = doGetProcAddress(libcomctl32, "InitMUILanguage")
initializeFlatSB = doGetProcAddress(libcomctl32, "InitializeFlatSB")
lBItemFromPt = doGetProcAddress(libcomctl32, "LBItemFromPt")
makeDragList = doGetProcAddress(libcomctl32, "MakeDragList")
menuHelp = doGetProcAddress(libcomctl32, "MenuHelp")
propertySheet = doGetProcAddress(libcomctl32, "PropertySheetW")
removeWindowSubclass = doGetProcAddress(libcomctl32, "RemoveWindowSubclass")
setWindowSubclass = doGetProcAddress(libcomctl32, "SetWindowSubclass")
showHideMenuCtl = doGetProcAddress(libcomctl32, "ShowHideMenuCtl")
str_SetPtrW = doGetProcAddress(libcomctl32, "Str_SetPtrW")
taskDialog = doGetProcAddress(libcomctl32, "TaskDialog")
taskDialogIndirect = doGetProcAddress(libcomctl32, "TaskDialogIndirect")
uninitializeFlatSB = doGetProcAddress(libcomctl32, "UninitializeFlatSB")
addMRUStringW = doGetProcAddress(libcomctl32, "AddMRUStringW")
createMRUListW = doGetProcAddress(libcomctl32, "CreateMRUListW")
createToolbar = doGetProcAddress(libcomctl32, "CreateToolbar")
enumMRUListW = doGetProcAddress(libcomctl32, "EnumMRUListW")
freeMRUList = doGetProcAddress(libcomctl32, "FreeMRUList")
imageList_AddIcon = doGetProcAddress(libcomctl32, "ImageList_AddIcon")
imageList_GetFlags = doGetProcAddress(libcomctl32, "ImageList_GetFlags")
imageList_GetImageRect = doGetProcAddress(libcomctl32, "ImageList_GetImageRect")
imageList_SetFilter = doGetProcAddress(libcomctl32, "ImageList_SetFilter")
imageList_SetFlags = doGetProcAddress(libcomctl32, "ImageList_SetFlags")
}
func CreateMappedBitmap(hInstance HINSTANCE, idBitmap INT_PTR, wFlags UINT, lpColorMap *COLORMAP, iNumMaps int32) HBITMAP {
ret1 := syscall6(createMappedBitmap, 5,
uintptr(hInstance),
uintptr(unsafe.Pointer(idBitmap)),
uintptr(wFlags),
uintptr(unsafe.Pointer(lpColorMap)),
uintptr(iNumMaps),
0)
return HBITMAP(ret1)
}
func CreatePropertySheetPage(constPropSheetPagePointer /*const*/ *PROPSHEETPAGE) HPROPSHEETPAGE {
ret1 := syscall3(createPropertySheetPage, 1,
uintptr(unsafe.Pointer(constPropSheetPagePointer)),
0,
0)
return HPROPSHEETPAGE(ret1)
}
func CreateStatusWindow(style LONG, lpszText string, hwndParent HWND, wID UINT) HWND {
lpszTextStr := unicode16FromString(lpszText)
ret1 := syscall6(createStatusWindow, 4,
uintptr(style),
uintptr(unsafe.Pointer(&lpszTextStr[0])),
uintptr(hwndParent),
uintptr(wID),
0,
0)
return HWND(ret1)
}
func CreateToolbarEx(hwnd HWND, ws DWORD, wID UINT, nBitmaps int32, hBMInst HINSTANCE, wBMID *uint32, lpButtons /*const*/ *TBBUTTON, iNumButtons int32, dxButton int32, dyButton int32, dxBitmap int32, dyBitmap int32, uStructSize UINT) HWND {
ret1 := syscall15(createToolbarEx, 13,
uintptr(hwnd),
uintptr(ws),
uintptr(wID),
uintptr(nBitmaps),
uintptr(hBMInst),
uintptr(unsafe.Pointer(wBMID)),
uintptr(unsafe.Pointer(lpButtons)),
uintptr(iNumButtons),
uintptr(dxButton),
uintptr(dyButton),
uintptr(dxBitmap),
uintptr(dyBitmap),
uintptr(uStructSize),
0,
0)
return HWND(ret1)
}
func CreateUpDownControl(dwStyle DWORD, x int32, y int32, cx int32, cy int32, hParent HWND, nID int32, hInst HINSTANCE, hBuddy HWND, nUpper int32, nLower int32, nPos int32) HWND {
ret1 := syscall12(createUpDownControl, 12,
uintptr(dwStyle),
uintptr(x),
uintptr(y),
uintptr(cx),
uintptr(cy),
uintptr(hParent),
uintptr(nID),
uintptr(hInst),
uintptr(hBuddy),
uintptr(nUpper),
uintptr(nLower),
uintptr(nPos))
return HWND(ret1)
}
func DPA_Create(cItemGrow int32) HDPA {
ret1 := syscall3(dPA_Create, 1,
uintptr(cItemGrow),
0,
0)
return HDPA(ret1)
}
func DPA_DeleteAllPtrs(hdpa HDPA) bool {
ret1 := syscall3(dPA_DeleteAllPtrs, 1,
uintptr(hdpa),
0,
0)
return ret1 != 0
}
func DPA_DeletePtr(hdpa HDPA, i int32) uintptr {
ret1 := syscall3(dPA_DeletePtr, 2,
uintptr(hdpa),
uintptr(i),
0)
return (uintptr)(unsafe.Pointer(ret1))
}
func DPA_Destroy(hdpa HDPA) bool {
ret1 := syscall3(dPA_Destroy, 1,
uintptr(hdpa),
0,
0)
return ret1 != 0
}
func DPA_DestroyCallback(hdpa HDPA, pfnCB DAENUMCALLBACK, pData uintptr) {
pfnCBCallback := syscall.NewCallback(func(pRawArg uintptr, pDataRawArg uintptr) uintptr {
ret := pfnCB(pRawArg, pDataRawArg)
return uintptr(ret)
})
syscall3(dPA_DestroyCallback, 3,
uintptr(hdpa),
pfnCBCallback,
pData)
}
func DPA_EnumCallback(hdpa HDPA, pfnCB DAENUMCALLBACK, pData uintptr) {
pfnCBCallback := syscall.NewCallback(func(pRawArg uintptr, pDataRawArg uintptr) uintptr {
ret := pfnCB(pRawArg, pDataRawArg)
return uintptr(ret)
})
syscall3(dPA_EnumCallback, 3,
uintptr(hdpa),
pfnCBCallback,
pData)
}
func DPA_GetPtr(hdpa HDPA, i INT_PTR) uintptr {
ret1 := syscall3(dPA_GetPtr, 2,
uintptr(hdpa),
uintptr(unsafe.Pointer(i)),
0)
return (uintptr)(unsafe.Pointer(ret1))
}
func DPA_InsertPtr(hdpa HDPA, i int32, p uintptr) int32 {
ret1 := syscall3(dPA_InsertPtr, 3,
uintptr(hdpa),
uintptr(i),
p)
return int32(ret1)
}
func DPA_Search(hdpa HDPA, pFind uintptr, iStart int32, pfnCompare DACOMPARE, lParam LPARAM, options UINT) int32 {
pfnCompareCallback := syscall.NewCallback(func(p1RawArg uintptr, p2RawArg uintptr, lParamRawArg LPARAM) uintptr {
ret := pfnCompare(p1RawArg, p2RawArg, lParamRawArg)
return uintptr(ret)
})
ret1 := syscall6(dPA_Search, 6,
uintptr(hdpa),
pFind,
uintptr(iStart),
pfnCompareCallback,
uintptr(lParam),
uintptr(options))
return int32(ret1)
}
func DPA_SetPtr(hdpa HDPA, i int32, p uintptr) bool {
ret1 := syscall3(dPA_SetPtr, 3,
uintptr(hdpa),
uintptr(i),
p)
return ret1 != 0
}
func DPA_Sort(hdpa HDPA, pfnCompare DACOMPARE, lParam LPARAM) bool {
pfnCompareCallback := syscall.NewCallback(func(p1RawArg uintptr, p2RawArg uintptr, lParamRawArg LPARAM) uintptr {
ret := pfnCompare(p1RawArg, p2RawArg, lParamRawArg)
return uintptr(ret)
})
ret1 := syscall3(dPA_Sort, 3,
uintptr(hdpa),
pfnCompareCallback,
uintptr(lParam))
return ret1 != 0
}
func DSA_Create(cbItem int32, cItemGrow int32) HDSA {
ret1 := syscall3(dSA_Create, 2,
uintptr(cbItem),
uintptr(cItemGrow),
0)
return HDSA(ret1)
}
func DSA_DeleteAllItems(hdsa HDSA) bool {
ret1 := syscall3(dSA_DeleteAllItems, 1,
uintptr(hdsa),
0,
0)
return ret1 != 0
}
func DSA_Destroy(hdsa HDSA) bool {
ret1 := syscall3(dSA_Destroy, 1,
uintptr(hdsa),
0,
0)
return ret1 != 0
}
func DSA_DestroyCallback(hdsa HDSA, pfnCB DAENUMCALLBACK, pData uintptr) {
pfnCBCallback := syscall.NewCallback(func(pRawArg uintptr, pDataRawArg uintptr) uintptr {
ret := pfnCB(pRawArg, pDataRawArg)
return uintptr(ret)
})
syscall3(dSA_DestroyCallback, 3,
uintptr(hdsa),
pfnCBCallback,
pData)
}
func DSA_GetItemPtr(hdsa HDSA, i int32) uintptr {
ret1 := syscall3(dSA_GetItemPtr, 2,
uintptr(hdsa),
uintptr(i),
0)
return (uintptr)(unsafe.Pointer(ret1))
}
func DSA_InsertItem(hdsa HDSA, i int32, pitem /*const*/ uintptr) int32 {
ret1 := syscall3(dSA_InsertItem, 3,
uintptr(hdsa),
uintptr(i),
pitem)
return int32(ret1)
}
func DefSubclassProc(hWnd HWND, uMsg UINT, wParam WPARAM, lParam LPARAM) LRESULT {
ret1 := syscall6(defSubclassProc, 4,
uintptr(hWnd),
uintptr(uMsg),
uintptr(wParam),
uintptr(lParam),
0,
0)
return LRESULT(ret1)
}
func DestroyPropertySheetPage(unnamed0 HPROPSHEETPAGE) bool {
ret1 := syscall3(destroyPropertySheetPage, 1,
uintptr(unnamed0),
0,
0)
return ret1 != 0
}
func DrawInsert(handParent HWND, hLB HWND, nItem int32) {
syscall3(drawInsert, 3,
uintptr(handParent),
uintptr(hLB),
uintptr(nItem))
}
func DrawStatusText(hDC HDC, lprc /*const*/ *RECT, pszText string, uFlags UINT) {
pszTextStr := unicode16FromString(pszText)
syscall6(drawStatusText, 4,
uintptr(hDC),
uintptr(unsafe.Pointer(lprc)),
uintptr(unsafe.Pointer(&pszTextStr[0])),
uintptr(uFlags),
0,
0)
}
func FlatSB_EnableScrollBar(unnamed0 HWND, unnamed1 int32, unnamed2 UINT) bool {
ret1 := syscall3(flatSB_EnableScrollBar, 3,
uintptr(unnamed0),
uintptr(unnamed1),
uintptr(unnamed2))
return ret1 != 0
}
func FlatSB_GetScrollInfo(unnamed0 HWND, code int32, unnamed2 *SCROLLINFO) bool {
ret1 := syscall3(flatSB_GetScrollInfo, 3,
uintptr(unnamed0),
uintptr(code),
uintptr(unsafe.Pointer(unnamed2)))
return ret1 != 0
}
func FlatSB_GetScrollPos(unnamed0 HWND, code int32) int32 {
ret1 := syscall3(flatSB_GetScrollPos, 2,
uintptr(unnamed0),
uintptr(code),
0)
return int32(ret1)
}
func FlatSB_GetScrollProp(unnamed0 HWND, propIndex int32, unnamed2 *int32) bool {
ret1 := syscall3(flatSB_GetScrollProp, 3,
uintptr(unnamed0),
uintptr(propIndex),
uintptr(unsafe.Pointer(unnamed2)))
return ret1 != 0
}
func FlatSB_GetScrollPropPtr(unnamed0 HWND, propIndex int32, unnamed2 PINT_PTR) bool {
ret1 := syscall3(flatSB_GetScrollPropPtr, 3,
uintptr(unnamed0),
uintptr(propIndex),
uintptr(unsafe.Pointer(unnamed2)))
return ret1 != 0
}
func FlatSB_GetScrollRange(unnamed0 HWND, code int32, unnamed2 *int32, unnamed3 *int32) bool {
ret1 := syscall6(flatSB_GetScrollRange, 4,
uintptr(unnamed0),
uintptr(code),
uintptr(unsafe.Pointer(unnamed2)),
uintptr(unsafe.Pointer(unnamed3)),
0,
0)
return ret1 != 0
}
func FlatSB_SetScrollInfo(unnamed0 HWND, code int32, unnamed2 *SCROLLINFO, fRedraw bool) int32 {
ret1 := syscall6(flatSB_SetScrollInfo, 4,
uintptr(unnamed0),
uintptr(code),
uintptr(unsafe.Pointer(unnamed2)),
getUintptrFromBool(fRedraw),
0,
0)
return int32(ret1)
}
func FlatSB_SetScrollPos(unnamed0 HWND, code int32, pos int32, fRedraw bool) int32 {
ret1 := syscall6(flatSB_SetScrollPos, 4,
uintptr(unnamed0),
uintptr(code),
uintptr(pos),
getUintptrFromBool(fRedraw),
0,
0)
return int32(ret1)
}
func FlatSB_SetScrollProp(unnamed0 HWND, index UINT, newValue INT_PTR, unnamed3 bool) bool {
ret1 := syscall6(flatSB_SetScrollProp, 4,
uintptr(unnamed0),
uintptr(index),
uintptr(unsafe.Pointer(newValue)),
getUintptrFromBool(unnamed3),
0,
0)
return ret1 != 0
}
func FlatSB_SetScrollRange(unnamed0 HWND, code int32, min int32, max int32, fRedraw bool) int32 {
ret1 := syscall6(flatSB_SetScrollRange, 5,
uintptr(unnamed0),
uintptr(code),
uintptr(min),
uintptr(max),
getUintptrFromBool(fRedraw),
0)
return int32(ret1)
}
func FlatSB_ShowScrollBar(unnamed0 HWND, code int32, unnamed2 bool) bool {
ret1 := syscall3(flatSB_ShowScrollBar, 3,
uintptr(unnamed0),
uintptr(code),
getUintptrFromBool(unnamed2))
return ret1 != 0
}
func GetEffectiveClientRect(hWnd HWND, lprc *RECT, lpInfo /*const*/ *int32) {
syscall3(getEffectiveClientRect, 3,
uintptr(hWnd),
uintptr(unsafe.Pointer(lprc)),
uintptr(unsafe.Pointer(lpInfo)))
}
func GetMUILanguage() LANGID {
ret1 := syscall3(getMUILanguage, 0,
0,
0,
0)
return LANGID(ret1)
}
func ImageList_Add(himl HIMAGELIST, hbmImage HBITMAP, hbmMask HBITMAP) int32 {
ret1 := syscall3(imageList_Add, 3,
uintptr(himl),
uintptr(hbmImage),
uintptr(hbmMask))
return int32(ret1)
}
func ImageList_AddMasked(himl HIMAGELIST, hbmImage HBITMAP, crMask COLORREF) int32 {
ret1 := syscall3(imageList_AddMasked, 3,
uintptr(himl),
uintptr(hbmImage),
uintptr(crMask))
return int32(ret1)
}
func ImageList_BeginDrag(himlTrack HIMAGELIST, iTrack int32, dxHotspot int32, dyHotspot int32) bool {
ret1 := syscall6(imageList_BeginDrag, 4,
uintptr(himlTrack),
uintptr(iTrack),
uintptr(dxHotspot),
uintptr(dyHotspot),
0,
0)
return ret1 != 0
}
func ImageList_Copy(himlDst HIMAGELIST, iDst int32, himlSrc HIMAGELIST, iSrc int32, uFlags UINT) bool {
ret1 := syscall6(imageList_Copy, 5,
uintptr(himlDst),
uintptr(iDst),
uintptr(himlSrc),
uintptr(iSrc),
uintptr(uFlags),
0)
return ret1 != 0
}
func ImageList_Create(cx int32, cy int32, flags UINT, cInitial int32, cGrow int32) HIMAGELIST {
ret1 := syscall6(imageList_Create, 5,
uintptr(cx),
uintptr(cy),
uintptr(flags),
uintptr(cInitial),
uintptr(cGrow),
0)
return HIMAGELIST(ret1)
}
func ImageList_Destroy(himl HIMAGELIST) bool {
ret1 := syscall3(imageList_Destroy, 1,
uintptr(himl),
0,
0)
return ret1 != 0
}
func ImageList_DragEnter(hwndLock HWND, x int32, y int32) bool {
ret1 := syscall3(imageList_DragEnter, 3,
uintptr(hwndLock),
uintptr(x),
uintptr(y))
return ret1 != 0
}
func ImageList_DragLeave(hwndLock HWND) bool {
ret1 := syscall3(imageList_DragLeave, 1,
uintptr(hwndLock),
0,
0)
return ret1 != 0
}
func ImageList_DragMove(x int32, y int32) bool {
ret1 := syscall3(imageList_DragMove, 2,
uintptr(x),
uintptr(y),
0)
return ret1 != 0
}
func ImageList_DragShowNolock(fShow bool) bool {
ret1 := syscall3(imageList_DragShowNolock, 1,
getUintptrFromBool(fShow),
0,
0)
return ret1 != 0
}
func ImageList_Draw(himl HIMAGELIST, i int32, hdcDst HDC, x int32, y int32, fStyle UINT) bool {
ret1 := syscall6(imageList_Draw, 6,
uintptr(himl),
uintptr(i),
uintptr(hdcDst),
uintptr(x),
uintptr(y),
uintptr(fStyle))
return ret1 != 0
}
func ImageList_DrawEx(himl HIMAGELIST, i int32, hdcDst HDC, x int32, y int32, dx int32, dy int32, rgbBk COLORREF, rgbFg COLORREF, fStyle UINT) bool {
ret1 := syscall12(imageList_DrawEx, 10,
uintptr(himl),
uintptr(i),
uintptr(hdcDst),
uintptr(x),
uintptr(y),
uintptr(dx),
uintptr(dy),
uintptr(rgbBk),
uintptr(rgbFg),
uintptr(fStyle),
0,
0)
return ret1 != 0
}
func ImageList_DrawIndirect(pimldp *IMAGELISTDRAWPARAMS) bool {
ret1 := syscall3(imageList_DrawIndirect, 1,
uintptr(unsafe.Pointer(pimldp)),
0,
0)
return ret1 != 0
}
func ImageList_Duplicate(himl HIMAGELIST) HIMAGELIST {
ret1 := syscall3(imageList_Duplicate, 1,
uintptr(himl),
0,
0)
return HIMAGELIST(ret1)
}
func ImageList_EndDrag() {
syscall3(imageList_EndDrag, 0,
0,
0,
0)
}
func ImageList_GetBkColor(himl HIMAGELIST) COLORREF {
ret1 := syscall3(imageList_GetBkColor, 1,
uintptr(himl),
0,
0)
return COLORREF(ret1)
}
func ImageList_GetDragImage(ppt *POINT, pptHotspot *POINT) HIMAGELIST {
ret1 := syscall3(imageList_GetDragImage, 2,
uintptr(unsafe.Pointer(ppt)),
uintptr(unsafe.Pointer(pptHotspot)),
0)
return HIMAGELIST(ret1)
}
func ImageList_GetIcon(himl HIMAGELIST, i int32, flags UINT) HICON {
ret1 := syscall3(imageList_GetIcon, 3,
uintptr(himl),
uintptr(i),
uintptr(flags))
return HICON(ret1)
}
func ImageList_GetIconSize(himl HIMAGELIST, cx *int, cy *int) bool {
ret1 := syscall3(imageList_GetIconSize, 3,
uintptr(himl),
uintptr(unsafe.Pointer(cx)),
uintptr(unsafe.Pointer(cy)))
return ret1 != 0
}
func ImageList_GetImageCount(himl HIMAGELIST) int32 {
ret1 := syscall3(imageList_GetImageCount, 1,
uintptr(himl),
0,
0)
return int32(ret1)
}
func ImageList_GetImageInfo(himl HIMAGELIST, i int32, pImageInfo *IMAGEINFO) bool {
ret1 := syscall3(imageList_GetImageInfo, 3,
uintptr(himl),
uintptr(i),
uintptr(unsafe.Pointer(pImageInfo)))
return ret1 != 0
}
func ImageList_LoadImage(hi HINSTANCE, lpbmp string, cx int32, cGrow int32, crMask COLORREF, uType UINT, uFlags UINT) HIMAGELIST {
lpbmpStr := unicode16FromString(lpbmp)
ret1 := syscall9(imageList_LoadImage, 7,
uintptr(hi),
uintptr(unsafe.Pointer(&lpbmpStr[0])),
uintptr(cx),
uintptr(cGrow),
uintptr(crMask),
uintptr(uType),
uintptr(uFlags),
0,
0)
return HIMAGELIST(ret1)
}
func ImageList_Merge(himl1 HIMAGELIST, i1 int32, himl2 HIMAGELIST, i2 int32, dx int32, dy int32) HIMAGELIST {
ret1 := syscall6(imageList_Merge, 6,
uintptr(himl1),
uintptr(i1),
uintptr(himl2),
uintptr(i2),
uintptr(dx),
uintptr(dy))
return HIMAGELIST(ret1)
}
func ImageList_Read(pstm LPSTREAM) HIMAGELIST {
ret1 := syscall3(imageList_Read, 1,
uintptr(unsafe.Pointer(pstm)),
0,
0)
return HIMAGELIST(ret1)
}
func ImageList_Remove(himl HIMAGELIST, i int32) bool {
ret1 := syscall3(imageList_Remove, 2,
uintptr(himl),
uintptr(i),
0)
return ret1 != 0
}
func ImageList_Replace(himl HIMAGELIST, i int32, hbmImage HBITMAP, hbmMask HBITMAP) bool {
ret1 := syscall6(imageList_Replace, 4,
uintptr(himl),
uintptr(i),
uintptr(hbmImage),
uintptr(hbmMask),
0,
0)
return ret1 != 0
}
func ImageList_ReplaceIcon(himl HIMAGELIST, i int32, hicon HICON) int32 {
ret1 := syscall3(imageList_ReplaceIcon, 3,
uintptr(himl),
uintptr(i),
uintptr(hicon))
return int32(ret1)
}
func ImageList_SetBkColor(himl HIMAGELIST, clrBk COLORREF) COLORREF {
ret1 := syscall3(imageList_SetBkColor, 2,
uintptr(himl),
uintptr(clrBk),
0)
return COLORREF(ret1)
}
func ImageList_SetDragCursorImage(himlDrag HIMAGELIST, iDrag int32, dxHotspot int32, dyHotspot int32) bool {
ret1 := syscall6(imageList_SetDragCursorImage, 4,
uintptr(himlDrag),
uintptr(iDrag),
uintptr(dxHotspot),
uintptr(dyHotspot),
0,
0)
return ret1 != 0
}
func ImageList_SetIconSize(himl HIMAGELIST, cx int32, cy int32) bool {
ret1 := syscall3(imageList_SetIconSize, 3,
uintptr(himl),
uintptr(cx),
uintptr(cy))
return ret1 != 0
}
func ImageList_SetImageCount(himl HIMAGELIST, uNewCount UINT) bool {
ret1 := syscall3(imageList_SetImageCount, 2,
uintptr(himl),
uintptr(uNewCount),
0)
return ret1 != 0
}
func ImageList_SetOverlayImage(himl HIMAGELIST, iImage int32, iOverlay int32) bool {
ret1 := syscall3(imageList_SetOverlayImage, 3,
uintptr(himl),
uintptr(iImage),
uintptr(iOverlay))
return ret1 != 0
}
func ImageList_Write(himl HIMAGELIST, pstm LPSTREAM) bool {
ret1 := syscall3(imageList_Write, 2,
uintptr(himl),
uintptr(unsafe.Pointer(pstm)),
0)
return ret1 != 0
}
func InitCommonControls() {
syscall3(initCommonControls, 0,
0,
0,
0)
}
func InitCommonControlsEx(unnamed0 /*const*/ *INITCOMMONCONTROLSEX) bool {
ret1 := syscall3(initCommonControlsEx, 1,
uintptr(unsafe.Pointer(unnamed0)),
0,
0)
return ret1 != 0
}
func InitMUILanguage(uiLang LANGID) {
syscall3(initMUILanguage, 1,
uintptr(uiLang),
0,
0)
}
func InitializeFlatSB(unnamed0 HWND) bool {
ret1 := syscall3(initializeFlatSB, 1,
uintptr(unnamed0),
0,
0)
return ret1 != 0
}
func LBItemFromPt(hLB HWND, pt POINT, bAutoScroll bool) int32 {
ret1 := syscall6(lBItemFromPt, 4,
uintptr(hLB),
uintptr(pt.X),
uintptr(pt.Y),
getUintptrFromBool(bAutoScroll),
0,
0)
return int32(ret1)
}
func MakeDragList(hLB HWND) bool {
ret1 := syscall3(makeDragList, 1,
uintptr(hLB),
0,
0)
return ret1 != 0
}
func MenuHelp(uMsg UINT, wParam WPARAM, lParam LPARAM, hMainMenu HMENU, hInst HINSTANCE, hwndStatus HWND, lpwIDs *UINT) {
syscall9(menuHelp, 7,
uintptr(uMsg),
uintptr(wParam),
uintptr(lParam),
uintptr(hMainMenu),
uintptr(hInst),
uintptr(hwndStatus),
uintptr(unsafe.Pointer(lpwIDs)),
0,
0)
}
func PropertySheet(unnamed0 /*const*/ *PROPSHEETHEADER) INT_PTR {
ret1 := syscall3(propertySheet, 1,
uintptr(unsafe.Pointer(unnamed0)),
0,
0)
return (INT_PTR)(unsafe.Pointer(ret1))
}
func RemoveWindowSubclass(hWnd HWND, pfnSubclass SUBCLASSPROC, uIdSubclass *uint32) bool {
pfnSubclassCallback := syscall.NewCallback(func(hWndRawArg HWND, uMsgRawArg UINT, wParamRawArg WPARAM, lParamRawArg LPARAM, uIdSubclassRawArg UINT_PTR, dwRefDataRawArg DWORD_PTR) uintptr {
ret := pfnSubclass(hWndRawArg, uMsgRawArg, wParamRawArg, lParamRawArg, uIdSubclassRawArg, dwRefDataRawArg)
return uintptr(ret)
})
ret1 := syscall3(removeWindowSubclass, 3,
uintptr(hWnd),
pfnSubclassCallback,
uintptr(unsafe.Pointer(uIdSubclass)))
return ret1 != 0
}
func SetWindowSubclass(hWnd HWND, pfnSubclass SUBCLASSPROC, uIdSubclass *uint32, dwRefData *uint32) bool {
pfnSubclassCallback := syscall.NewCallback(func(hWndRawArg HWND, uMsgRawArg UINT, wParamRawArg WPARAM, lParamRawArg LPARAM, uIdSubclassRawArg UINT_PTR, dwRefDataRawArg DWORD_PTR) uintptr {
ret := pfnSubclass(hWndRawArg, uMsgRawArg, wParamRawArg, lParamRawArg, uIdSubclassRawArg, dwRefDataRawArg)
return uintptr(ret)
})
ret1 := syscall6(setWindowSubclass, 4,
uintptr(hWnd),
pfnSubclassCallback,
uintptr(unsafe.Pointer(uIdSubclass)),
uintptr(unsafe.Pointer(dwRefData)),
0,
0)
return ret1 != 0
}
func ShowHideMenuCtl(hWnd HWND, uFlags *uint32, lpInfo *int32) bool {
ret1 := syscall3(showHideMenuCtl, 3,
uintptr(hWnd),
uintptr(unsafe.Pointer(uFlags)),