forked from JamesHovious/w32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.go
2784 lines (2619 loc) · 75.8 KB
/
constants.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
// Copyright 2010-2012 The W32 Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package w32
const (
FALSE = 0
TRUE = 1
)
const (
NO_ERROR = 0
ERROR_SUCCESS = 0
ERROR_FILE_NOT_FOUND = 2
ERROR_PATH_NOT_FOUND = 3
ERROR_ACCESS_DENIED = 5
ERROR_INVALID_HANDLE = 6
ERROR_BAD_FORMAT = 11
ERROR_INVALID_NAME = 123
ERROR_MORE_DATA = 234
ERROR_NO_MORE_ITEMS = 259
ERROR_INVALID_SERVICE_CONTROL = 1052
ERROR_SERVICE_REQUEST_TIMEOUT = 1053
ERROR_SERVICE_NO_THREAD = 1054
ERROR_SERVICE_DATABASE_LOCKED = 1055
ERROR_SERVICE_ALREADY_RUNNING = 1056
ERROR_SERVICE_DISABLED = 1058
ERROR_SERVICE_DOES_NOT_EXIST = 1060
ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061
ERROR_SERVICE_NOT_ACTIVE = 1062
ERROR_DATABASE_DOES_NOT_EXIST = 1065
ERROR_SERVICE_DEPENDENCY_FAIL = 1068
ERROR_SERVICE_LOGON_FAILED = 1069
ERROR_SERVICE_MARKED_FOR_DELETE = 1072
ERROR_SERVICE_DEPENDENCY_DELETED = 1075
)
// SendMessageTimeout Flags
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms644952(v=vs.85).aspx
const (
SMTO_ABORTIFHUNG = 0x0002
SMTO_BLOCK = 0x0001
SMTO_NORMAL = 0x0000
SMTO_NOTIMEOUTIFNOTHUNG = 0x0008
SMTO_ERRORONEXIT = 0x0020
)
const (
MEM_COMMIT = 0x00001000
MEM_RESERVE = 0x00002000
MEM_RESET = 0x00080000
MEM_RESET_UNDO = 0x1000000
MEM_LARGE_PAGES = 0x20000000
MEM_PHYSICAL = 0x00400000
MEM_TOP_DOWN = 0x00100000
MEM_DECOMMIT = 0x4000
MEM_RELEASE = 0x8000
)
const (
PAGE_EXECUTE = 0x10
PAGE_EXECUTE_READ = 0x20
PAGE_EXECUTE_READWRITE = 0x40
PAGE_EXECUTE_WRITECOPY = 0x80
PAGE_NOACCESS = 0x01
PAGE_READWRITE = 0x04
PAGE_WRITECOPY = 0x08
PAGE_TARGETS_INVALID = 0x40000000
PAGE_TARGETS_NO_UPDATE = 0x40000000
)
const (
SE_ERR_FNF = 2
SE_ERR_PNF = 3
SE_ERR_ACCESSDENIED = 5
SE_ERR_OOM = 8
SE_ERR_DLLNOTFOUND = 32
SE_ERR_SHARE = 26
SE_ERR_ASSOCINCOMPLETE = 27
SE_ERR_DDETIMEOUT = 28
SE_ERR_DDEFAIL = 29
SE_ERR_DDEBUSY = 30
SE_ERR_NOASSOC = 31
)
const (
CW_USEDEFAULT = ^0x7fffffff
)
// ShowWindow constants
const (
SW_HIDE = 0
SW_NORMAL = 1
SW_SHOWNORMAL = 1
SW_SHOWMINIMIZED = 2
SW_MAXIMIZE = 3
SW_SHOWMAXIMIZED = 3
SW_SHOWNOACTIVATE = 4
SW_SHOW = 5
SW_MINIMIZE = 6
SW_SHOWMINNOACTIVE = 7
SW_SHOWNA = 8
SW_RESTORE = 9
SW_SHOWDEFAULT = 10
SW_FORCEMINIMIZE = 11
)
// Window class styles
const (
CS_VREDRAW = 0x00000001
CS_HREDRAW = 0x00000002
CS_KEYCVTWINDOW = 0x00000004
CS_DBLCLKS = 0x00000008
CS_OWNDC = 0x00000020
CS_CLASSDC = 0x00000040
CS_PARENTDC = 0x00000080
CS_NOKEYCVT = 0x00000100
CS_NOCLOSE = 0x00000200
CS_SAVEBITS = 0x00000800
CS_BYTEALIGNCLIENT = 0x00001000
CS_BYTEALIGNWINDOW = 0x00002000
CS_GLOBALCLASS = 0x00004000
CS_IME = 0x00010000
CS_DROPSHADOW = 0x00020000
)
// Predefined cursor constants
const (
IDC_ARROW = 32512
IDC_IBEAM = 32513
IDC_WAIT = 32514
IDC_CROSS = 32515
IDC_UPARROW = 32516
IDC_SIZENWSE = 32642
IDC_SIZENESW = 32643
IDC_SIZEWE = 32644
IDC_SIZENS = 32645
IDC_SIZEALL = 32646
IDC_NO = 32648
IDC_HAND = 32649
IDC_APPSTARTING = 32650
IDC_HELP = 32651
IDC_ICON = 32641
IDC_SIZE = 32640
)
// Predefined icon constants
const (
IDI_APPLICATION = 32512
IDI_HAND = 32513
IDI_QUESTION = 32514
IDI_EXCLAMATION = 32515
IDI_ASTERISK = 32516
IDI_WINLOGO = 32517
IDI_WARNING = IDI_EXCLAMATION
IDI_ERROR = IDI_HAND
IDI_INFORMATION = IDI_ASTERISK
)
// Button style constants
const (
BS_3STATE = 5
BS_AUTO3STATE = 6
BS_AUTOCHECKBOX = 3
BS_AUTORADIOBUTTON = 9
BS_BITMAP = 128
BS_BOTTOM = 0X800
BS_CENTER = 0X300
BS_CHECKBOX = 2
BS_DEFPUSHBUTTON = 1
BS_GROUPBOX = 7
BS_ICON = 64
BS_LEFT = 256
BS_LEFTTEXT = 32
BS_MULTILINE = 0X2000
BS_NOTIFY = 0X4000
BS_OWNERDRAW = 0XB
BS_PUSHBUTTON = 0
BS_PUSHLIKE = 4096
BS_RADIOBUTTON = 4
BS_RIGHT = 512
BS_RIGHTBUTTON = 32
BS_TEXT = 0
BS_TOP = 0X400
BS_USERBUTTON = 8
BS_VCENTER = 0XC00
BS_FLAT = 0X8000
)
// Button state constants
const (
BST_CHECKED = 1
BST_INDETERMINATE = 2
BST_UNCHECKED = 0
BST_FOCUS = 8
BST_PUSHED = 4
)
// Predefined brushes constants
const (
COLOR_3DDKSHADOW = 21
COLOR_3DFACE = 15
COLOR_3DHILIGHT = 20
COLOR_3DHIGHLIGHT = 20
COLOR_3DLIGHT = 22
COLOR_BTNHILIGHT = 20
COLOR_3DSHADOW = 16
COLOR_ACTIVEBORDER = 10
COLOR_ACTIVECAPTION = 2
COLOR_APPWORKSPACE = 12
COLOR_BACKGROUND = 1
COLOR_DESKTOP = 1
COLOR_BTNFACE = 15
COLOR_BTNHIGHLIGHT = 20
COLOR_BTNSHADOW = 16
COLOR_BTNTEXT = 18
COLOR_CAPTIONTEXT = 9
COLOR_GRAYTEXT = 17
COLOR_HIGHLIGHT = 13
COLOR_HIGHLIGHTTEXT = 14
COLOR_INACTIVEBORDER = 11
COLOR_INACTIVECAPTION = 3
COLOR_INACTIVECAPTIONTEXT = 19
COLOR_INFOBK = 24
COLOR_INFOTEXT = 23
COLOR_MENU = 4
COLOR_MENUTEXT = 7
COLOR_SCROLLBAR = 0
COLOR_WINDOW = 5
COLOR_WINDOWFRAME = 6
COLOR_WINDOWTEXT = 8
COLOR_HOTLIGHT = 26
COLOR_GRADIENTACTIVECAPTION = 27
COLOR_GRADIENTINACTIVECAPTION = 28
)
// Button message constants
const (
BM_CLICK = 245
BM_GETCHECK = 240
BM_GETIMAGE = 246
BM_GETSTATE = 242
BM_SETCHECK = 241
BM_SETIMAGE = 247
BM_SETSTATE = 243
BM_SETSTYLE = 244
)
// Button notifications
const (
BN_CLICKED = 0
BN_PAINT = 1
BN_HILITE = 2
BN_PUSHED = BN_HILITE
BN_UNHILITE = 3
BN_UNPUSHED = BN_UNHILITE
BN_DISABLE = 4
BN_DOUBLECLICKED = 5
BN_DBLCLK = BN_DOUBLECLICKED
BN_SETFOCUS = 6
BN_KILLFOCUS = 7
)
// GetWindowLong and GetWindowLongPtr constants
const (
GWL_EXSTYLE = -20
GWL_STYLE = -16
GWL_WNDPROC = -4
GWLP_WNDPROC = -4
GWL_HINSTANCE = -6
GWLP_HINSTANCE = -6
GWL_HWNDPARENT = -8
GWLP_HWNDPARENT = -8
GWL_ID = -12
GWLP_ID = -12
GWL_USERDATA = -21
GWLP_USERDATA = -21
)
// Window style constants
const (
WS_OVERLAPPED = 0X00000000
WS_POPUP = 0X80000000
WS_CHILD = 0X40000000
WS_MINIMIZE = 0X20000000
WS_VISIBLE = 0X10000000
WS_DISABLED = 0X08000000
WS_CLIPSIBLINGS = 0X04000000
WS_CLIPCHILDREN = 0X02000000
WS_MAXIMIZE = 0X01000000
WS_CAPTION = 0X00C00000
WS_BORDER = 0X00800000
WS_DLGFRAME = 0X00400000
WS_VSCROLL = 0X00200000
WS_HSCROLL = 0X00100000
WS_SYSMENU = 0X00080000
WS_THICKFRAME = 0X00040000
WS_GROUP = 0X00020000
WS_TABSTOP = 0X00010000
WS_MINIMIZEBOX = 0X00020000
WS_MAXIMIZEBOX = 0X00010000
WS_TILED = 0X00000000
WS_ICONIC = 0X20000000
WS_SIZEBOX = 0X00040000
WS_OVERLAPPEDWINDOW = 0X00000000 | 0X00C00000 | 0X00080000 | 0X00040000 | 0X00020000 | 0X00010000
WS_POPUPWINDOW = 0X80000000 | 0X00800000 | 0X00080000
WS_CHILDWINDOW = 0X40000000
)
// Extended window style constants
const (
WS_EX_DLGMODALFRAME = 0X00000001
WS_EX_NOPARENTNOTIFY = 0X00000004
WS_EX_TOPMOST = 0X00000008
WS_EX_ACCEPTFILES = 0X00000010
WS_EX_TRANSPARENT = 0X00000020
WS_EX_MDICHILD = 0X00000040
WS_EX_TOOLWINDOW = 0X00000080
WS_EX_WINDOWEDGE = 0X00000100
WS_EX_CLIENTEDGE = 0X00000200
WS_EX_CONTEXTHELP = 0X00000400
WS_EX_RIGHT = 0X00001000
WS_EX_LEFT = 0X00000000
WS_EX_RTLREADING = 0X00002000
WS_EX_LTRREADING = 0X00000000
WS_EX_LEFTSCROLLBAR = 0X00004000
WS_EX_RIGHTSCROLLBAR = 0X00000000
WS_EX_CONTROLPARENT = 0X00010000
WS_EX_STATICEDGE = 0X00020000
WS_EX_APPWINDOW = 0X00040000
WS_EX_OVERLAPPEDWINDOW = 0X00000100 | 0X00000200
WS_EX_PALETTEWINDOW = 0X00000100 | 0X00000080 | 0X00000008
WS_EX_LAYERED = 0X00080000
WS_EX_NOINHERITLAYOUT = 0X00100000
WS_EX_LAYOUTRTL = 0X00400000
WS_EX_NOACTIVATE = 0X08000000
)
// Window message constants
const (
WM_APP = 32768
WM_ACTIVATE = 6
WM_ACTIVATEAPP = 28
WM_AFXFIRST = 864
WM_AFXLAST = 895
WM_ASKCBFORMATNAME = 780
WM_CANCELJOURNAL = 75
WM_CANCELMODE = 31
WM_CAPTURECHANGED = 533
WM_CHANGECBCHAIN = 781
WM_CHAR = 258
WM_CHARTOITEM = 47
WM_CHILDACTIVATE = 34
WM_CLEAR = 771
WM_CLOSE = 16
WM_COMMAND = 273
WM_COMMNOTIFY = 68 /* OBSOLETE */
WM_COMPACTING = 65
WM_COMPAREITEM = 57
WM_CONTEXTMENU = 123
WM_COPY = 769
WM_COPYDATA = 74
WM_CREATE = 1
WM_CTLCOLORBTN = 309
WM_CTLCOLORDLG = 310
WM_CTLCOLOREDIT = 307
WM_CTLCOLORLISTBOX = 308
WM_CTLCOLORMSGBOX = 306
WM_CTLCOLORSCROLLBAR = 311
WM_CTLCOLORSTATIC = 312
WM_CUT = 768
WM_DEADCHAR = 259
WM_DELETEITEM = 45
WM_DESTROY = 2
WM_DESTROYCLIPBOARD = 775
WM_DEVICECHANGE = 537
WM_DEVMODECHANGE = 27
WM_DISPLAYCHANGE = 126
WM_DRAWCLIPBOARD = 776
WM_DRAWITEM = 43
WM_DROPFILES = 563
WM_ENABLE = 10
WM_ENDSESSION = 22
WM_ENTERIDLE = 289
WM_ENTERMENULOOP = 529
WM_ENTERSIZEMOVE = 561
WM_ERASEBKGND = 20
WM_EXITMENULOOP = 530
WM_EXITSIZEMOVE = 562
WM_FONTCHANGE = 29
WM_GETDLGCODE = 135
WM_GETFONT = 49
WM_GETHOTKEY = 51
WM_GETICON = 127
WM_GETMINMAXINFO = 36
WM_GETTEXT = 13
WM_GETTEXTLENGTH = 14
WM_HANDHELDFIRST = 856
WM_HANDHELDLAST = 863
WM_HELP = 83
WM_HOTKEY = 786
WM_HSCROLL = 276
WM_HSCROLLCLIPBOARD = 782
WM_ICONERASEBKGND = 39
WM_INITDIALOG = 272
WM_INITMENU = 278
WM_INITMENUPOPUP = 279
WM_INPUT = 0X00FF
WM_INPUTLANGCHANGE = 81
WM_INPUTLANGCHANGEREQUEST = 80
WM_KEYDOWN = 256
WM_KEYUP = 257
WM_KILLFOCUS = 8
WM_MDIACTIVATE = 546
WM_MDICASCADE = 551
WM_MDICREATE = 544
WM_MDIDESTROY = 545
WM_MDIGETACTIVE = 553
WM_MDIICONARRANGE = 552
WM_MDIMAXIMIZE = 549
WM_MDINEXT = 548
WM_MDIREFRESHMENU = 564
WM_MDIRESTORE = 547
WM_MDISETMENU = 560
WM_MDITILE = 550
WM_MEASUREITEM = 44
WM_GETOBJECT = 0X003D
WM_CHANGEUISTATE = 0X0127
WM_UPDATEUISTATE = 0X0128
WM_QUERYUISTATE = 0X0129
WM_UNINITMENUPOPUP = 0X0125
WM_MENURBUTTONUP = 290
WM_MENUCOMMAND = 0X0126
WM_MENUGETOBJECT = 0X0124
WM_MENUDRAG = 0X0123
WM_APPCOMMAND = 0X0319
WM_MENUCHAR = 288
WM_MENUSELECT = 287
WM_MOVE = 3
WM_MOVING = 534
WM_NCACTIVATE = 134
WM_NCCALCSIZE = 131
WM_NCCREATE = 129
WM_NCDESTROY = 130
WM_NCHITTEST = 132
WM_NCLBUTTONDBLCLK = 163
WM_NCLBUTTONDOWN = 161
WM_NCLBUTTONUP = 162
WM_NCMBUTTONDBLCLK = 169
WM_NCMBUTTONDOWN = 167
WM_NCMBUTTONUP = 168
WM_NCXBUTTONDOWN = 171
WM_NCXBUTTONUP = 172
WM_NCXBUTTONDBLCLK = 173
WM_NCMOUSEHOVER = 0X02A0
WM_NCMOUSELEAVE = 0X02A2
WM_NCMOUSEMOVE = 160
WM_NCPAINT = 133
WM_NCRBUTTONDBLCLK = 166
WM_NCRBUTTONDOWN = 164
WM_NCRBUTTONUP = 165
WM_NEXTDLGCTL = 40
WM_NEXTMENU = 531
WM_NOTIFY = 78
WM_NOTIFYFORMAT = 85
WM_NULL = 0
WM_PAINT = 15
WM_PAINTCLIPBOARD = 777
WM_PAINTICON = 38
WM_PALETTECHANGED = 785
WM_PALETTEISCHANGING = 784
WM_PARENTNOTIFY = 528
WM_PASTE = 770
WM_PENWINFIRST = 896
WM_PENWINLAST = 911
WM_POWER = 72
WM_POWERBROADCAST = 536
WM_PRINT = 791
WM_PRINTCLIENT = 792
WM_QUERYDRAGICON = 55
WM_QUERYENDSESSION = 17
WM_QUERYNEWPALETTE = 783
WM_QUERYOPEN = 19
WM_QUEUESYNC = 35
WM_QUIT = 18
WM_RENDERALLFORMATS = 774
WM_RENDERFORMAT = 773
WM_SETCURSOR = 32
WM_SETFOCUS = 7
WM_SETFONT = 48
WM_SETHOTKEY = 50
WM_SETICON = 128
WM_SETREDRAW = 11
WM_SETTEXT = 12
WM_SETTINGCHANGE = 26
WM_SHOWWINDOW = 24
WM_SIZE = 5
WM_SIZECLIPBOARD = 779
WM_SIZING = 532
WM_SPOOLERSTATUS = 42
WM_STYLECHANGED = 125
WM_STYLECHANGING = 124
WM_SYSCHAR = 262
WM_SYSCOLORCHANGE = 21
WM_SYSCOMMAND = 274
WM_SYSDEADCHAR = 263
WM_SYSKEYDOWN = 260
WM_SYSKEYUP = 261
WM_TCARD = 82
WM_THEMECHANGED = 794
WM_TIMECHANGE = 30
WM_TIMER = 275
WM_UNDO = 772
WM_USER = 1024
WM_USERCHANGED = 84
WM_VKEYTOITEM = 46
WM_VSCROLL = 277
WM_VSCROLLCLIPBOARD = 778
WM_WINDOWPOSCHANGED = 71
WM_WINDOWPOSCHANGING = 70
WM_WININICHANGE = 26
WM_KEYFIRST = 256
WM_KEYLAST = 264
WM_SYNCPAINT = 136
WM_MOUSEACTIVATE = 33
WM_MOUSEMOVE = 512
WM_LBUTTONDOWN = 513
WM_LBUTTONUP = 514
WM_LBUTTONDBLCLK = 515
WM_RBUTTONDOWN = 516
WM_RBUTTONUP = 517
WM_RBUTTONDBLCLK = 518
WM_MBUTTONDOWN = 519
WM_MBUTTONUP = 520
WM_MBUTTONDBLCLK = 521
WM_MOUSEWHEEL = 522
WM_MOUSEFIRST = 512
WM_XBUTTONDOWN = 523
WM_XBUTTONUP = 524
WM_XBUTTONDBLCLK = 525
WM_MOUSELAST = 525
WM_MOUSEHOVER = 0X2A1
WM_MOUSELEAVE = 0X2A3
WM_CLIPBOARDUPDATE = 0x031D
)
// WM_ACTIVATE
const (
WA_INACTIVE = 0
WA_ACTIVE = 1
WA_CLICKACTIVE = 2
)
const LF_FACESIZE = 32
// Font weight constants
const (
FW_DONTCARE = 0
FW_THIN = 100
FW_EXTRALIGHT = 200
FW_ULTRALIGHT = FW_EXTRALIGHT
FW_LIGHT = 300
FW_NORMAL = 400
FW_REGULAR = 400
FW_MEDIUM = 500
FW_SEMIBOLD = 600
FW_DEMIBOLD = FW_SEMIBOLD
FW_BOLD = 700
FW_EXTRABOLD = 800
FW_ULTRABOLD = FW_EXTRABOLD
FW_HEAVY = 900
FW_BLACK = FW_HEAVY
)
// Charset constants
const (
ANSI_CHARSET = 0
DEFAULT_CHARSET = 1
SYMBOL_CHARSET = 2
SHIFTJIS_CHARSET = 128
HANGEUL_CHARSET = 129
HANGUL_CHARSET = 129
GB2312_CHARSET = 134
CHINESEBIG5_CHARSET = 136
GREEK_CHARSET = 161
TURKISH_CHARSET = 162
HEBREW_CHARSET = 177
ARABIC_CHARSET = 178
BALTIC_CHARSET = 186
RUSSIAN_CHARSET = 204
THAI_CHARSET = 222
EASTEUROPE_CHARSET = 238
OEM_CHARSET = 255
JOHAB_CHARSET = 130
VIETNAMESE_CHARSET = 163
MAC_CHARSET = 77
)
// Font output precision constants
const (
OUT_DEFAULT_PRECIS = 0
OUT_STRING_PRECIS = 1
OUT_CHARACTER_PRECIS = 2
OUT_STROKE_PRECIS = 3
OUT_TT_PRECIS = 4
OUT_DEVICE_PRECIS = 5
OUT_RASTER_PRECIS = 6
OUT_TT_ONLY_PRECIS = 7
OUT_OUTLINE_PRECIS = 8
OUT_PS_ONLY_PRECIS = 10
)
// Font clipping precision constants
const (
CLIP_DEFAULT_PRECIS = 0
CLIP_CHARACTER_PRECIS = 1
CLIP_STROKE_PRECIS = 2
CLIP_MASK = 15
CLIP_LH_ANGLES = 16
CLIP_TT_ALWAYS = 32
CLIP_EMBEDDED = 128
)
// Font output quality constants
const (
DEFAULT_QUALITY = 0
DRAFT_QUALITY = 1
PROOF_QUALITY = 2
NONANTIALIASED_QUALITY = 3
ANTIALIASED_QUALITY = 4
CLEARTYPE_QUALITY = 5
)
// Font pitch constants
const (
DEFAULT_PITCH = 0
FIXED_PITCH = 1
VARIABLE_PITCH = 2
)
// Font family constants
const (
FF_DECORATIVE = 80
FF_DONTCARE = 0
FF_MODERN = 48
FF_ROMAN = 16
FF_SCRIPT = 64
FF_SWISS = 32
)
// DeviceCapabilities capabilities
const (
DC_FIELDS = 1
DC_PAPERS = 2
DC_PAPERSIZE = 3
DC_MINEXTENT = 4
DC_MAXEXTENT = 5
DC_BINS = 6
DC_DUPLEX = 7
DC_SIZE = 8
DC_EXTRA = 9
DC_VERSION = 10
DC_DRIVER = 11
DC_BINNAMES = 12
DC_ENUMRESOLUTIONS = 13
DC_FILEDEPENDENCIES = 14
DC_TRUETYPE = 15
DC_PAPERNAMES = 16
DC_ORIENTATION = 17
DC_COPIES = 18
DC_BINADJUST = 19
DC_EMF_COMPLIANT = 20
DC_DATATYPE_PRODUCED = 21
DC_COLLATE = 22
DC_MANUFACTURER = 23
DC_MODEL = 24
DC_PERSONALITY = 25
DC_PRINTRATE = 26
DC_PRINTRATEUNIT = 27
DC_PRINTERMEM = 28
DC_MEDIAREADY = 29
DC_STAPLE = 30
DC_PRINTRATEPPM = 31
DC_COLORDEVICE = 32
DC_NUP = 33
DC_MEDIATYPENAMES = 34
DC_MEDIATYPES = 35
)
// GetDeviceCaps index constants
const (
DRIVERVERSION = 0
TECHNOLOGY = 2
HORZSIZE = 4
VERTSIZE = 6
HORZRES = 8
VERTRES = 10
LOGPIXELSX = 88
LOGPIXELSY = 90
BITSPIXEL = 12
PLANES = 14
NUMBRUSHES = 16
NUMPENS = 18
NUMFONTS = 22
NUMCOLORS = 24
NUMMARKERS = 20
ASPECTX = 40
ASPECTY = 42
ASPECTXY = 44
PDEVICESIZE = 26
CLIPCAPS = 36
SIZEPALETTE = 104
NUMRESERVED = 106
COLORRES = 108
PHYSICALWIDTH = 110
PHYSICALHEIGHT = 111
PHYSICALOFFSETX = 112
PHYSICALOFFSETY = 113
SCALINGFACTORX = 114
SCALINGFACTORY = 115
VREFRESH = 116
DESKTOPHORZRES = 118
DESKTOPVERTRES = 117
BLTALIGNMENT = 119
SHADEBLENDCAPS = 120
COLORMGMTCAPS = 121
RASTERCAPS = 38
CURVECAPS = 28
LINECAPS = 30
POLYGONALCAPS = 32
TEXTCAPS = 34
)
// GetDeviceCaps TECHNOLOGY constants
const (
DT_PLOTTER = 0
DT_RASDISPLAY = 1
DT_RASPRINTER = 2
DT_RASCAMERA = 3
DT_CHARSTREAM = 4
DT_METAFILE = 5
DT_DISPFILE = 6
)
// GetDeviceCaps SHADEBLENDCAPS constants
const (
SB_NONE = 0x00
SB_CONST_ALPHA = 0x01
SB_PIXEL_ALPHA = 0x02
SB_PREMULT_ALPHA = 0x04
SB_GRAD_RECT = 0x10
SB_GRAD_TRI = 0x20
)
// GetDeviceCaps COLORMGMTCAPS constants
const (
CM_NONE = 0x00
CM_DEVICE_ICM = 0x01
CM_GAMMA_RAMP = 0x02
CM_CMYK_COLOR = 0x04
)
// GetDeviceCaps RASTERCAPS constants
const (
RC_BANDING = 2
RC_BITBLT = 1
RC_BITMAP64 = 8
RC_DI_BITMAP = 128
RC_DIBTODEV = 512
RC_FLOODFILL = 4096
RC_GDI20_OUTPUT = 16
RC_PALETTE = 256
RC_SCALING = 4
RC_STRETCHBLT = 2048
RC_STRETCHDIB = 8192
RC_DEVBITS = 0x8000
RC_OP_DX_OUTPUT = 0x4000
)
// GetDeviceCaps CURVECAPS constants
const (
CC_NONE = 0
CC_CIRCLES = 1
CC_PIE = 2
CC_CHORD = 4
CC_ELLIPSES = 8
CC_WIDE = 16
CC_STYLED = 32
CC_WIDESTYLED = 64
CC_INTERIORS = 128
CC_ROUNDRECT = 256
)
// GetDeviceCaps LINECAPS constants
const (
LC_NONE = 0
LC_POLYLINE = 2
LC_MARKER = 4
LC_POLYMARKER = 8
LC_WIDE = 16
LC_STYLED = 32
LC_WIDESTYLED = 64
LC_INTERIORS = 128
)
// GetDeviceCaps POLYGONALCAPS constants
const (
PC_NONE = 0
PC_POLYGON = 1
PC_POLYPOLYGON = 256
PC_PATHS = 512
PC_RECTANGLE = 2
PC_WINDPOLYGON = 4
PC_SCANLINE = 8
PC_TRAPEZOID = 4
PC_WIDE = 16
PC_STYLED = 32
PC_WIDESTYLED = 64
PC_INTERIORS = 128
)
// GetDeviceCaps TEXTCAPS constants
const (
TC_OP_CHARACTER = 1
TC_OP_STROKE = 2
TC_CP_STROKE = 4
TC_CR_90 = 8
TC_CR_ANY = 16
TC_SF_X_YINDEP = 32
TC_SA_DOUBLE = 64
TC_SA_INTEGER = 128
TC_SA_CONTIN = 256
TC_EA_DOUBLE = 512
TC_IA_ABLE = 1024
TC_UA_ABLE = 2048
TC_SO_ABLE = 4096
TC_RA_ABLE = 8192
TC_VA_ABLE = 16384
TC_RESERVED = 32768
TC_SCROLLBLT = 65536
)
// Static control styles
const (
SS_BITMAP = 14
SS_BLACKFRAME = 7
SS_BLACKRECT = 4
SS_CENTER = 1
SS_CENTERIMAGE = 512
SS_EDITCONTROL = 0x2000
SS_ENHMETAFILE = 15
SS_ETCHEDFRAME = 18
SS_ETCHEDHORZ = 16
SS_ETCHEDVERT = 17
SS_GRAYFRAME = 8
SS_GRAYRECT = 5
SS_ICON = 3
SS_LEFT = 0
SS_LEFTNOWORDWRAP = 0xc
SS_NOPREFIX = 128
SS_NOTIFY = 256
SS_OWNERDRAW = 0xd
SS_REALSIZECONTROL = 0x040
SS_REALSIZEIMAGE = 0x800
SS_RIGHT = 2
SS_RIGHTJUST = 0x400
SS_SIMPLE = 11
SS_SUNKEN = 4096
SS_WHITEFRAME = 9
SS_WHITERECT = 6
SS_USERITEM = 10
SS_TYPEMASK = 0x0000001F
SS_ENDELLIPSIS = 0x00004000
SS_PATHELLIPSIS = 0x00008000
SS_WORDELLIPSIS = 0x0000C000
SS_ELLIPSISMASK = 0x0000C000
)
// Edit styles
const (
ES_LEFT = 0x0000
ES_CENTER = 0x0001
ES_RIGHT = 0x0002
ES_MULTILINE = 0x0004
ES_UPPERCASE = 0x0008
ES_LOWERCASE = 0x0010
ES_PASSWORD = 0x0020
ES_AUTOVSCROLL = 0x0040
ES_AUTOHSCROLL = 0x0080
ES_NOHIDESEL = 0x0100
ES_OEMCONVERT = 0x0400
ES_READONLY = 0x0800
ES_WANTRETURN = 0x1000
ES_NUMBER = 0x2000
)
// Edit notifications
const (
EN_SETFOCUS = 0x0100
EN_KILLFOCUS = 0x0200
EN_CHANGE = 0x0300
EN_UPDATE = 0x0400
EN_ERRSPACE = 0x0500
EN_MAXTEXT = 0x0501
EN_HSCROLL = 0x0601
EN_VSCROLL = 0x0602
EN_ALIGN_LTR_EC = 0x0700
EN_ALIGN_RTL_EC = 0x0701
)
// Edit messages
const (
EM_GETSEL = 0x00B0
EM_SETSEL = 0x00B1
EM_GETRECT = 0x00B2
EM_SETRECT = 0x00B3
EM_SETRECTNP = 0x00B4
EM_SCROLL = 0x00B5
EM_LINESCROLL = 0x00B6
EM_SCROLLCARET = 0x00B7
EM_GETMODIFY = 0x00B8
EM_SETMODIFY = 0x00B9
EM_GETLINECOUNT = 0x00BA
EM_LINEINDEX = 0x00BB
EM_SETHANDLE = 0x00BC
EM_GETHANDLE = 0x00BD
EM_GETTHUMB = 0x00BE
EM_LINELENGTH = 0x00C1
EM_REPLACESEL = 0x00C2
EM_GETLINE = 0x00C4
EM_LIMITTEXT = 0x00C5
EM_CANUNDO = 0x00C6
EM_UNDO = 0x00C7
EM_FMTLINES = 0x00C8
EM_LINEFROMCHAR = 0x00C9
EM_SETTABSTOPS = 0x00CB
EM_SETPASSWORDCHAR = 0x00CC
EM_EMPTYUNDOBUFFER = 0x00CD
EM_GETFIRSTVISIBLELINE = 0x00CE
EM_SETREADONLY = 0x00CF
EM_SETWORDBREAKPROC = 0x00D0
EM_GETWORDBREAKPROC = 0x00D1
EM_GETPASSWORDCHAR = 0x00D2
EM_SETMARGINS = 0x00D3
EM_GETMARGINS = 0x00D4
EM_SETLIMITTEXT = EM_LIMITTEXT
EM_GETLIMITTEXT = 0x00D5
EM_POSFROMCHAR = 0x00D6
EM_CHARFROMPOS = 0x00D7
EM_SETIMESTATUS = 0x00D8
EM_GETIMESTATUS = 0x00D9
EM_SETCUEBANNER = 0x1501
EM_GETCUEBANNER = 0x1502
)
const (
CCM_FIRST = 0x2000
CCM_LAST = CCM_FIRST + 0x200
CCM_SETBKCOLOR = 8193
CCM_SETCOLORSCHEME = 8194
CCM_GETCOLORSCHEME = 8195
CCM_GETDROPTARGET = 8196
CCM_SETUNICODEFORMAT = 8197
CCM_GETUNICODEFORMAT = 8198
CCM_SETVERSION = 0x2007
CCM_GETVERSION = 0x2008
CCM_SETNOTIFYWINDOW = 0x2009
CCM_SETWINDOWTHEME = 0x200b
CCM_DPISCALE = 0x200c
)
// Common controls styles
const (
CCS_TOP = 1
CCS_NOMOVEY = 2
CCS_BOTTOM = 3
CCS_NORESIZE = 4
CCS_NOPARENTALIGN = 8
CCS_ADJUSTABLE = 32
CCS_NODIVIDER = 64
CCS_VERT = 128
CCS_LEFT = 129
CCS_NOMOVEX = 130
CCS_RIGHT = 131
)
// ProgressBar messages
const (
PROGRESS_CLASS = "msctls_progress32"
PBM_SETPOS = WM_USER + 2
PBM_DELTAPOS = WM_USER + 3
PBM_SETSTEP = WM_USER + 4
PBM_STEPIT = WM_USER + 5
PBM_SETRANGE32 = 1030
PBM_GETRANGE = 1031
PBM_GETPOS = 1032
PBM_SETBARCOLOR = 1033