1// Copyright 2010-2012 The W32 Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5package w32 6 7const ( 8 FALSE = 0 9 TRUE = 1 10) 11 12const ( 13 NO_ERROR = 0 14 ERROR_SUCCESS = 0 15 ERROR_FILE_NOT_FOUND = 2 16 ERROR_PATH_NOT_FOUND = 3 17 ERROR_ACCESS_DENIED = 5 18 ERROR_INVALID_HANDLE = 6 19 ERROR_BAD_FORMAT = 11 20 ERROR_INVALID_NAME = 123 21 ERROR_MORE_DATA = 234 22 ERROR_NO_MORE_ITEMS = 259 23 ERROR_INVALID_SERVICE_CONTROL = 1052 24 ERROR_SERVICE_REQUEST_TIMEOUT = 1053 25 ERROR_SERVICE_NO_THREAD = 1054 26 ERROR_SERVICE_DATABASE_LOCKED = 1055 27 ERROR_SERVICE_ALREADY_RUNNING = 1056 28 ERROR_SERVICE_DISABLED = 1058 29 ERROR_SERVICE_DOES_NOT_EXIST = 1060 30 ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061 31 ERROR_SERVICE_NOT_ACTIVE = 1062 32 ERROR_DATABASE_DOES_NOT_EXIST = 1065 33 ERROR_SERVICE_DEPENDENCY_FAIL = 1068 34 ERROR_SERVICE_LOGON_FAILED = 1069 35 ERROR_SERVICE_MARKED_FOR_DELETE = 1072 36 ERROR_SERVICE_DEPENDENCY_DELETED = 1075 37) 38 39const ( 40 SE_ERR_FNF = 2 41 SE_ERR_PNF = 3 42 SE_ERR_ACCESSDENIED = 5 43 SE_ERR_OOM = 8 44 SE_ERR_DLLNOTFOUND = 32 45 SE_ERR_SHARE = 26 46 SE_ERR_ASSOCINCOMPLETE = 27 47 SE_ERR_DDETIMEOUT = 28 48 SE_ERR_DDEFAIL = 29 49 SE_ERR_DDEBUSY = 30 50 SE_ERR_NOASSOC = 31 51) 52 53const ( 54 CW_USEDEFAULT = ^0x7fffffff 55) 56 57// ShowWindow constants 58const ( 59 SW_HIDE = 0 60 SW_NORMAL = 1 61 SW_SHOWNORMAL = 1 62 SW_SHOWMINIMIZED = 2 63 SW_MAXIMIZE = 3 64 SW_SHOWMAXIMIZED = 3 65 SW_SHOWNOACTIVATE = 4 66 SW_SHOW = 5 67 SW_MINIMIZE = 6 68 SW_SHOWMINNOACTIVE = 7 69 SW_SHOWNA = 8 70 SW_RESTORE = 9 71 SW_SHOWDEFAULT = 10 72 SW_FORCEMINIMIZE = 11 73) 74 75// Window class styles 76const ( 77 CS_VREDRAW = 0x00000001 78 CS_HREDRAW = 0x00000002 79 CS_KEYCVTWINDOW = 0x00000004 80 CS_DBLCLKS = 0x00000008 81 CS_OWNDC = 0x00000020 82 CS_CLASSDC = 0x00000040 83 CS_PARENTDC = 0x00000080 84 CS_NOKEYCVT = 0x00000100 85 CS_NOCLOSE = 0x00000200 86 CS_SAVEBITS = 0x00000800 87 CS_BYTEALIGNCLIENT = 0x00001000 88 CS_BYTEALIGNWINDOW = 0x00002000 89 CS_GLOBALCLASS = 0x00004000 90 CS_IME = 0x00010000 91 CS_DROPSHADOW = 0x00020000 92) 93 94// Predefined cursor constants 95const ( 96 IDC_ARROW = 32512 97 IDC_IBEAM = 32513 98 IDC_WAIT = 32514 99 IDC_CROSS = 32515 100 IDC_UPARROW = 32516 101 IDC_SIZENWSE = 32642 102 IDC_SIZENESW = 32643 103 IDC_SIZEWE = 32644 104 IDC_SIZENS = 32645 105 IDC_SIZEALL = 32646 106 IDC_NO = 32648 107 IDC_HAND = 32649 108 IDC_APPSTARTING = 32650 109 IDC_HELP = 32651 110 IDC_ICON = 32641 111 IDC_SIZE = 32640 112) 113 114// Predefined icon constants 115const ( 116 IDI_APPLICATION = 32512 117 IDI_HAND = 32513 118 IDI_QUESTION = 32514 119 IDI_EXCLAMATION = 32515 120 IDI_ASTERISK = 32516 121 IDI_WINLOGO = 32517 122 IDI_WARNING = IDI_EXCLAMATION 123 IDI_ERROR = IDI_HAND 124 IDI_INFORMATION = IDI_ASTERISK 125) 126 127// Button style constants 128const ( 129 BS_3STATE = 5 130 BS_AUTO3STATE = 6 131 BS_AUTOCHECKBOX = 3 132 BS_AUTORADIOBUTTON = 9 133 BS_BITMAP = 128 134 BS_BOTTOM = 0X800 135 BS_CENTER = 0X300 136 BS_CHECKBOX = 2 137 BS_DEFPUSHBUTTON = 1 138 BS_GROUPBOX = 7 139 BS_ICON = 64 140 BS_LEFT = 256 141 BS_LEFTTEXT = 32 142 BS_MULTILINE = 0X2000 143 BS_NOTIFY = 0X4000 144 BS_OWNERDRAW = 0XB 145 BS_PUSHBUTTON = 0 146 BS_PUSHLIKE = 4096 147 BS_RADIOBUTTON = 4 148 BS_RIGHT = 512 149 BS_RIGHTBUTTON = 32 150 BS_TEXT = 0 151 BS_TOP = 0X400 152 BS_USERBUTTON = 8 153 BS_VCENTER = 0XC00 154 BS_FLAT = 0X8000 155) 156 157// Button state constants 158const ( 159 BST_CHECKED = 1 160 BST_INDETERMINATE = 2 161 BST_UNCHECKED = 0 162 BST_FOCUS = 8 163 BST_PUSHED = 4 164) 165 166// Predefined brushes constants 167const ( 168 COLOR_3DDKSHADOW = 21 169 COLOR_3DFACE = 15 170 COLOR_3DHILIGHT = 20 171 COLOR_3DHIGHLIGHT = 20 172 COLOR_3DLIGHT = 22 173 COLOR_BTNHILIGHT = 20 174 COLOR_3DSHADOW = 16 175 COLOR_ACTIVEBORDER = 10 176 COLOR_ACTIVECAPTION = 2 177 COLOR_APPWORKSPACE = 12 178 COLOR_BACKGROUND = 1 179 COLOR_DESKTOP = 1 180 COLOR_BTNFACE = 15 181 COLOR_BTNHIGHLIGHT = 20 182 COLOR_BTNSHADOW = 16 183 COLOR_BTNTEXT = 18 184 COLOR_CAPTIONTEXT = 9 185 COLOR_GRAYTEXT = 17 186 COLOR_HIGHLIGHT = 13 187 COLOR_HIGHLIGHTTEXT = 14 188 COLOR_INACTIVEBORDER = 11 189 COLOR_INACTIVECAPTION = 3 190 COLOR_INACTIVECAPTIONTEXT = 19 191 COLOR_INFOBK = 24 192 COLOR_INFOTEXT = 23 193 COLOR_MENU = 4 194 COLOR_MENUTEXT = 7 195 COLOR_SCROLLBAR = 0 196 COLOR_WINDOW = 5 197 COLOR_WINDOWFRAME = 6 198 COLOR_WINDOWTEXT = 8 199 COLOR_HOTLIGHT = 26 200 COLOR_GRADIENTACTIVECAPTION = 27 201 COLOR_GRADIENTINACTIVECAPTION = 28 202) 203 204// Button message constants 205const ( 206 BM_CLICK = 245 207 BM_GETCHECK = 240 208 BM_GETIMAGE = 246 209 BM_GETSTATE = 242 210 BM_SETCHECK = 241 211 BM_SETIMAGE = 247 212 BM_SETSTATE = 243 213 BM_SETSTYLE = 244 214) 215 216// Button notifications 217const ( 218 BN_CLICKED = 0 219 BN_PAINT = 1 220 BN_HILITE = 2 221 BN_PUSHED = BN_HILITE 222 BN_UNHILITE = 3 223 BN_UNPUSHED = BN_UNHILITE 224 BN_DISABLE = 4 225 BN_DOUBLECLICKED = 5 226 BN_DBLCLK = BN_DOUBLECLICKED 227 BN_SETFOCUS = 6 228 BN_KILLFOCUS = 7 229) 230 231// GetWindowLong and GetWindowLongPtr constants 232const ( 233 GWL_EXSTYLE = -20 234 GWL_STYLE = -16 235 GWL_WNDPROC = -4 236 GWLP_WNDPROC = -4 237 GWL_HINSTANCE = -6 238 GWLP_HINSTANCE = -6 239 GWL_HWNDPARENT = -8 240 GWLP_HWNDPARENT = -8 241 GWL_ID = -12 242 GWLP_ID = -12 243 GWL_USERDATA = -21 244 GWLP_USERDATA = -21 245) 246 247// Window style constants 248const ( 249 WS_OVERLAPPED = 0X00000000 250 WS_POPUP = 0X80000000 251 WS_CHILD = 0X40000000 252 WS_MINIMIZE = 0X20000000 253 WS_VISIBLE = 0X10000000 254 WS_DISABLED = 0X08000000 255 WS_CLIPSIBLINGS = 0X04000000 256 WS_CLIPCHILDREN = 0X02000000 257 WS_MAXIMIZE = 0X01000000 258 WS_CAPTION = 0X00C00000 259 WS_BORDER = 0X00800000 260 WS_DLGFRAME = 0X00400000 261 WS_VSCROLL = 0X00200000 262 WS_HSCROLL = 0X00100000 263 WS_SYSMENU = 0X00080000 264 WS_THICKFRAME = 0X00040000 265 WS_GROUP = 0X00020000 266 WS_TABSTOP = 0X00010000 267 WS_MINIMIZEBOX = 0X00020000 268 WS_MAXIMIZEBOX = 0X00010000 269 WS_TILED = 0X00000000 270 WS_ICONIC = 0X20000000 271 WS_SIZEBOX = 0X00040000 272 WS_OVERLAPPEDWINDOW = 0X00000000 | 0X00C00000 | 0X00080000 | 0X00040000 | 0X00020000 | 0X00010000 273 WS_POPUPWINDOW = 0X80000000 | 0X00800000 | 0X00080000 274 WS_CHILDWINDOW = 0X40000000 275) 276 277// Extended window style constants 278const ( 279 WS_EX_DLGMODALFRAME = 0X00000001 280 WS_EX_NOPARENTNOTIFY = 0X00000004 281 WS_EX_TOPMOST = 0X00000008 282 WS_EX_ACCEPTFILES = 0X00000010 283 WS_EX_TRANSPARENT = 0X00000020 284 WS_EX_MDICHILD = 0X00000040 285 WS_EX_TOOLWINDOW = 0X00000080 286 WS_EX_WINDOWEDGE = 0X00000100 287 WS_EX_CLIENTEDGE = 0X00000200 288 WS_EX_CONTEXTHELP = 0X00000400 289 WS_EX_RIGHT = 0X00001000 290 WS_EX_LEFT = 0X00000000 291 WS_EX_RTLREADING = 0X00002000 292 WS_EX_LTRREADING = 0X00000000 293 WS_EX_LEFTSCROLLBAR = 0X00004000 294 WS_EX_RIGHTSCROLLBAR = 0X00000000 295 WS_EX_CONTROLPARENT = 0X00010000 296 WS_EX_STATICEDGE = 0X00020000 297 WS_EX_APPWINDOW = 0X00040000 298 WS_EX_OVERLAPPEDWINDOW = 0X00000100 | 0X00000200 299 WS_EX_PALETTEWINDOW = 0X00000100 | 0X00000080 | 0X00000008 300 WS_EX_LAYERED = 0X00080000 301 WS_EX_NOINHERITLAYOUT = 0X00100000 302 WS_EX_LAYOUTRTL = 0X00400000 303 WS_EX_NOACTIVATE = 0X08000000 304) 305 306// Window message constants 307const ( 308 WM_APP = 32768 309 WM_ACTIVATE = 6 310 WM_ACTIVATEAPP = 28 311 WM_AFXFIRST = 864 312 WM_AFXLAST = 895 313 WM_ASKCBFORMATNAME = 780 314 WM_CANCELJOURNAL = 75 315 WM_CANCELMODE = 31 316 WM_CAPTURECHANGED = 533 317 WM_CHANGECBCHAIN = 781 318 WM_CHAR = 258 319 WM_CHARTOITEM = 47 320 WM_CHILDACTIVATE = 34 321 WM_CLEAR = 771 322 WM_CLOSE = 16 323 WM_COMMAND = 273 324 WM_COMMNOTIFY = 68 /* OBSOLETE */ 325 WM_COMPACTING = 65 326 WM_COMPAREITEM = 57 327 WM_CONTEXTMENU = 123 328 WM_COPY = 769 329 WM_COPYDATA = 74 330 WM_CREATE = 1 331 WM_CTLCOLORBTN = 309 332 WM_CTLCOLORDLG = 310 333 WM_CTLCOLOREDIT = 307 334 WM_CTLCOLORLISTBOX = 308 335 WM_CTLCOLORMSGBOX = 306 336 WM_CTLCOLORSCROLLBAR = 311 337 WM_CTLCOLORSTATIC = 312 338 WM_CUT = 768 339 WM_DEADCHAR = 259 340 WM_DELETEITEM = 45 341 WM_DESTROY = 2 342 WM_DESTROYCLIPBOARD = 775 343 WM_DEVICECHANGE = 537 344 WM_DEVMODECHANGE = 27 345 WM_DISPLAYCHANGE = 126 346 WM_DRAWCLIPBOARD = 776 347 WM_DRAWITEM = 43 348 WM_DROPFILES = 563 349 WM_ENABLE = 10 350 WM_ENDSESSION = 22 351 WM_ENTERIDLE = 289 352 WM_ENTERMENULOOP = 529 353 WM_ENTERSIZEMOVE = 561 354 WM_ERASEBKGND = 20 355 WM_EXITMENULOOP = 530 356 WM_EXITSIZEMOVE = 562 357 WM_FONTCHANGE = 29 358 WM_GETDLGCODE = 135 359 WM_GETFONT = 49 360 WM_GETHOTKEY = 51 361 WM_GETICON = 127 362 WM_GETMINMAXINFO = 36 363 WM_GETTEXT = 13 364 WM_GETTEXTLENGTH = 14 365 WM_HANDHELDFIRST = 856 366 WM_HANDHELDLAST = 863 367 WM_HELP = 83 368 WM_HOTKEY = 786 369 WM_HSCROLL = 276 370 WM_HSCROLLCLIPBOARD = 782 371 WM_ICONERASEBKGND = 39 372 WM_INITDIALOG = 272 373 WM_INITMENU = 278 374 WM_INITMENUPOPUP = 279 375 WM_INPUT = 0X00FF 376 WM_INPUTLANGCHANGE = 81 377 WM_INPUTLANGCHANGEREQUEST = 80 378 WM_KEYDOWN = 256 379 WM_KEYUP = 257 380 WM_KILLFOCUS = 8 381 WM_MDIACTIVATE = 546 382 WM_MDICASCADE = 551 383 WM_MDICREATE = 544 384 WM_MDIDESTROY = 545 385 WM_MDIGETACTIVE = 553 386 WM_MDIICONARRANGE = 552 387 WM_MDIMAXIMIZE = 549 388 WM_MDINEXT = 548 389 WM_MDIREFRESHMENU = 564 390 WM_MDIRESTORE = 547 391 WM_MDISETMENU = 560 392 WM_MDITILE = 550 393 WM_MEASUREITEM = 44 394 WM_GETOBJECT = 0X003D 395 WM_CHANGEUISTATE = 0X0127 396 WM_UPDATEUISTATE = 0X0128 397 WM_QUERYUISTATE = 0X0129 398 WM_UNINITMENUPOPUP = 0X0125 399 WM_MENURBUTTONUP = 290 400 WM_MENUCOMMAND = 0X0126 401 WM_MENUGETOBJECT = 0X0124 402 WM_MENUDRAG = 0X0123 403 WM_APPCOMMAND = 0X0319 404 WM_MENUCHAR = 288 405 WM_MENUSELECT = 287 406 WM_MOVE = 3 407 WM_MOVING = 534 408 WM_NCACTIVATE = 134 409 WM_NCCALCSIZE = 131 410 WM_NCCREATE = 129 411 WM_NCDESTROY = 130 412 WM_NCHITTEST = 132 413 WM_NCLBUTTONDBLCLK = 163 414 WM_NCLBUTTONDOWN = 161 415 WM_NCLBUTTONUP = 162 416 WM_NCMBUTTONDBLCLK = 169 417 WM_NCMBUTTONDOWN = 167 418 WM_NCMBUTTONUP = 168 419 WM_NCXBUTTONDOWN = 171 420 WM_NCXBUTTONUP = 172 421 WM_NCXBUTTONDBLCLK = 173 422 WM_NCMOUSEHOVER = 0X02A0 423 WM_NCMOUSELEAVE = 0X02A2 424 WM_NCMOUSEMOVE = 160 425 WM_NCPAINT = 133 426 WM_NCRBUTTONDBLCLK = 166 427 WM_NCRBUTTONDOWN = 164 428 WM_NCRBUTTONUP = 165 429 WM_NEXTDLGCTL = 40 430 WM_NEXTMENU = 531 431 WM_NOTIFY = 78 432 WM_NOTIFYFORMAT = 85 433 WM_NULL = 0 434 WM_PAINT = 15 435 WM_PAINTCLIPBOARD = 777 436 WM_PAINTICON = 38 437 WM_PALETTECHANGED = 785 438 WM_PALETTEISCHANGING = 784 439 WM_PARENTNOTIFY = 528 440 WM_PASTE = 770 441 WM_PENWINFIRST = 896 442 WM_PENWINLAST = 911 443 WM_POWER = 72 444 WM_POWERBROADCAST = 536 445 WM_PRINT = 791 446 WM_PRINTCLIENT = 792 447 WM_QUERYDRAGICON = 55 448 WM_QUERYENDSESSION = 17 449 WM_QUERYNEWPALETTE = 783 450 WM_QUERYOPEN = 19 451 WM_QUEUESYNC = 35 452 WM_QUIT = 18 453 WM_RENDERALLFORMATS = 774 454 WM_RENDERFORMAT = 773 455 WM_SETCURSOR = 32 456 WM_SETFOCUS = 7 457 WM_SETFONT = 48 458 WM_SETHOTKEY = 50 459 WM_SETICON = 128 460 WM_SETREDRAW = 11 461 WM_SETTEXT = 12 462 WM_SETTINGCHANGE = 26 463 WM_SHOWWINDOW = 24 464 WM_SIZE = 5 465 WM_SIZECLIPBOARD = 779 466 WM_SIZING = 532 467 WM_SPOOLERSTATUS = 42 468 WM_STYLECHANGED = 125 469 WM_STYLECHANGING = 124 470 WM_SYSCHAR = 262 471 WM_SYSCOLORCHANGE = 21 472 WM_SYSCOMMAND = 274 473 WM_SYSDEADCHAR = 263 474 WM_SYSKEYDOWN = 260 475 WM_SYSKEYUP = 261 476 WM_TCARD = 82 477 WM_THEMECHANGED = 794 478 WM_TIMECHANGE = 30 479 WM_TIMER = 275 480 WM_UNDO = 772 481 WM_USER = 1024 482 WM_USERCHANGED = 84 483 WM_VKEYTOITEM = 46 484 WM_VSCROLL = 277 485 WM_VSCROLLCLIPBOARD = 778 486 WM_WINDOWPOSCHANGED = 71 487 WM_WINDOWPOSCHANGING = 70 488 WM_WININICHANGE = 26 489 WM_KEYFIRST = 256 490 WM_KEYLAST = 264 491 WM_SYNCPAINT = 136 492 WM_MOUSEACTIVATE = 33 493 WM_MOUSEMOVE = 512 494 WM_LBUTTONDOWN = 513 495 WM_LBUTTONUP = 514 496 WM_LBUTTONDBLCLK = 515 497 WM_RBUTTONDOWN = 516 498 WM_RBUTTONUP = 517 499 WM_RBUTTONDBLCLK = 518 500 WM_MBUTTONDOWN = 519 501 WM_MBUTTONUP = 520 502 WM_MBUTTONDBLCLK = 521 503 WM_MOUSEWHEEL = 522 504 WM_MOUSEFIRST = 512 505 WM_XBUTTONDOWN = 523 506 WM_XBUTTONUP = 524 507 WM_XBUTTONDBLCLK = 525 508 WM_MOUSELAST = 525 509 WM_MOUSEHOVER = 0X2A1 510 WM_MOUSELEAVE = 0X2A3 511 WM_CLIPBOARDUPDATE = 0x031D 512) 513 514// WM_ACTIVATE 515const ( 516 WA_INACTIVE = 0 517 WA_ACTIVE = 1 518 WA_CLICKACTIVE = 2 519) 520 521const LF_FACESIZE = 32 522 523// Font weight constants 524const ( 525 FW_DONTCARE = 0 526 FW_THIN = 100 527 FW_EXTRALIGHT = 200 528 FW_ULTRALIGHT = FW_EXTRALIGHT 529 FW_LIGHT = 300 530 FW_NORMAL = 400 531 FW_REGULAR = 400 532 FW_MEDIUM = 500 533 FW_SEMIBOLD = 600 534 FW_DEMIBOLD = FW_SEMIBOLD 535 FW_BOLD = 700 536 FW_EXTRABOLD = 800 537 FW_ULTRABOLD = FW_EXTRABOLD 538 FW_HEAVY = 900 539 FW_BLACK = FW_HEAVY 540) 541 542// Charset constants 543const ( 544 ANSI_CHARSET = 0 545 DEFAULT_CHARSET = 1 546 SYMBOL_CHARSET = 2 547 SHIFTJIS_CHARSET = 128 548 HANGEUL_CHARSET = 129 549 HANGUL_CHARSET = 129 550 GB2312_CHARSET = 134 551 CHINESEBIG5_CHARSET = 136 552 GREEK_CHARSET = 161 553 TURKISH_CHARSET = 162 554 HEBREW_CHARSET = 177 555 ARABIC_CHARSET = 178 556 BALTIC_CHARSET = 186 557 RUSSIAN_CHARSET = 204 558 THAI_CHARSET = 222 559 EASTEUROPE_CHARSET = 238 560 OEM_CHARSET = 255 561 JOHAB_CHARSET = 130 562 VIETNAMESE_CHARSET = 163 563 MAC_CHARSET = 77 564) 565 566// Font output precision constants 567const ( 568 OUT_DEFAULT_PRECIS = 0 569 OUT_STRING_PRECIS = 1 570 OUT_CHARACTER_PRECIS = 2 571 OUT_STROKE_PRECIS = 3 572 OUT_TT_PRECIS = 4 573 OUT_DEVICE_PRECIS = 5 574 OUT_RASTER_PRECIS = 6 575 OUT_TT_ONLY_PRECIS = 7 576 OUT_OUTLINE_PRECIS = 8 577 OUT_PS_ONLY_PRECIS = 10 578) 579 580// Font clipping precision constants 581const ( 582 CLIP_DEFAULT_PRECIS = 0 583 CLIP_CHARACTER_PRECIS = 1 584 CLIP_STROKE_PRECIS = 2 585 CLIP_MASK = 15 586 CLIP_LH_ANGLES = 16 587 CLIP_TT_ALWAYS = 32 588 CLIP_EMBEDDED = 128 589) 590 591// Font output quality constants 592const ( 593 DEFAULT_QUALITY = 0 594 DRAFT_QUALITY = 1 595 PROOF_QUALITY = 2 596 NONANTIALIASED_QUALITY = 3 597 ANTIALIASED_QUALITY = 4 598 CLEARTYPE_QUALITY = 5 599) 600 601// Font pitch constants 602const ( 603 DEFAULT_PITCH = 0 604 FIXED_PITCH = 1 605 VARIABLE_PITCH = 2 606) 607 608// Font family constants 609const ( 610 FF_DECORATIVE = 80 611 FF_DONTCARE = 0 612 FF_MODERN = 48 613 FF_ROMAN = 16 614 FF_SCRIPT = 64 615 FF_SWISS = 32 616) 617 618// DeviceCapabilities capabilities 619const ( 620 DC_FIELDS = 1 621 DC_PAPERS = 2 622 DC_PAPERSIZE = 3 623 DC_MINEXTENT = 4 624 DC_MAXEXTENT = 5 625 DC_BINS = 6 626 DC_DUPLEX = 7 627 DC_SIZE = 8 628 DC_EXTRA = 9 629 DC_VERSION = 10 630 DC_DRIVER = 11 631 DC_BINNAMES = 12 632 DC_ENUMRESOLUTIONS = 13 633 DC_FILEDEPENDENCIES = 14 634 DC_TRUETYPE = 15 635 DC_PAPERNAMES = 16 636 DC_ORIENTATION = 17 637 DC_COPIES = 18 638 DC_BINADJUST = 19 639 DC_EMF_COMPLIANT = 20 640 DC_DATATYPE_PRODUCED = 21 641 DC_COLLATE = 22 642 DC_MANUFACTURER = 23 643 DC_MODEL = 24 644 DC_PERSONALITY = 25 645 DC_PRINTRATE = 26 646 DC_PRINTRATEUNIT = 27 647 DC_PRINTERMEM = 28 648 DC_MEDIAREADY = 29 649 DC_STAPLE = 30 650 DC_PRINTRATEPPM = 31 651 DC_COLORDEVICE = 32 652 DC_NUP = 33 653 DC_MEDIATYPENAMES = 34 654 DC_MEDIATYPES = 35 655) 656 657// GetDeviceCaps index constants 658const ( 659 DRIVERVERSION = 0 660 TECHNOLOGY = 2 661 HORZSIZE = 4 662 VERTSIZE = 6 663 HORZRES = 8 664 VERTRES = 10 665 LOGPIXELSX = 88 666 LOGPIXELSY = 90 667 BITSPIXEL = 12 668 PLANES = 14 669 NUMBRUSHES = 16 670 NUMPENS = 18 671 NUMFONTS = 22 672 NUMCOLORS = 24 673 NUMMARKERS = 20 674 ASPECTX = 40 675 ASPECTY = 42 676 ASPECTXY = 44 677 PDEVICESIZE = 26 678 CLIPCAPS = 36 679 SIZEPALETTE = 104 680 NUMRESERVED = 106 681 COLORRES = 108 682 PHYSICALWIDTH = 110 683 PHYSICALHEIGHT = 111 684 PHYSICALOFFSETX = 112 685 PHYSICALOFFSETY = 113 686 SCALINGFACTORX = 114 687 SCALINGFACTORY = 115 688 VREFRESH = 116 689 DESKTOPHORZRES = 118 690 DESKTOPVERTRES = 117 691 BLTALIGNMENT = 119 692 SHADEBLENDCAPS = 120 693 COLORMGMTCAPS = 121 694 RASTERCAPS = 38 695 CURVECAPS = 28 696 LINECAPS = 30 697 POLYGONALCAPS = 32 698 TEXTCAPS = 34 699) 700 701// GetDeviceCaps TECHNOLOGY constants 702const ( 703 DT_PLOTTER = 0 704 DT_RASDISPLAY = 1 705 DT_RASPRINTER = 2 706 DT_RASCAMERA = 3 707 DT_CHARSTREAM = 4 708 DT_METAFILE = 5 709 DT_DISPFILE = 6 710) 711 712// GetDeviceCaps SHADEBLENDCAPS constants 713const ( 714 SB_NONE = 0x00 715 SB_CONST_ALPHA = 0x01 716 SB_PIXEL_ALPHA = 0x02 717 SB_PREMULT_ALPHA = 0x04 718 SB_GRAD_RECT = 0x10 719 SB_GRAD_TRI = 0x20 720) 721 722// GetDeviceCaps COLORMGMTCAPS constants 723const ( 724 CM_NONE = 0x00 725 CM_DEVICE_ICM = 0x01 726 CM_GAMMA_RAMP = 0x02 727 CM_CMYK_COLOR = 0x04 728) 729 730// GetDeviceCaps RASTERCAPS constants 731const ( 732 RC_BANDING = 2 733 RC_BITBLT = 1 734 RC_BITMAP64 = 8 735 RC_DI_BITMAP = 128 736 RC_DIBTODEV = 512 737 RC_FLOODFILL = 4096 738 RC_GDI20_OUTPUT = 16 739 RC_PALETTE = 256 740 RC_SCALING = 4 741 RC_STRETCHBLT = 2048 742 RC_STRETCHDIB = 8192 743 RC_DEVBITS = 0x8000 744 RC_OP_DX_OUTPUT = 0x4000 745) 746 747// GetDeviceCaps CURVECAPS constants 748const ( 749 CC_NONE = 0 750 CC_CIRCLES = 1 751 CC_PIE = 2 752 CC_CHORD = 4 753 CC_ELLIPSES = 8 754 CC_WIDE = 16 755 CC_STYLED = 32 756 CC_WIDESTYLED = 64 757 CC_INTERIORS = 128 758 CC_ROUNDRECT = 256 759) 760 761// GetDeviceCaps LINECAPS constants 762const ( 763 LC_NONE = 0 764 LC_POLYLINE = 2 765 LC_MARKER = 4 766 LC_POLYMARKER = 8 767 LC_WIDE = 16 768 LC_STYLED = 32 769 LC_WIDESTYLED = 64 770 LC_INTERIORS = 128 771) 772 773// GetDeviceCaps POLYGONALCAPS constants 774const ( 775 PC_NONE = 0 776 PC_POLYGON = 1 777 PC_POLYPOLYGON = 256 778 PC_PATHS = 512 779 PC_RECTANGLE = 2 780 PC_WINDPOLYGON = 4 781 PC_SCANLINE = 8 782 PC_TRAPEZOID = 4 783 PC_WIDE = 16 784 PC_STYLED = 32 785 PC_WIDESTYLED = 64 786 PC_INTERIORS = 128 787) 788 789// GetDeviceCaps TEXTCAPS constants 790const ( 791 TC_OP_CHARACTER = 1 792 TC_OP_STROKE = 2 793 TC_CP_STROKE = 4 794 TC_CR_90 = 8 795 TC_CR_ANY = 16 796 TC_SF_X_YINDEP = 32 797 TC_SA_DOUBLE = 64 798 TC_SA_INTEGER = 128 799 TC_SA_CONTIN = 256 800 TC_EA_DOUBLE = 512 801 TC_IA_ABLE = 1024 802 TC_UA_ABLE = 2048 803 TC_SO_ABLE = 4096 804 TC_RA_ABLE = 8192 805 TC_VA_ABLE = 16384 806 TC_RESERVED = 32768 807 TC_SCROLLBLT = 65536 808) 809 810// Static control styles 811const ( 812 SS_BITMAP = 14 813 SS_BLACKFRAME = 7 814 SS_BLACKRECT = 4 815 SS_CENTER = 1 816 SS_CENTERIMAGE = 512 817 SS_EDITCONTROL = 0x2000 818 SS_ENHMETAFILE = 15 819 SS_ETCHEDFRAME = 18 820 SS_ETCHEDHORZ = 16 821 SS_ETCHEDVERT = 17 822 SS_GRAYFRAME = 8 823 SS_GRAYRECT = 5 824 SS_ICON = 3 825 SS_LEFT = 0 826 SS_LEFTNOWORDWRAP = 0xc 827 SS_NOPREFIX = 128 828 SS_NOTIFY = 256 829 SS_OWNERDRAW = 0xd 830 SS_REALSIZECONTROL = 0x040 831 SS_REALSIZEIMAGE = 0x800 832 SS_RIGHT = 2 833 SS_RIGHTJUST = 0x400 834 SS_SIMPLE = 11 835 SS_SUNKEN = 4096 836 SS_WHITEFRAME = 9 837 SS_WHITERECT = 6 838 SS_USERITEM = 10 839 SS_TYPEMASK = 0x0000001F 840 SS_ENDELLIPSIS = 0x00004000 841 SS_PATHELLIPSIS = 0x00008000 842 SS_WORDELLIPSIS = 0x0000C000 843 SS_ELLIPSISMASK = 0x0000C000 844) 845 846// Edit styles 847const ( 848 ES_LEFT = 0x0000 849 ES_CENTER = 0x0001 850 ES_RIGHT = 0x0002 851 ES_MULTILINE = 0x0004 852 ES_UPPERCASE = 0x0008 853 ES_LOWERCASE = 0x0010 854 ES_PASSWORD = 0x0020 855 ES_AUTOVSCROLL = 0x0040 856 ES_AUTOHSCROLL = 0x0080 857 ES_NOHIDESEL = 0x0100 858 ES_OEMCONVERT = 0x0400 859 ES_READONLY = 0x0800 860 ES_WANTRETURN = 0x1000 861 ES_NUMBER = 0x2000 862) 863 864// Edit notifications 865const ( 866 EN_SETFOCUS = 0x0100 867 EN_KILLFOCUS = 0x0200 868 EN_CHANGE = 0x0300 869 EN_UPDATE = 0x0400 870 EN_ERRSPACE = 0x0500 871 EN_MAXTEXT = 0x0501 872 EN_HSCROLL = 0x0601 873 EN_VSCROLL = 0x0602 874 EN_ALIGN_LTR_EC = 0x0700 875 EN_ALIGN_RTL_EC = 0x0701 876) 877 878// Edit messages 879const ( 880 EM_GETSEL = 0x00B0 881 EM_SETSEL = 0x00B1 882 EM_GETRECT = 0x00B2 883 EM_SETRECT = 0x00B3 884 EM_SETRECTNP = 0x00B4 885 EM_SCROLL = 0x00B5 886 EM_LINESCROLL = 0x00B6 887 EM_SCROLLCARET = 0x00B7 888 EM_GETMODIFY = 0x00B8 889 EM_SETMODIFY = 0x00B9 890 EM_GETLINECOUNT = 0x00BA 891 EM_LINEINDEX = 0x00BB 892 EM_SETHANDLE = 0x00BC 893 EM_GETHANDLE = 0x00BD 894 EM_GETTHUMB = 0x00BE 895 EM_LINELENGTH = 0x00C1 896 EM_REPLACESEL = 0x00C2 897 EM_GETLINE = 0x00C4 898 EM_LIMITTEXT = 0x00C5 899 EM_CANUNDO = 0x00C6 900 EM_UNDO = 0x00C7 901 EM_FMTLINES = 0x00C8 902 EM_LINEFROMCHAR = 0x00C9 903 EM_SETTABSTOPS = 0x00CB 904 EM_SETPASSWORDCHAR = 0x00CC 905 EM_EMPTYUNDOBUFFER = 0x00CD 906 EM_GETFIRSTVISIBLELINE = 0x00CE 907 EM_SETREADONLY = 0x00CF 908 EM_SETWORDBREAKPROC = 0x00D0 909 EM_GETWORDBREAKPROC = 0x00D1 910 EM_GETPASSWORDCHAR = 0x00D2 911 EM_SETMARGINS = 0x00D3 912 EM_GETMARGINS = 0x00D4 913 EM_SETLIMITTEXT = EM_LIMITTEXT 914 EM_GETLIMITTEXT = 0x00D5 915 EM_POSFROMCHAR = 0x00D6 916 EM_CHARFROMPOS = 0x00D7 917 EM_SETIMESTATUS = 0x00D8 918 EM_GETIMESTATUS = 0x00D9 919 EM_SETCUEBANNER = 0x1501 920 EM_GETCUEBANNER = 0x1502 921) 922 923const ( 924 CCM_FIRST = 0x2000 925 CCM_LAST = CCM_FIRST + 0x200 926 CCM_SETBKCOLOR = 8193 927 CCM_SETCOLORSCHEME = 8194 928 CCM_GETCOLORSCHEME = 8195 929 CCM_GETDROPTARGET = 8196 930 CCM_SETUNICODEFORMAT = 8197 931 CCM_GETUNICODEFORMAT = 8198 932 CCM_SETVERSION = 0x2007 933 CCM_GETVERSION = 0x2008 934 CCM_SETNOTIFYWINDOW = 0x2009 935 CCM_SETWINDOWTHEME = 0x200b 936 CCM_DPISCALE = 0x200c 937) 938 939// Common controls styles 940const ( 941 CCS_TOP = 1 942 CCS_NOMOVEY = 2 943 CCS_BOTTOM = 3 944 CCS_NORESIZE = 4 945 CCS_NOPARENTALIGN = 8 946 CCS_ADJUSTABLE = 32 947 CCS_NODIVIDER = 64 948 CCS_VERT = 128 949 CCS_LEFT = 129 950 CCS_NOMOVEX = 130 951 CCS_RIGHT = 131 952) 953 954// ProgressBar messages 955const ( 956 PROGRESS_CLASS = "msctls_progress32" 957 PBM_SETPOS = WM_USER + 2 958 PBM_DELTAPOS = WM_USER + 3 959 PBM_SETSTEP = WM_USER + 4 960 PBM_STEPIT = WM_USER + 5 961 PBM_SETRANGE32 = 1030 962 PBM_GETRANGE = 1031 963 PBM_GETPOS = 1032 964 PBM_SETBARCOLOR = 1033 965 PBM_SETBKCOLOR = CCM_SETBKCOLOR 966 PBS_SMOOTH = 1 967 PBS_VERTICAL = 4 968) 969 970// GetOpenFileName and GetSaveFileName extended flags 971const ( 972 OFN_EX_NOPLACESBAR = 0x00000001 973) 974 975// GetOpenFileName and GetSaveFileName flags 976const ( 977 OFN_ALLOWMULTISELECT = 0x00000200 978 OFN_CREATEPROMPT = 0x00002000 979 OFN_DONTADDTORECENT = 0x02000000 980 OFN_ENABLEHOOK = 0x00000020 981 OFN_ENABLEINCLUDENOTIFY = 0x00400000 982 OFN_ENABLESIZING = 0x00800000 983 OFN_ENABLETEMPLATE = 0x00000040 984 OFN_ENABLETEMPLATEHANDLE = 0x00000080 985 OFN_EXPLORER = 0x00080000 986 OFN_EXTENSIONDIFFERENT = 0x00000400 987 OFN_FILEMUSTEXIST = 0x00001000 988 OFN_FORCESHOWHIDDEN = 0x10000000 989 OFN_HIDEREADONLY = 0x00000004 990 OFN_LONGNAMES = 0x00200000 991 OFN_NOCHANGEDIR = 0x00000008 992 OFN_NODEREFERENCELINKS = 0x00100000 993 OFN_NOLONGNAMES = 0x00040000 994 OFN_NONETWORKBUTTON = 0x00020000 995 OFN_NOREADONLYRETURN = 0x00008000 996 OFN_NOTESTFILECREATE = 0x00010000 997 OFN_NOVALIDATE = 0x00000100 998 OFN_OVERWRITEPROMPT = 0x00000002 999 OFN_PATHMUSTEXIST = 0x00000800 1000 OFN_READONLY = 0x00000001 1001 OFN_SHAREAWARE = 0x00004000 1002 OFN_SHOWHELP = 0x00000010 1003) 1004 1005//SHBrowseForFolder flags 1006const ( 1007 BIF_RETURNONLYFSDIRS = 0x00000001 1008 BIF_DONTGOBELOWDOMAIN = 0x00000002 1009 BIF_STATUSTEXT = 0x00000004 1010 BIF_RETURNFSANCESTORS = 0x00000008 1011 BIF_EDITBOX = 0x00000010 1012 BIF_VALIDATE = 0x00000020 1013 BIF_NEWDIALOGSTYLE = 0x00000040 1014 BIF_BROWSEINCLUDEURLS = 0x00000080 1015 BIF_USENEWUI = BIF_EDITBOX | BIF_NEWDIALOGSTYLE 1016 BIF_UAHINT = 0x00000100 1017 BIF_NONEWFOLDERBUTTON = 0x00000200 1018 BIF_NOTRANSLATETARGETS = 0x00000400 1019 BIF_BROWSEFORCOMPUTER = 0x00001000 1020 BIF_BROWSEFORPRINTER = 0x00002000 1021 BIF_BROWSEINCLUDEFILES = 0x00004000 1022 BIF_SHAREABLE = 0x00008000 1023 BIF_BROWSEFILEJUNCTIONS = 0x00010000 1024) 1025 1026//MessageBox flags 1027const ( 1028 MB_OK = 0x00000000 1029 MB_OKCANCEL = 0x00000001 1030 MB_ABORTRETRYIGNORE = 0x00000002 1031 MB_YESNOCANCEL = 0x00000003 1032 MB_YESNO = 0x00000004 1033 MB_RETRYCANCEL = 0x00000005 1034 MB_CANCELTRYCONTINUE = 0x00000006 1035 MB_ICONHAND = 0x00000010 1036 MB_ICONQUESTION = 0x00000020 1037 MB_ICONEXCLAMATION = 0x00000030 1038 MB_ICONASTERISK = 0x00000040 1039 MB_USERICON = 0x00000080 1040 MB_ICONWARNING = MB_ICONEXCLAMATION 1041 MB_ICONERROR = MB_ICONHAND 1042 MB_ICONINFORMATION = MB_ICONASTERISK 1043 MB_ICONSTOP = MB_ICONHAND 1044 MB_DEFBUTTON1 = 0x00000000 1045 MB_DEFBUTTON2 = 0x00000100 1046 MB_DEFBUTTON3 = 0x00000200 1047 MB_DEFBUTTON4 = 0x00000300 1048) 1049 1050//COM 1051const ( 1052 E_INVALIDARG = 0x80070057 1053 E_OUTOFMEMORY = 0x8007000E 1054 E_UNEXPECTED = 0x8000FFFF 1055) 1056 1057const ( 1058 S_OK = 0 1059 S_FALSE = 0x0001 1060 RPC_E_CHANGED_MODE = 0x80010106 1061) 1062 1063// GetSystemMetrics constants 1064const ( 1065 SM_CXSCREEN = 0 1066 SM_CYSCREEN = 1 1067 SM_CXVSCROLL = 2 1068 SM_CYHSCROLL = 3 1069 SM_CYCAPTION = 4 1070 SM_CXBORDER = 5 1071 SM_CYBORDER = 6 1072 SM_CXDLGFRAME = 7 1073 SM_CYDLGFRAME = 8 1074 SM_CYVTHUMB = 9 1075 SM_CXHTHUMB = 10 1076 SM_CXICON = 11 1077 SM_CYICON = 12 1078 SM_CXCURSOR = 13 1079 SM_CYCURSOR = 14 1080 SM_CYMENU = 15 1081 SM_CXFULLSCREEN = 16 1082 SM_CYFULLSCREEN = 17 1083 SM_CYKANJIWINDOW = 18 1084 SM_MOUSEPRESENT = 19 1085 SM_CYVSCROLL = 20 1086 SM_CXHSCROLL = 21 1087 SM_DEBUG = 22 1088 SM_SWAPBUTTON = 23 1089 SM_RESERVED1 = 24 1090 SM_RESERVED2 = 25 1091 SM_RESERVED3 = 26 1092 SM_RESERVED4 = 27 1093 SM_CXMIN = 28 1094 SM_CYMIN = 29 1095 SM_CXSIZE = 30 1096 SM_CYSIZE = 31 1097 SM_CXFRAME = 32 1098 SM_CYFRAME = 33 1099 SM_CXMINTRACK = 34 1100 SM_CYMINTRACK = 35 1101 SM_CXDOUBLECLK = 36 1102 SM_CYDOUBLECLK = 37 1103 SM_CXICONSPACING = 38 1104 SM_CYICONSPACING = 39 1105 SM_MENUDROPALIGNMENT = 40 1106 SM_PENWINDOWS = 41 1107 SM_DBCSENABLED = 42 1108 SM_CMOUSEBUTTONS = 43 1109 SM_CXFIXEDFRAME = SM_CXDLGFRAME 1110 SM_CYFIXEDFRAME = SM_CYDLGFRAME 1111 SM_CXSIZEFRAME = SM_CXFRAME 1112 SM_CYSIZEFRAME = SM_CYFRAME 1113 SM_SECURE = 44 1114 SM_CXEDGE = 45 1115 SM_CYEDGE = 46 1116 SM_CXMINSPACING = 47 1117 SM_CYMINSPACING = 48 1118 SM_CXSMICON = 49 1119 SM_CYSMICON = 50 1120 SM_CYSMCAPTION = 51 1121 SM_CXSMSIZE = 52 1122 SM_CYSMSIZE = 53 1123 SM_CXMENUSIZE = 54 1124 SM_CYMENUSIZE = 55 1125 SM_ARRANGE = 56 1126 SM_CXMINIMIZED = 57 1127 SM_CYMINIMIZED = 58 1128 SM_CXMAXTRACK = 59 1129 SM_CYMAXTRACK = 60 1130 SM_CXMAXIMIZED = 61 1131 SM_CYMAXIMIZED = 62 1132 SM_NETWORK = 63 1133 SM_CLEANBOOT = 67 1134 SM_CXDRAG = 68 1135 SM_CYDRAG = 69 1136 SM_SHOWSOUNDS = 70 1137 SM_CXMENUCHECK = 71 1138 SM_CYMENUCHECK = 72 1139 SM_SLOWMACHINE = 73 1140 SM_MIDEASTENABLED = 74 1141 SM_MOUSEWHEELPRESENT = 75 1142 SM_XVIRTUALSCREEN = 76 1143 SM_YVIRTUALSCREEN = 77 1144 SM_CXVIRTUALSCREEN = 78 1145 SM_CYVIRTUALSCREEN = 79 1146 SM_CMONITORS = 80 1147 SM_SAMEDISPLAYFORMAT = 81 1148 SM_IMMENABLED = 82 1149 SM_CXFOCUSBORDER = 83 1150 SM_CYFOCUSBORDER = 84 1151 SM_TABLETPC = 86 1152 SM_MEDIACENTER = 87 1153 SM_STARTER = 88 1154 SM_SERVERR2 = 89 1155 SM_CMETRICS = 91 1156 SM_REMOTESESSION = 0x1000 1157 SM_SHUTTINGDOWN = 0x2000 1158 SM_REMOTECONTROL = 0x2001 1159 SM_CARETBLINKINGENABLED = 0x2002 1160) 1161 1162const ( 1163 CLSCTX_INPROC_SERVER = 1 1164 CLSCTX_INPROC_HANDLER = 2 1165 CLSCTX_LOCAL_SERVER = 4 1166 CLSCTX_INPROC_SERVER16 = 8 1167 CLSCTX_REMOTE_SERVER = 16 1168 CLSCTX_ALL = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER 1169 CLSCTX_INPROC = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER 1170 CLSCTX_SERVER = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER 1171) 1172 1173const ( 1174 COINIT_APARTMENTTHREADED = 0x2 1175 COINIT_MULTITHREADED = 0x0 1176 COINIT_DISABLE_OLE1DDE = 0x4 1177 COINIT_SPEED_OVER_MEMORY = 0x8 1178) 1179 1180const ( 1181 DISPATCH_METHOD = 1 1182 DISPATCH_PROPERTYGET = 2 1183 DISPATCH_PROPERTYPUT = 4 1184 DISPATCH_PROPERTYPUTREF = 8 1185) 1186 1187const ( 1188 CC_FASTCALL = iota 1189 CC_CDECL 1190 CC_MSCPASCAL 1191 CC_PASCAL = CC_MSCPASCAL 1192 CC_MACPASCAL 1193 CC_STDCALL 1194 CC_FPFASTCALL 1195 CC_SYSCALL 1196 CC_MPWCDECL 1197 CC_MPWPASCAL 1198 CC_MAX = CC_MPWPASCAL 1199) 1200 1201const ( 1202 VT_EMPTY = 0x0 1203 VT_NULL = 0x1 1204 VT_I2 = 0x2 1205 VT_I4 = 0x3 1206 VT_R4 = 0x4 1207 VT_R8 = 0x5 1208 VT_CY = 0x6 1209 VT_DATE = 0x7 1210 VT_BSTR = 0x8 1211 VT_DISPATCH = 0x9 1212 VT_ERROR = 0xa 1213 VT_BOOL = 0xb 1214 VT_VARIANT = 0xc 1215 VT_UNKNOWN = 0xd 1216 VT_DECIMAL = 0xe 1217 VT_I1 = 0x10 1218 VT_UI1 = 0x11 1219 VT_UI2 = 0x12 1220 VT_UI4 = 0x13 1221 VT_I8 = 0x14 1222 VT_UI8 = 0x15 1223 VT_INT = 0x16 1224 VT_UINT = 0x17 1225 VT_VOID = 0x18 1226 VT_HRESULT = 0x19 1227 VT_PTR = 0x1a 1228 VT_SAFEARRAY = 0x1b 1229 VT_CARRAY = 0x1c 1230 VT_USERDEFINED = 0x1d 1231 VT_LPSTR = 0x1e 1232 VT_LPWSTR = 0x1f 1233 VT_RECORD = 0x24 1234 VT_INT_PTR = 0x25 1235 VT_UINT_PTR = 0x26 1236 VT_FILETIME = 0x40 1237 VT_BLOB = 0x41 1238 VT_STREAM = 0x42 1239 VT_STORAGE = 0x43 1240 VT_STREAMED_OBJECT = 0x44 1241 VT_STORED_OBJECT = 0x45 1242 VT_BLOB_OBJECT = 0x46 1243 VT_CF = 0x47 1244 VT_CLSID = 0x48 1245 VT_BSTR_BLOB = 0xfff 1246 VT_VECTOR = 0x1000 1247 VT_ARRAY = 0x2000 1248 VT_BYREF = 0x4000 1249 VT_RESERVED = 0x8000 1250 VT_ILLEGAL = 0xffff 1251 VT_ILLEGALMASKED = 0xfff 1252 VT_TYPEMASK = 0xfff 1253) 1254 1255const ( 1256 DISPID_UNKNOWN = -1 1257 DISPID_VALUE = 0 1258 DISPID_PROPERTYPUT = -3 1259 DISPID_NEWENUM = -4 1260 DISPID_EVALUATE = -5 1261 DISPID_CONSTRUCTOR = -6 1262 DISPID_DESTRUCTOR = -7 1263 DISPID_COLLECT = -8 1264) 1265 1266const ( 1267 MONITOR_DEFAULTTONULL = 0x00000000 1268 MONITOR_DEFAULTTOPRIMARY = 0x00000001 1269 MONITOR_DEFAULTTONEAREST = 0x00000002 1270 1271 MONITORINFOF_PRIMARY = 0x00000001 1272) 1273 1274const ( 1275 CCHDEVICENAME = 32 1276 CCHFORMNAME = 32 1277) 1278 1279const ( 1280 IDOK = 1 1281 IDCANCEL = 2 1282 IDABORT = 3 1283 IDRETRY = 4 1284 IDIGNORE = 5 1285 IDYES = 6 1286 IDNO = 7 1287 IDCLOSE = 8 1288 IDHELP = 9 1289 IDTRYAGAIN = 10 1290 IDCONTINUE = 11 1291 IDTIMEOUT = 32000 1292) 1293 1294// Generic WM_NOTIFY notification codes 1295const ( 1296 NM_FIRST = 0 1297 NM_OUTOFMEMORY = NM_FIRST - 1 1298 NM_CLICK = NM_FIRST - 2 1299 NM_DBLCLK = NM_FIRST - 3 1300 NM_RETURN = NM_FIRST - 4 1301 NM_RCLICK = NM_FIRST - 5 1302 NM_RDBLCLK = NM_FIRST - 6 1303 NM_SETFOCUS = NM_FIRST - 7 1304 NM_KILLFOCUS = NM_FIRST - 8 1305 NM_CUSTOMDRAW = NM_FIRST - 12 1306 NM_HOVER = NM_FIRST - 13 1307 NM_NCHITTEST = NM_FIRST - 14 1308 NM_KEYDOWN = NM_FIRST - 15 1309 NM_RELEASEDCAPTURE = NM_FIRST - 16 1310 NM_SETCURSOR = NM_FIRST - 17 1311 NM_CHAR = NM_FIRST - 18 1312 NM_TOOLTIPSCREATED = NM_FIRST - 19 1313 NM_LAST = NM_FIRST - 99 1314) 1315 1316// ListView messages 1317const ( 1318 LVM_FIRST = 0x1000 1319 LVM_GETITEMCOUNT = LVM_FIRST + 4 1320 LVM_SETIMAGELIST = LVM_FIRST + 3 1321 LVM_GETIMAGELIST = LVM_FIRST + 2 1322 LVM_GETITEM = LVM_FIRST + 75 1323 LVM_SETITEM = LVM_FIRST + 76 1324 LVM_INSERTITEM = LVM_FIRST + 77 1325 LVM_DELETEITEM = LVM_FIRST + 8 1326 LVM_DELETEALLITEMS = LVM_FIRST + 9 1327 LVM_GETCALLBACKMASK = LVM_FIRST + 10 1328 LVM_SETCALLBACKMASK = LVM_FIRST + 11 1329 LVM_SETUNICODEFORMAT = CCM_SETUNICODEFORMAT 1330 LVM_GETNEXTITEM = LVM_FIRST + 12 1331 LVM_FINDITEM = LVM_FIRST + 83 1332 LVM_GETITEMRECT = LVM_FIRST + 14 1333 LVM_GETSTRINGWIDTH = LVM_FIRST + 87 1334 LVM_HITTEST = LVM_FIRST + 18 1335 LVM_ENSUREVISIBLE = LVM_FIRST + 19 1336 LVM_SCROLL = LVM_FIRST + 20 1337 LVM_REDRAWITEMS = LVM_FIRST + 21 1338 LVM_ARRANGE = LVM_FIRST + 22 1339 LVM_EDITLABEL = LVM_FIRST + 118 1340 LVM_GETEDITCONTROL = LVM_FIRST + 24 1341 LVM_GETCOLUMN = LVM_FIRST + 95 1342 LVM_SETCOLUMN = LVM_FIRST + 96 1343 LVM_INSERTCOLUMN = LVM_FIRST + 97 1344 LVM_DELETECOLUMN = LVM_FIRST + 28 1345 LVM_GETCOLUMNWIDTH = LVM_FIRST + 29 1346 LVM_SETCOLUMNWIDTH = LVM_FIRST + 30 1347 LVM_GETHEADER = LVM_FIRST + 31 1348 LVM_CREATEDRAGIMAGE = LVM_FIRST + 33 1349 LVM_GETVIEWRECT = LVM_FIRST + 34 1350 LVM_GETTEXTCOLOR = LVM_FIRST + 35 1351 LVM_SETTEXTCOLOR = LVM_FIRST + 36 1352 LVM_GETTEXTBKCOLOR = LVM_FIRST + 37 1353 LVM_SETTEXTBKCOLOR = LVM_FIRST + 38 1354 LVM_GETTOPINDEX = LVM_FIRST + 39 1355 LVM_GETCOUNTPERPAGE = LVM_FIRST + 40 1356 LVM_GETORIGIN = LVM_FIRST + 41 1357 LVM_UPDATE = LVM_FIRST + 42 1358 LVM_SETITEMSTATE = LVM_FIRST + 43 1359 LVM_GETITEMSTATE = LVM_FIRST + 44 1360 LVM_GETITEMTEXT = LVM_FIRST + 115 1361 LVM_SETITEMTEXT = LVM_FIRST + 116 1362 LVM_SETITEMCOUNT = LVM_FIRST + 47 1363 LVM_SORTITEMS = LVM_FIRST + 48 1364 LVM_SETITEMPOSITION32 = LVM_FIRST + 49 1365 LVM_GETSELECTEDCOUNT = LVM_FIRST + 50 1366 LVM_GETITEMSPACING = LVM_FIRST + 51 1367 LVM_GETISEARCHSTRING = LVM_FIRST + 117 1368 LVM_SETICONSPACING = LVM_FIRST + 53 1369 LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54 1370 LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55 1371 LVM_GETSUBITEMRECT = LVM_FIRST + 56 1372 LVM_SUBITEMHITTEST = LVM_FIRST + 57 1373 LVM_SETCOLUMNORDERARRAY = LVM_FIRST + 58 1374 LVM_GETCOLUMNORDERARRAY = LVM_FIRST + 59 1375 LVM_SETHOTITEM = LVM_FIRST + 60 1376 LVM_GETHOTITEM = LVM_FIRST + 61 1377 LVM_SETHOTCURSOR = LVM_FIRST + 62 1378 LVM_GETHOTCURSOR = LVM_FIRST + 63 1379 LVM_APPROXIMATEVIEWRECT = LVM_FIRST + 64 1380 LVM_SETWORKAREAS = LVM_FIRST + 65 1381 LVM_GETWORKAREAS = LVM_FIRST + 70 1382 LVM_GETNUMBEROFWORKAREAS = LVM_FIRST + 73 1383 LVM_GETSELECTIONMARK = LVM_FIRST + 66 1384 LVM_SETSELECTIONMARK = LVM_FIRST + 67 1385 LVM_SETHOVERTIME = LVM_FIRST + 71 1386 LVM_GETHOVERTIME = LVM_FIRST + 72 1387 LVM_SETTOOLTIPS = LVM_FIRST + 74 1388 LVM_GETTOOLTIPS = LVM_FIRST + 78 1389 LVM_SORTITEMSEX = LVM_FIRST + 81 1390 LVM_SETBKIMAGE = LVM_FIRST + 138 1391 LVM_GETBKIMAGE = LVM_FIRST + 139 1392 LVM_SETSELECTEDCOLUMN = LVM_FIRST + 140 1393 LVM_SETVIEW = LVM_FIRST + 142 1394 LVM_GETVIEW = LVM_FIRST + 143 1395 LVM_INSERTGROUP = LVM_FIRST + 145 1396 LVM_SETGROUPINFO = LVM_FIRST + 147 1397 LVM_GETGROUPINFO = LVM_FIRST + 149 1398 LVM_REMOVEGROUP = LVM_FIRST + 150 1399 LVM_MOVEGROUP = LVM_FIRST + 151 1400 LVM_GETGROUPCOUNT = LVM_FIRST + 152 1401 LVM_GETGROUPINFOBYINDEX = LVM_FIRST + 153 1402 LVM_MOVEITEMTOGROUP = LVM_FIRST + 154 1403 LVM_GETGROUPRECT = LVM_FIRST + 98 1404 LVM_SETGROUPMETRICS = LVM_FIRST + 155 1405 LVM_GETGROUPMETRICS = LVM_FIRST + 156 1406 LVM_ENABLEGROUPVIEW = LVM_FIRST + 157 1407 LVM_SORTGROUPS = LVM_FIRST + 158 1408 LVM_INSERTGROUPSORTED = LVM_FIRST + 159 1409 LVM_REMOVEALLGROUPS = LVM_FIRST + 160 1410 LVM_HASGROUP = LVM_FIRST + 161 1411 LVM_GETGROUPSTATE = LVM_FIRST + 92 1412 LVM_GETFOCUSEDGROUP = LVM_FIRST + 93 1413 LVM_SETTILEVIEWINFO = LVM_FIRST + 162 1414 LVM_GETTILEVIEWINFO = LVM_FIRST + 163 1415 LVM_SETTILEINFO = LVM_FIRST + 164 1416 LVM_GETTILEINFO = LVM_FIRST + 165 1417 LVM_SETINSERTMARK = LVM_FIRST + 166 1418 LVM_GETINSERTMARK = LVM_FIRST + 167 1419 LVM_INSERTMARKHITTEST = LVM_FIRST + 168 1420 LVM_GETINSERTMARKRECT = LVM_FIRST + 169 1421 LVM_SETINSERTMARKCOLOR = LVM_FIRST + 170 1422 LVM_GETINSERTMARKCOLOR = LVM_FIRST + 171 1423 LVM_SETINFOTIP = LVM_FIRST + 173 1424 LVM_GETSELECTEDCOLUMN = LVM_FIRST + 174 1425 LVM_ISGROUPVIEWENABLED = LVM_FIRST + 175 1426 LVM_GETOUTLINECOLOR = LVM_FIRST + 176 1427 LVM_SETOUTLINECOLOR = LVM_FIRST + 177 1428 LVM_CANCELEDITLABEL = LVM_FIRST + 179 1429 LVM_MAPINDEXTOID = LVM_FIRST + 180 1430 LVM_MAPIDTOINDEX = LVM_FIRST + 181 1431 LVM_ISITEMVISIBLE = LVM_FIRST + 182 1432 LVM_GETNEXTITEMINDEX = LVM_FIRST + 211 1433) 1434 1435// ListView notifications 1436const ( 1437 LVN_FIRST = -100 1438 1439 LVN_ITEMCHANGING = LVN_FIRST - 0 1440 LVN_ITEMCHANGED = LVN_FIRST - 1 1441 LVN_INSERTITEM = LVN_FIRST - 2 1442 LVN_DELETEITEM = LVN_FIRST - 3 1443 LVN_DELETEALLITEMS = LVN_FIRST - 4 1444 LVN_BEGINLABELEDITA = LVN_FIRST - 5 1445 LVN_BEGINLABELEDITW = LVN_FIRST - 75 1446 LVN_ENDLABELEDITA = LVN_FIRST - 6 1447 LVN_ENDLABELEDITW = LVN_FIRST - 76 1448 LVN_COLUMNCLICK = LVN_FIRST - 8 1449 LVN_BEGINDRAG = LVN_FIRST - 9 1450 LVN_BEGINRDRAG = LVN_FIRST - 11 1451 LVN_ODCACHEHINT = LVN_FIRST - 13 1452 LVN_ODFINDITEMA = LVN_FIRST - 52 1453 LVN_ODFINDITEMW = LVN_FIRST - 79 1454 LVN_ITEMACTIVATE = LVN_FIRST - 14 1455 LVN_ODSTATECHANGED = LVN_FIRST - 15 1456 LVN_HOTTRACK = LVN_FIRST - 21 1457 LVN_GETDISPINFO = LVN_FIRST - 77 1458 LVN_SETDISPINFO = LVN_FIRST - 78 1459 LVN_KEYDOWN = LVN_FIRST - 55 1460 LVN_MARQUEEBEGIN = LVN_FIRST - 56 1461 LVN_GETINFOTIP = LVN_FIRST - 58 1462 LVN_INCREMENTALSEARCH = LVN_FIRST - 63 1463 LVN_BEGINSCROLL = LVN_FIRST - 80 1464 LVN_ENDSCROLL = LVN_FIRST - 81 1465) 1466 1467// ListView LVNI constants 1468const ( 1469 LVNI_ALL = 0 1470 LVNI_FOCUSED = 1 1471 LVNI_SELECTED = 2 1472 LVNI_CUT = 4 1473 LVNI_DROPHILITED = 8 1474 LVNI_ABOVE = 256 1475 LVNI_BELOW = 512 1476 LVNI_TOLEFT = 1024 1477 LVNI_TORIGHT = 2048 1478) 1479 1480// ListView styles 1481const ( 1482 LVS_ICON = 0x0000 1483 LVS_REPORT = 0x0001 1484 LVS_SMALLICON = 0x0002 1485 LVS_LIST = 0x0003 1486 LVS_TYPEMASK = 0x0003 1487 LVS_SINGLESEL = 0x0004 1488 LVS_SHOWSELALWAYS = 0x0008 1489 LVS_SORTASCENDING = 0x0010 1490 LVS_SORTDESCENDING = 0x0020 1491 LVS_SHAREIMAGELISTS = 0x0040 1492 LVS_NOLABELWRAP = 0x0080 1493 LVS_AUTOARRANGE = 0x0100 1494 LVS_EDITLABELS = 0x0200 1495 LVS_OWNERDATA = 0x1000 1496 LVS_NOSCROLL = 0x2000 1497 LVS_TYPESTYLEMASK = 0xfc00 1498 LVS_ALIGNTOP = 0x0000 1499 LVS_ALIGNLEFT = 0x0800 1500 LVS_ALIGNMASK = 0x0c00 1501 LVS_OWNERDRAWFIXED = 0x0400 1502 LVS_NOCOLUMNHEADER = 0x4000 1503 LVS_NOSORTHEADER = 0x8000 1504) 1505 1506// ListView extended styles 1507const ( 1508 LVS_EX_GRIDLINES = 0x00000001 1509 LVS_EX_SUBITEMIMAGES = 0x00000002 1510 LVS_EX_CHECKBOXES = 0x00000004 1511 LVS_EX_TRACKSELECT = 0x00000008 1512 LVS_EX_HEADERDRAGDROP = 0x00000010 1513 LVS_EX_FULLROWSELECT = 0x00000020 1514 LVS_EX_ONECLICKACTIVATE = 0x00000040 1515 LVS_EX_TWOCLICKACTIVATE = 0x00000080 1516 LVS_EX_FLATSB = 0x00000100 1517 LVS_EX_REGIONAL = 0x00000200 1518 LVS_EX_INFOTIP = 0x00000400 1519 LVS_EX_UNDERLINEHOT = 0x00000800 1520 LVS_EX_UNDERLINECOLD = 0x00001000 1521 LVS_EX_MULTIWORKAREAS = 0x00002000 1522 LVS_EX_LABELTIP = 0x00004000 1523 LVS_EX_BORDERSELECT = 0x00008000 1524 LVS_EX_DOUBLEBUFFER = 0x00010000 1525 LVS_EX_HIDELABELS = 0x00020000 1526 LVS_EX_SINGLEROW = 0x00040000 1527 LVS_EX_SNAPTOGRID = 0x00080000 1528 LVS_EX_SIMPLESELECT = 0x00100000 1529) 1530 1531// ListView column flags 1532const ( 1533 LVCF_FMT = 0x0001 1534 LVCF_WIDTH = 0x0002 1535 LVCF_TEXT = 0x0004 1536 LVCF_SUBITEM = 0x0008 1537 LVCF_IMAGE = 0x0010 1538 LVCF_ORDER = 0x0020 1539) 1540 1541// ListView column format constants 1542const ( 1543 LVCFMT_LEFT = 0x0000 1544 LVCFMT_RIGHT = 0x0001 1545 LVCFMT_CENTER = 0x0002 1546 LVCFMT_JUSTIFYMASK = 0x0003 1547 LVCFMT_IMAGE = 0x0800 1548 LVCFMT_BITMAP_ON_RIGHT = 0x1000 1549 LVCFMT_COL_HAS_IMAGES = 0x8000 1550) 1551 1552// ListView item flags 1553const ( 1554 LVIF_TEXT = 0x00000001 1555 LVIF_IMAGE = 0x00000002 1556 LVIF_PARAM = 0x00000004 1557 LVIF_STATE = 0x00000008 1558 LVIF_INDENT = 0x00000010 1559 LVIF_NORECOMPUTE = 0x00000800 1560 LVIF_GROUPID = 0x00000100 1561 LVIF_COLUMNS = 0x00000200 1562) 1563 1564// ListView item states 1565const ( 1566 LVIS_FOCUSED = 1 1567 LVIS_SELECTED = 2 1568 LVIS_CUT = 4 1569 LVIS_DROPHILITED = 8 1570 LVIS_OVERLAYMASK = 0xF00 1571 LVIS_STATEIMAGEMASK = 0xF000 1572) 1573 1574// ListView hit test constants 1575const ( 1576 LVHT_NOWHERE = 0x00000001 1577 LVHT_ONITEMICON = 0x00000002 1578 LVHT_ONITEMLABEL = 0x00000004 1579 LVHT_ONITEMSTATEICON = 0x00000008 1580 LVHT_ONITEM = LVHT_ONITEMICON | LVHT_ONITEMLABEL | LVHT_ONITEMSTATEICON 1581 1582 LVHT_ABOVE = 0x00000008 1583 LVHT_BELOW = 0x00000010 1584 LVHT_TORIGHT = 0x00000020 1585 LVHT_TOLEFT = 0x00000040 1586) 1587 1588// ListView image list types 1589const ( 1590 LVSIL_NORMAL = 0 1591 LVSIL_SMALL = 1 1592 LVSIL_STATE = 2 1593 LVSIL_GROUPHEADER = 3 1594) 1595 1596// InitCommonControlsEx flags 1597const ( 1598 ICC_LISTVIEW_CLASSES = 1 1599 ICC_TREEVIEW_CLASSES = 2 1600 ICC_BAR_CLASSES = 4 1601 ICC_TAB_CLASSES = 8 1602 ICC_UPDOWN_CLASS = 16 1603 ICC_PROGRESS_CLASS = 32 1604 ICC_HOTKEY_CLASS = 64 1605 ICC_ANIMATE_CLASS = 128 1606 ICC_WIN95_CLASSES = 255 1607 ICC_DATE_CLASSES = 256 1608 ICC_USEREX_CLASSES = 512 1609 ICC_COOL_CLASSES = 1024 1610 ICC_INTERNET_CLASSES = 2048 1611 ICC_PAGESCROLLER_CLASS = 4096 1612 ICC_NATIVEFNTCTL_CLASS = 8192 1613 INFOTIPSIZE = 1024 1614 ICC_STANDARD_CLASSES = 0x00004000 1615 ICC_LINK_CLASS = 0x00008000 1616) 1617 1618// Dialog Codes 1619const ( 1620 DLGC_WANTARROWS = 0x0001 1621 DLGC_WANTTAB = 0x0002 1622 DLGC_WANTALLKEYS = 0x0004 1623 DLGC_WANTMESSAGE = 0x0004 1624 DLGC_HASSETSEL = 0x0008 1625 DLGC_DEFPUSHBUTTON = 0x0010 1626 DLGC_UNDEFPUSHBUTTON = 0x0020 1627 DLGC_RADIOBUTTON = 0x0040 1628 DLGC_WANTCHARS = 0x0080 1629 DLGC_STATIC = 0x0100 1630 DLGC_BUTTON = 0x2000 1631) 1632 1633// Get/SetWindowWord/Long offsets for use with WC_DIALOG windows 1634const ( 1635 DWL_MSGRESULT = 0 1636 DWL_DLGPROC = 4 1637 DWL_USER = 8 1638) 1639 1640// Registry predefined keys 1641const ( 1642 HKEY_CLASSES_ROOT HKEY = 0x80000000 1643 HKEY_CURRENT_USER HKEY = 0x80000001 1644 HKEY_LOCAL_MACHINE HKEY = 0x80000002 1645 HKEY_USERS HKEY = 0x80000003 1646 HKEY_PERFORMANCE_DATA HKEY = 0x80000004 1647 HKEY_CURRENT_CONFIG HKEY = 0x80000005 1648 HKEY_DYN_DATA HKEY = 0x80000006 1649) 1650 1651// Registry Key Security and Access Rights 1652const ( 1653 KEY_ALL_ACCESS = 0xF003F 1654 KEY_CREATE_SUB_KEY = 0x0004 1655 KEY_ENUMERATE_SUB_KEYS = 0x0008 1656 KEY_NOTIFY = 0x0010 1657 KEY_QUERY_VALUE = 0x0001 1658 KEY_SET_VALUE = 0x0002 1659 KEY_READ = 0x20019 1660 KEY_WRITE = 0x20006 1661) 1662 1663const ( 1664 NFR_ANSI = 1 1665 NFR_UNICODE = 2 1666 NF_QUERY = 3 1667 NF_REQUERY = 4 1668) 1669 1670// Registry value types 1671const ( 1672 RRF_RT_REG_NONE = 0x00000001 1673 RRF_RT_REG_SZ = 0x00000002 1674 RRF_RT_REG_EXPAND_SZ = 0x00000004 1675 RRF_RT_REG_BINARY = 0x00000008 1676 RRF_RT_REG_DWORD = 0x00000010 1677 RRF_RT_REG_MULTI_SZ = 0x00000020 1678 RRF_RT_REG_QWORD = 0x00000040 1679 RRF_RT_DWORD = (RRF_RT_REG_BINARY | RRF_RT_REG_DWORD) 1680 RRF_RT_QWORD = (RRF_RT_REG_BINARY | RRF_RT_REG_QWORD) 1681 RRF_RT_ANY = 0x0000ffff 1682 RRF_NOEXPAND = 0x10000000 1683 RRF_ZEROONFAILURE = 0x20000000 1684 REG_PROCESS_APPKEY = 0x00000001 1685 REG_MUI_STRING_TRUNCATE = 0x00000001 1686) 1687 1688// PeekMessage wRemoveMsg value 1689const ( 1690 PM_NOREMOVE = 0x000 1691 PM_REMOVE = 0x001 1692 PM_NOYIELD = 0x002 1693) 1694 1695// ImageList flags 1696const ( 1697 ILC_MASK = 0x00000001 1698 ILC_COLOR = 0x00000000 1699 ILC_COLORDDB = 0x000000FE 1700 ILC_COLOR4 = 0x00000004 1701 ILC_COLOR8 = 0x00000008 1702 ILC_COLOR16 = 0x00000010 1703 ILC_COLOR24 = 0x00000018 1704 ILC_COLOR32 = 0x00000020 1705 ILC_PALETTE = 0x00000800 1706 ILC_MIRROR = 0x00002000 1707 ILC_PERITEMMIRROR = 0x00008000 1708 ILC_ORIGINALSIZE = 0x00010000 1709 ILC_HIGHQUALITYSCALE = 0x00020000 1710) 1711 1712// Keystroke Message Flags 1713const ( 1714 KF_EXTENDED = 0x0100 1715 KF_DLGMODE = 0x0800 1716 KF_MENUMODE = 0x1000 1717 KF_ALTDOWN = 0x2000 1718 KF_REPEAT = 0x4000 1719 KF_UP = 0x8000 1720) 1721 1722// Virtual-Key Codes 1723const ( 1724 VK_LBUTTON = 0x01 1725 VK_RBUTTON = 0x02 1726 VK_CANCEL = 0x03 1727 VK_MBUTTON = 0x04 1728 VK_XBUTTON1 = 0x05 1729 VK_XBUTTON2 = 0x06 1730 VK_BACK = 0x08 1731 VK_TAB = 0x09 1732 VK_CLEAR = 0x0C 1733 VK_RETURN = 0x0D 1734 VK_SHIFT = 0x10 1735 VK_CONTROL = 0x11 1736 VK_MENU = 0x12 1737 VK_PAUSE = 0x13 1738 VK_CAPITAL = 0x14 1739 VK_KANA = 0x15 1740 VK_HANGEUL = 0x15 1741 VK_HANGUL = 0x15 1742 VK_JUNJA = 0x17 1743 VK_FINAL = 0x18 1744 VK_HANJA = 0x19 1745 VK_KANJI = 0x19 1746 VK_ESCAPE = 0x1B 1747 VK_CONVERT = 0x1C 1748 VK_NONCONVERT = 0x1D 1749 VK_ACCEPT = 0x1E 1750 VK_MODECHANGE = 0x1F 1751 VK_SPACE = 0x20 1752 VK_PRIOR = 0x21 1753 VK_NEXT = 0x22 1754 VK_END = 0x23 1755 VK_HOME = 0x24 1756 VK_LEFT = 0x25 1757 VK_UP = 0x26 1758 VK_RIGHT = 0x27 1759 VK_DOWN = 0x28 1760 VK_SELECT = 0x29 1761 VK_PRINT = 0x2A 1762 VK_EXECUTE = 0x2B 1763 VK_SNAPSHOT = 0x2C 1764 VK_INSERT = 0x2D 1765 VK_DELETE = 0x2E 1766 VK_HELP = 0x2F 1767 VK_LWIN = 0x5B 1768 VK_RWIN = 0x5C 1769 VK_APPS = 0x5D 1770 VK_SLEEP = 0x5F 1771 VK_NUMPAD0 = 0x60 1772 VK_NUMPAD1 = 0x61 1773 VK_NUMPAD2 = 0x62 1774 VK_NUMPAD3 = 0x63 1775 VK_NUMPAD4 = 0x64 1776 VK_NUMPAD5 = 0x65 1777 VK_NUMPAD6 = 0x66 1778 VK_NUMPAD7 = 0x67 1779 VK_NUMPAD8 = 0x68 1780 VK_NUMPAD9 = 0x69 1781 VK_MULTIPLY = 0x6A 1782 VK_ADD = 0x6B 1783 VK_SEPARATOR = 0x6C 1784 VK_SUBTRACT = 0x6D 1785 VK_DECIMAL = 0x6E 1786 VK_DIVIDE = 0x6F 1787 VK_F1 = 0x70 1788 VK_F2 = 0x71 1789 VK_F3 = 0x72 1790 VK_F4 = 0x73 1791 VK_F5 = 0x74 1792 VK_F6 = 0x75 1793 VK_F7 = 0x76 1794 VK_F8 = 0x77 1795 VK_F9 = 0x78 1796 VK_F10 = 0x79 1797 VK_F11 = 0x7A 1798 VK_F12 = 0x7B 1799 VK_F13 = 0x7C 1800 VK_F14 = 0x7D 1801 VK_F15 = 0x7E 1802 VK_F16 = 0x7F 1803 VK_F17 = 0x80 1804 VK_F18 = 0x81 1805 VK_F19 = 0x82 1806 VK_F20 = 0x83 1807 VK_F21 = 0x84 1808 VK_F22 = 0x85 1809 VK_F23 = 0x86 1810 VK_F24 = 0x87 1811 VK_NUMLOCK = 0x90 1812 VK_SCROLL = 0x91 1813 VK_OEM_NEC_EQUAL = 0x92 1814 VK_OEM_FJ_JISHO = 0x92 1815 VK_OEM_FJ_MASSHOU = 0x93 1816 VK_OEM_FJ_TOUROKU = 0x94 1817 VK_OEM_FJ_LOYA = 0x95 1818 VK_OEM_FJ_ROYA = 0x96 1819 VK_LSHIFT = 0xA0 1820 VK_RSHIFT = 0xA1 1821 VK_LCONTROL = 0xA2 1822 VK_RCONTROL = 0xA3 1823 VK_LMENU = 0xA4 1824 VK_RMENU = 0xA5 1825 VK_BROWSER_BACK = 0xA6 1826 VK_BROWSER_FORWARD = 0xA7 1827 VK_BROWSER_REFRESH = 0xA8 1828 VK_BROWSER_STOP = 0xA9 1829 VK_BROWSER_SEARCH = 0xAA 1830 VK_BROWSER_FAVORITES = 0xAB 1831 VK_BROWSER_HOME = 0xAC 1832 VK_VOLUME_MUTE = 0xAD 1833 VK_VOLUME_DOWN = 0xAE 1834 VK_VOLUME_UP = 0xAF 1835 VK_MEDIA_NEXT_TRACK = 0xB0 1836 VK_MEDIA_PREV_TRACK = 0xB1 1837 VK_MEDIA_STOP = 0xB2 1838 VK_MEDIA_PLAY_PAUSE = 0xB3 1839 VK_LAUNCH_MAIL = 0xB4 1840 VK_LAUNCH_MEDIA_SELECT = 0xB5 1841 VK_LAUNCH_APP1 = 0xB6 1842 VK_LAUNCH_APP2 = 0xB7 1843 VK_OEM_1 = 0xBA 1844 VK_OEM_PLUS = 0xBB 1845 VK_OEM_COMMA = 0xBC 1846 VK_OEM_MINUS = 0xBD 1847 VK_OEM_PERIOD = 0xBE 1848 VK_OEM_2 = 0xBF 1849 VK_OEM_3 = 0xC0 1850 VK_OEM_4 = 0xDB 1851 VK_OEM_5 = 0xDC 1852 VK_OEM_6 = 0xDD 1853 VK_OEM_7 = 0xDE 1854 VK_OEM_8 = 0xDF 1855 VK_OEM_AX = 0xE1 1856 VK_OEM_102 = 0xE2 1857 VK_ICO_HELP = 0xE3 1858 VK_ICO_00 = 0xE4 1859 VK_PROCESSKEY = 0xE5 1860 VK_ICO_CLEAR = 0xE6 1861 VK_OEM_RESET = 0xE9 1862 VK_OEM_JUMP = 0xEA 1863 VK_OEM_PA1 = 0xEB 1864 VK_OEM_PA2 = 0xEC 1865 VK_OEM_PA3 = 0xED 1866 VK_OEM_WSCTRL = 0xEE 1867 VK_OEM_CUSEL = 0xEF 1868 VK_OEM_ATTN = 0xF0 1869 VK_OEM_FINISH = 0xF1 1870 VK_OEM_COPY = 0xF2 1871 VK_OEM_AUTO = 0xF3 1872 VK_OEM_ENLW = 0xF4 1873 VK_OEM_BACKTAB = 0xF5 1874 VK_ATTN = 0xF6 1875 VK_CRSEL = 0xF7 1876 VK_EXSEL = 0xF8 1877 VK_EREOF = 0xF9 1878 VK_PLAY = 0xFA 1879 VK_ZOOM = 0xFB 1880 VK_NONAME = 0xFC 1881 VK_PA1 = 0xFD 1882 VK_OEM_CLEAR = 0xFE 1883) 1884 1885// Registry Value Types 1886const ( 1887 REG_NONE = 0 1888 REG_SZ = 1 1889 REG_EXPAND_SZ = 2 1890 REG_BINARY = 3 1891 REG_DWORD = 4 1892 REG_DWORD_LITTLE_ENDIAN = 4 1893 REG_DWORD_BIG_ENDIAN = 5 1894 REG_LINK = 6 1895 REG_MULTI_SZ = 7 1896 REG_RESOURCE_LIST = 8 1897 REG_FULL_RESOURCE_DESCRIPTOR = 9 1898 REG_RESOURCE_REQUIREMENTS_LIST = 10 1899 REG_QWORD = 11 1900 REG_QWORD_LITTLE_ENDIAN = 11 1901) 1902 1903// Tooltip styles 1904const ( 1905 TTS_ALWAYSTIP = 0x01 1906 TTS_NOPREFIX = 0x02 1907 TTS_NOANIMATE = 0x10 1908 TTS_NOFADE = 0x20 1909 TTS_BALLOON = 0x40 1910 TTS_CLOSE = 0x80 1911 TTS_USEVISUALSTYLE = 0x100 1912) 1913 1914// Tooltip messages 1915const ( 1916 TTM_ACTIVATE = (WM_USER + 1) 1917 TTM_SETDELAYTIME = (WM_USER + 3) 1918 TTM_ADDTOOL = (WM_USER + 50) 1919 TTM_DELTOOL = (WM_USER + 51) 1920 TTM_NEWTOOLRECT = (WM_USER + 52) 1921 TTM_RELAYEVENT = (WM_USER + 7) 1922 TTM_GETTOOLINFO = (WM_USER + 53) 1923 TTM_SETTOOLINFO = (WM_USER + 54) 1924 TTM_HITTEST = (WM_USER + 55) 1925 TTM_GETTEXT = (WM_USER + 56) 1926 TTM_UPDATETIPTEXT = (WM_USER + 57) 1927 TTM_GETTOOLCOUNT = (WM_USER + 13) 1928 TTM_ENUMTOOLS = (WM_USER + 58) 1929 TTM_GETCURRENTTOOL = (WM_USER + 59) 1930 TTM_WINDOWFROMPOINT = (WM_USER + 16) 1931 TTM_TRACKACTIVATE = (WM_USER + 17) 1932 TTM_TRACKPOSITION = (WM_USER + 18) 1933 TTM_SETTIPBKCOLOR = (WM_USER + 19) 1934 TTM_SETTIPTEXTCOLOR = (WM_USER + 20) 1935 TTM_GETDELAYTIME = (WM_USER + 21) 1936 TTM_GETTIPBKCOLOR = (WM_USER + 22) 1937 TTM_GETTIPTEXTCOLOR = (WM_USER + 23) 1938 TTM_SETMAXTIPWIDTH = (WM_USER + 24) 1939 TTM_GETMAXTIPWIDTH = (WM_USER + 25) 1940 TTM_SETMARGIN = (WM_USER + 26) 1941 TTM_GETMARGIN = (WM_USER + 27) 1942 TTM_POP = (WM_USER + 28) 1943 TTM_UPDATE = (WM_USER + 29) 1944 TTM_GETBUBBLESIZE = (WM_USER + 30) 1945 TTM_ADJUSTRECT = (WM_USER + 31) 1946 TTM_SETTITLE = (WM_USER + 33) 1947 TTM_POPUP = (WM_USER + 34) 1948 TTM_GETTITLE = (WM_USER + 35) 1949) 1950 1951// Tooltip icons 1952const ( 1953 TTI_NONE = 0 1954 TTI_INFO = 1 1955 TTI_WARNING = 2 1956 TTI_ERROR = 3 1957 TTI_INFO_LARGE = 4 1958 TTI_WARNING_LARGE = 5 1959 TTI_ERROR_LARGE = 6 1960) 1961 1962// Tooltip notifications 1963const ( 1964 TTN_FIRST = -520 1965 TTN_LAST = -549 1966 TTN_GETDISPINFO = (TTN_FIRST - 10) 1967 TTN_SHOW = (TTN_FIRST - 1) 1968 TTN_POP = (TTN_FIRST - 2) 1969 TTN_LINKCLICK = (TTN_FIRST - 3) 1970 TTN_NEEDTEXT = TTN_GETDISPINFO 1971) 1972 1973const ( 1974 TTF_IDISHWND = 0x0001 1975 TTF_CENTERTIP = 0x0002 1976 TTF_RTLREADING = 0x0004 1977 TTF_SUBCLASS = 0x0010 1978 TTF_TRACK = 0x0020 1979 TTF_ABSOLUTE = 0x0080 1980 TTF_TRANSPARENT = 0x0100 1981 TTF_PARSELINKS = 0x1000 1982 TTF_DI_SETITEM = 0x8000 1983) 1984 1985const ( 1986 SWP_NOSIZE = 0x0001 1987 SWP_NOMOVE = 0x0002 1988 SWP_NOZORDER = 0x0004 1989 SWP_NOREDRAW = 0x0008 1990 SWP_NOACTIVATE = 0x0010 1991 SWP_FRAMECHANGED = 0x0020 1992 SWP_SHOWWINDOW = 0x0040 1993 SWP_HIDEWINDOW = 0x0080 1994 SWP_NOCOPYBITS = 0x0100 1995 SWP_NOOWNERZORDER = 0x0200 1996 SWP_NOSENDCHANGING = 0x0400 1997 SWP_DRAWFRAME = SWP_FRAMECHANGED 1998 SWP_NOREPOSITION = SWP_NOOWNERZORDER 1999 SWP_DEFERERASE = 0x2000 2000 SWP_ASYNCWINDOWPOS = 0x4000 2001) 2002 2003// Predefined window handles 2004const ( 2005 HWND_BROADCAST = HWND(0xFFFF) 2006 HWND_BOTTOM = HWND(1) 2007 HWND_NOTOPMOST = ^HWND(1) // -2 2008 HWND_TOP = HWND(0) 2009 HWND_TOPMOST = ^HWND(0) // -1 2010 HWND_DESKTOP = HWND(0) 2011 HWND_MESSAGE = ^HWND(2) // -3 2012) 2013 2014// Pen types 2015const ( 2016 PS_COSMETIC = 0x00000000 2017 PS_GEOMETRIC = 0x00010000 2018 PS_TYPE_MASK = 0x000F0000 2019) 2020 2021// Pen styles 2022const ( 2023 PS_SOLID = 0 2024 PS_DASH = 1 2025 PS_DOT = 2 2026 PS_DASHDOT = 3 2027 PS_DASHDOTDOT = 4 2028 PS_NULL = 5 2029 PS_INSIDEFRAME = 6 2030 PS_USERSTYLE = 7 2031 PS_ALTERNATE = 8 2032 PS_STYLE_MASK = 0x0000000F 2033) 2034 2035// Pen cap types 2036const ( 2037 PS_ENDCAP_ROUND = 0x00000000 2038 PS_ENDCAP_SQUARE = 0x00000100 2039 PS_ENDCAP_FLAT = 0x00000200 2040 PS_ENDCAP_MASK = 0x00000F00 2041) 2042 2043// Pen join types 2044const ( 2045 PS_JOIN_ROUND = 0x00000000 2046 PS_JOIN_BEVEL = 0x00001000 2047 PS_JOIN_MITER = 0x00002000 2048 PS_JOIN_MASK = 0x0000F000 2049) 2050 2051// Hatch styles 2052const ( 2053 HS_HORIZONTAL = 0 2054 HS_VERTICAL = 1 2055 HS_FDIAGONAL = 2 2056 HS_BDIAGONAL = 3 2057 HS_CROSS = 4 2058 HS_DIAGCROSS = 5 2059) 2060 2061// Stock Logical Objects 2062const ( 2063 WHITE_BRUSH = 0 2064 LTGRAY_BRUSH = 1 2065 GRAY_BRUSH = 2 2066 DKGRAY_BRUSH = 3 2067 BLACK_BRUSH = 4 2068 NULL_BRUSH = 5 2069 HOLLOW_BRUSH = NULL_BRUSH 2070 WHITE_PEN = 6 2071 BLACK_PEN = 7 2072 NULL_PEN = 8 2073 OEM_FIXED_FONT = 10 2074 ANSI_FIXED_FONT = 11 2075 ANSI_VAR_FONT = 12 2076 SYSTEM_FONT = 13 2077 DEVICE_DEFAULT_FONT = 14 2078 DEFAULT_PALETTE = 15 2079 SYSTEM_FIXED_FONT = 16 2080 DEFAULT_GUI_FONT = 17 2081 DC_BRUSH = 18 2082 DC_PEN = 19 2083) 2084 2085// Brush styles 2086const ( 2087 BS_SOLID = 0 2088 BS_NULL = 1 2089 BS_HOLLOW = BS_NULL 2090 BS_HATCHED = 2 2091 BS_PATTERN = 3 2092 BS_INDEXED = 4 2093 BS_DIBPATTERN = 5 2094 BS_DIBPATTERNPT = 6 2095 BS_PATTERN8X8 = 7 2096 BS_DIBPATTERN8X8 = 8 2097 BS_MONOPATTERN = 9 2098) 2099 2100// TRACKMOUSEEVENT flags 2101const ( 2102 TME_HOVER = 0x00000001 2103 TME_LEAVE = 0x00000002 2104 TME_NONCLIENT = 0x00000010 2105 TME_QUERY = 0x40000000 2106 TME_CANCEL = 0x80000000 2107 2108 HOVER_DEFAULT = 0xFFFFFFFF 2109) 2110 2111// WM_NCHITTEST and MOUSEHOOKSTRUCT Mouse Position Codes 2112const ( 2113 HTERROR = (-2) 2114 HTTRANSPARENT = (-1) 2115 HTNOWHERE = 0 2116 HTCLIENT = 1 2117 HTCAPTION = 2 2118 HTSYSMENU = 3 2119 HTGROWBOX = 4 2120 HTSIZE = HTGROWBOX 2121 HTMENU = 5 2122 HTHSCROLL = 6 2123 HTVSCROLL = 7 2124 HTMINBUTTON = 8 2125 HTMAXBUTTON = 9 2126 HTLEFT = 10 2127 HTRIGHT = 11 2128 HTTOP = 12 2129 HTTOPLEFT = 13 2130 HTTOPRIGHT = 14 2131 HTBOTTOM = 15 2132 HTBOTTOMLEFT = 16 2133 HTBOTTOMRIGHT = 17 2134 HTBORDER = 18 2135 HTREDUCE = HTMINBUTTON 2136 HTZOOM = HTMAXBUTTON 2137 HTSIZEFIRST = HTLEFT 2138 HTSIZELAST = HTBOTTOMRIGHT 2139 HTOBJECT = 19 2140 HTCLOSE = 20 2141 HTHELP = 21 2142) 2143 2144// DrawText[Ex] format flags 2145const ( 2146 DT_TOP = 0x00000000 2147 DT_LEFT = 0x00000000 2148 DT_CENTER = 0x00000001 2149 DT_RIGHT = 0x00000002 2150 DT_VCENTER = 0x00000004 2151 DT_BOTTOM = 0x00000008 2152 DT_WORDBREAK = 0x00000010 2153 DT_SINGLELINE = 0x00000020 2154 DT_EXPANDTABS = 0x00000040 2155 DT_TABSTOP = 0x00000080 2156 DT_NOCLIP = 0x00000100 2157 DT_EXTERNALLEADING = 0x00000200 2158 DT_CALCRECT = 0x00000400 2159 DT_NOPREFIX = 0x00000800 2160 DT_INTERNAL = 0x00001000 2161 DT_EDITCONTROL = 0x00002000 2162 DT_PATH_ELLIPSIS = 0x00004000 2163 DT_END_ELLIPSIS = 0x00008000 2164 DT_MODIFYSTRING = 0x00010000 2165 DT_RTLREADING = 0x00020000 2166 DT_WORD_ELLIPSIS = 0x00040000 2167 DT_NOFULLWIDTHCHARBREAK = 0x00080000 2168 DT_HIDEPREFIX = 0x00100000 2169 DT_PREFIXONLY = 0x00200000 2170) 2171 2172const CLR_INVALID = 0xFFFFFFFF 2173 2174// Background Modes 2175const ( 2176 TRANSPARENT = 1 2177 OPAQUE = 2 2178 BKMODE_LAST = 2 2179) 2180 2181// Global Memory Flags 2182const ( 2183 GMEM_FIXED = 0x0000 2184 GMEM_MOVEABLE = 0x0002 2185 GMEM_NOCOMPACT = 0x0010 2186 GMEM_NODISCARD = 0x0020 2187 GMEM_ZEROINIT = 0x0040 2188 GMEM_MODIFY = 0x0080 2189 GMEM_DISCARDABLE = 0x0100 2190 GMEM_NOT_BANKED = 0x1000 2191 GMEM_SHARE = 0x2000 2192 GMEM_DDESHARE = 0x2000 2193 GMEM_NOTIFY = 0x4000 2194 GMEM_LOWER = GMEM_NOT_BANKED 2195 GMEM_VALID_FLAGS = 0x7F72 2196 GMEM_INVALID_HANDLE = 0x8000 2197 GHND = (GMEM_MOVEABLE | GMEM_ZEROINIT) 2198 GPTR = (GMEM_FIXED | GMEM_ZEROINIT) 2199) 2200 2201// Ternary raster operations 2202const ( 2203 SRCCOPY = 0x00CC0020 2204 SRCPAINT = 0x00EE0086 2205 SRCAND = 0x008800C6 2206 SRCINVERT = 0x00660046 2207 SRCERASE = 0x00440328 2208 NOTSRCCOPY = 0x00330008 2209 NOTSRCERASE = 0x001100A6 2210 MERGECOPY = 0x00C000CA 2211 MERGEPAINT = 0x00BB0226 2212 PATCOPY = 0x00F00021 2213 PATPAINT = 0x00FB0A09 2214 PATINVERT = 0x005A0049 2215 DSTINVERT = 0x00550009 2216 BLACKNESS = 0x00000042 2217 WHITENESS = 0x00FF0062 2218 NOMIRRORBITMAP = 0x80000000 2219 CAPTUREBLT = 0x40000000 2220) 2221 2222// Clipboard formats 2223const ( 2224 CF_TEXT = 1 2225 CF_BITMAP = 2 2226 CF_METAFILEPICT = 3 2227 CF_SYLK = 4 2228 CF_DIF = 5 2229 CF_TIFF = 6 2230 CF_OEMTEXT = 7 2231 CF_DIB = 8 2232 CF_PALETTE = 9 2233 CF_PENDATA = 10 2234 CF_RIFF = 11 2235 CF_WAVE = 12 2236 CF_UNICODETEXT = 13 2237 CF_ENHMETAFILE = 14 2238 CF_HDROP = 15 2239 CF_LOCALE = 16 2240 CF_DIBV5 = 17 2241 CF_MAX = 18 2242 CF_OWNERDISPLAY = 0x0080 2243 CF_DSPTEXT = 0x0081 2244 CF_DSPBITMAP = 0x0082 2245 CF_DSPMETAFILEPICT = 0x0083 2246 CF_DSPENHMETAFILE = 0x008E 2247 CF_PRIVATEFIRST = 0x0200 2248 CF_PRIVATELAST = 0x02FF 2249 CF_GDIOBJFIRST = 0x0300 2250 CF_GDIOBJLAST = 0x03FF 2251) 2252 2253// Bitmap compression formats 2254const ( 2255 BI_RGB = 0 2256 BI_RLE8 = 1 2257 BI_RLE4 = 2 2258 BI_BITFIELDS = 3 2259 BI_JPEG = 4 2260 BI_PNG = 5 2261) 2262 2263// SetDIBitsToDevice fuColorUse 2264const ( 2265 DIB_PAL_COLORS = 1 2266 DIB_RGB_COLORS = 0 2267) 2268 2269const ( 2270 STANDARD_RIGHTS_REQUIRED = 0x000F 2271) 2272 2273// Service Control Manager object specific access types 2274const ( 2275 SC_MANAGER_CONNECT = 0x0001 2276 SC_MANAGER_CREATE_SERVICE = 0x0002 2277 SC_MANAGER_ENUMERATE_SERVICE = 0x0004 2278 SC_MANAGER_LOCK = 0x0008 2279 SC_MANAGER_QUERY_LOCK_STATUS = 0x0010 2280 SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020 2281 SC_MANAGER_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SC_MANAGER_CONNECT | SC_MANAGER_CREATE_SERVICE | SC_MANAGER_ENUMERATE_SERVICE | SC_MANAGER_LOCK | SC_MANAGER_QUERY_LOCK_STATUS | SC_MANAGER_MODIFY_BOOT_CONFIG 2282) 2283 2284// Service Types (Bit Mask) 2285const ( 2286 SERVICE_KERNEL_DRIVER = 0x00000001 2287 SERVICE_FILE_SYSTEM_DRIVER = 0x00000002 2288 SERVICE_ADAPTER = 0x00000004 2289 SERVICE_RECOGNIZER_DRIVER = 0x00000008 2290 SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER 2291 SERVICE_WIN32_OWN_PROCESS = 0x00000010 2292 SERVICE_WIN32_SHARE_PROCESS = 0x00000020 2293 SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS 2294 SERVICE_INTERACTIVE_PROCESS = 0x00000100 2295 SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS 2296) 2297 2298// Service State -- for CurrentState 2299const ( 2300 SERVICE_STOPPED = 0x00000001 2301 SERVICE_START_PENDING = 0x00000002 2302 SERVICE_STOP_PENDING = 0x00000003 2303 SERVICE_RUNNING = 0x00000004 2304 SERVICE_CONTINUE_PENDING = 0x00000005 2305 SERVICE_PAUSE_PENDING = 0x00000006 2306 SERVICE_PAUSED = 0x00000007 2307) 2308 2309// Controls Accepted (Bit Mask) 2310const ( 2311 SERVICE_ACCEPT_STOP = 0x00000001 2312 SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002 2313 SERVICE_ACCEPT_SHUTDOWN = 0x00000004 2314 SERVICE_ACCEPT_PARAMCHANGE = 0x00000008 2315 SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010 2316 SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 0x00000020 2317 SERVICE_ACCEPT_POWEREVENT = 0x00000040 2318 SERVICE_ACCEPT_SESSIONCHANGE = 0x00000080 2319 SERVICE_ACCEPT_PRESHUTDOWN = 0x00000100 2320 SERVICE_ACCEPT_TIMECHANGE = 0x00000200 2321 SERVICE_ACCEPT_TRIGGEREVENT = 0x00000400 2322) 2323 2324// Service object specific access type 2325const ( 2326 SERVICE_QUERY_CONFIG = 0x0001 2327 SERVICE_CHANGE_CONFIG = 0x0002 2328 SERVICE_QUERY_STATUS = 0x0004 2329 SERVICE_ENUMERATE_DEPENDENTS = 0x0008 2330 SERVICE_START = 0x0010 2331 SERVICE_STOP = 0x0020 2332 SERVICE_PAUSE_CONTINUE = 0x0040 2333 SERVICE_INTERROGATE = 0x0080 2334 SERVICE_USER_DEFINED_CONTROL = 0x0100 2335 2336 SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | 2337 SERVICE_QUERY_CONFIG | 2338 SERVICE_CHANGE_CONFIG | 2339 SERVICE_QUERY_STATUS | 2340 SERVICE_ENUMERATE_DEPENDENTS | 2341 SERVICE_START | 2342 SERVICE_STOP | 2343 SERVICE_PAUSE_CONTINUE | 2344 SERVICE_INTERROGATE | 2345 SERVICE_USER_DEFINED_CONTROL 2346) 2347 2348// MapVirtualKey maptypes 2349const ( 2350 MAPVK_VK_TO_CHAR = 2 2351 MAPVK_VK_TO_VSC = 0 2352 MAPVK_VSC_TO_VK = 1 2353 MAPVK_VSC_TO_VK_EX = 3 2354) 2355 2356// ReadEventLog Flags 2357const ( 2358 EVENTLOG_SEEK_READ = 0x0002 2359 EVENTLOG_SEQUENTIAL_READ = 0x0001 2360 EVENTLOG_FORWARDS_READ = 0x0004 2361 EVENTLOG_BACKWARDS_READ = 0x0008 2362) 2363 2364// CreateToolhelp32Snapshot flags 2365const ( 2366 TH32CS_SNAPHEAPLIST = 0x00000001 2367 TH32CS_SNAPPROCESS = 0x00000002 2368 TH32CS_SNAPTHREAD = 0x00000004 2369 TH32CS_SNAPMODULE = 0x00000008 2370 TH32CS_SNAPMODULE32 = 0x00000010 2371 TH32CS_INHERIT = 0x80000000 2372 TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD 2373) 2374 2375const ( 2376 MAX_MODULE_NAME32 = 255 2377 MAX_PATH = 260 2378) 2379 2380const ( 2381 FOREGROUND_BLUE = 0x0001 2382 FOREGROUND_GREEN = 0x0002 2383 FOREGROUND_RED = 0x0004 2384 FOREGROUND_INTENSITY = 0x0008 2385 BACKGROUND_BLUE = 0x0010 2386 BACKGROUND_GREEN = 0x0020 2387 BACKGROUND_RED = 0x0040 2388 BACKGROUND_INTENSITY = 0x0080 2389 COMMON_LVB_LEADING_BYTE = 0x0100 2390 COMMON_LVB_TRAILING_BYTE = 0x0200 2391 COMMON_LVB_GRID_HORIZONTAL = 0x0400 2392 COMMON_LVB_GRID_LVERTICAL = 0x0800 2393 COMMON_LVB_GRID_RVERTICAL = 0x1000 2394 COMMON_LVB_REVERSE_VIDEO = 0x4000 2395 COMMON_LVB_UNDERSCORE = 0x8000 2396) 2397 2398// Flags used by the DWM_BLURBEHIND structure to indicate 2399// which of its members contain valid information. 2400const ( 2401 DWM_BB_ENABLE = 0x00000001 // A value for the fEnable member has been specified. 2402 DWM_BB_BLURREGION = 0x00000002 // A value for the hRgnBlur member has been specified. 2403 DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004 // A value for the fTransitionOnMaximized member has been specified. 2404) 2405 2406// Flags used by the DwmEnableComposition function 2407// to change the state of Desktop Window Manager (DWM) composition. 2408const ( 2409 DWM_EC_DISABLECOMPOSITION = 0 // Disable composition 2410 DWM_EC_ENABLECOMPOSITION = 1 // Enable composition 2411) 2412 2413// enum-lite implementation for the following constant structure 2414type DWM_SHOWCONTACT int32 2415 2416const ( 2417 DWMSC_DOWN = 0x00000001 2418 DWMSC_UP = 0x00000002 2419 DWMSC_DRAG = 0x00000004 2420 DWMSC_HOLD = 0x00000008 2421 DWMSC_PENBARREL = 0x00000010 2422 DWMSC_NONE = 0x00000000 2423 DWMSC_ALL = 0xFFFFFFFF 2424) 2425 2426// enum-lite implementation for the following constant structure 2427type DWM_SOURCE_FRAME_SAMPLING int32 2428 2429// TODO: need to verify this construction 2430// Flags used by the DwmSetPresentParameters function 2431// to specify the frame sampling type 2432const ( 2433 DWM_SOURCE_FRAME_SAMPLING_POINT = iota + 1 2434 DWM_SOURCE_FRAME_SAMPLING_COVERAGE 2435 DWM_SOURCE_FRAME_SAMPLING_LAST 2436) 2437 2438// Flags used by the DWM_THUMBNAIL_PROPERTIES structure to 2439// indicate which of its members contain valid information. 2440const ( 2441 DWM_TNP_RECTDESTINATION = 0x00000001 // A value for the rcDestination member has been specified 2442 DWM_TNP_RECTSOURCE = 0x00000002 // A value for the rcSource member has been specified 2443 DWM_TNP_OPACITY = 0x00000004 // A value for the opacity member has been specified 2444 DWM_TNP_VISIBLE = 0x00000008 // A value for the fVisible member has been specified 2445 DWM_TNP_SOURCECLIENTAREAONLY = 0x00000010 // A value for the fSourceClientAreaOnly member has been specified 2446) 2447 2448// enum-lite implementation for the following constant structure 2449type DWMFLIP3DWINDOWPOLICY int32 2450 2451// TODO: need to verify this construction 2452// Flags used by the DwmSetWindowAttribute function 2453// to specify the Flip3D window policy 2454const ( 2455 DWMFLIP3D_DEFAULT = iota + 1 2456 DWMFLIP3D_EXCLUDEBELOW 2457 DWMFLIP3D_EXCLUDEABOVE 2458 DWMFLIP3D_LAST 2459) 2460 2461// enum-lite implementation for the following constant structure 2462type DWMNCRENDERINGPOLICY int32 2463 2464// TODO: need to verify this construction 2465// Flags used by the DwmSetWindowAttribute function 2466// to specify the non-client area rendering policy 2467const ( 2468 DWMNCRP_USEWINDOWSTYLE = iota + 1 2469 DWMNCRP_DISABLED 2470 DWMNCRP_ENABLED 2471 DWMNCRP_LAST 2472) 2473 2474// enum-lite implementation for the following constant structure 2475type DWMTRANSITION_OWNEDWINDOW_TARGET int32 2476 2477const ( 2478 DWMTRANSITION_OWNEDWINDOW_NULL = -1 2479 DWMTRANSITION_OWNEDWINDOW_REPOSITION = 0 2480) 2481 2482// enum-lite implementation for the following constant structure 2483type DWMWINDOWATTRIBUTE int32 2484 2485// TODO: need to verify this construction 2486// Flags used by the DwmGetWindowAttribute and DwmSetWindowAttribute functions 2487// to specify window attributes for non-client rendering 2488const ( 2489 DWMWA_NCRENDERING_ENABLED = iota + 1 2490 DWMWA_NCRENDERING_POLICY 2491 DWMWA_TRANSITIONS_FORCEDISABLED 2492 DWMWA_ALLOW_NCPAINT 2493 DWMWA_CAPTION_BUTTON_BOUNDS 2494 DWMWA_NONCLIENT_RTL_LAYOUT 2495 DWMWA_FORCE_ICONIC_REPRESENTATION 2496 DWMWA_FLIP3D_POLICY 2497 DWMWA_EXTENDED_FRAME_BOUNDS 2498 DWMWA_HAS_ICONIC_BITMAP 2499 DWMWA_DISALLOW_PEEK 2500 DWMWA_EXCLUDED_FROM_PEEK 2501 DWMWA_CLOAK 2502 DWMWA_CLOAKED 2503 DWMWA_FREEZE_REPRESENTATION 2504 DWMWA_LAST 2505) 2506 2507// enum-lite implementation for the following constant structure 2508type GESTURE_TYPE int32 2509 2510// TODO: use iota? 2511// Identifies the gesture type 2512const ( 2513 GT_PEN_TAP = 0 2514 GT_PEN_DOUBLETAP = 1 2515 GT_PEN_RIGHTTAP = 2 2516 GT_PEN_PRESSANDHOLD = 3 2517 GT_PEN_PRESSANDHOLDABORT = 4 2518 GT_TOUCH_TAP = 5 2519 GT_TOUCH_DOUBLETAP = 6 2520 GT_TOUCH_RIGHTTAP = 7 2521 GT_TOUCH_PRESSANDHOLD = 8 2522 GT_TOUCH_PRESSANDHOLDABORT = 9 2523 GT_TOUCH_PRESSANDTAP = 10 2524) 2525 2526// Icons 2527const ( 2528 ICON_SMALL = 0 2529 ICON_BIG = 1 2530 ICON_SMALL2 = 2 2531) 2532 2533const ( 2534 SIZE_RESTORED = 0 2535 SIZE_MINIMIZED = 1 2536 SIZE_MAXIMIZED = 2 2537 SIZE_MAXSHOW = 3 2538 SIZE_MAXHIDE = 4 2539) 2540 2541// XButton values 2542const ( 2543 XBUTTON1 = 1 2544 XBUTTON2 = 2 2545) 2546 2547// Devmode 2548const ( 2549 DM_SPECVERSION = 0x0401 2550 2551 DM_ORIENTATION = 0x00000001 2552 DM_PAPERSIZE = 0x00000002 2553 DM_PAPERLENGTH = 0x00000004 2554 DM_PAPERWIDTH = 0x00000008 2555 DM_SCALE = 0x00000010 2556 DM_POSITION = 0x00000020 2557 DM_NUP = 0x00000040 2558 DM_DISPLAYORIENTATION = 0x00000080 2559 DM_COPIES = 0x00000100 2560 DM_DEFAULTSOURCE = 0x00000200 2561 DM_PRINTQUALITY = 0x00000400 2562 DM_COLOR = 0x00000800 2563 DM_DUPLEX = 0x00001000 2564 DM_YRESOLUTION = 0x00002000 2565 DM_TTOPTION = 0x00004000 2566 DM_COLLATE = 0x00008000 2567 DM_FORMNAME = 0x00010000 2568 DM_LOGPIXELS = 0x00020000 2569 DM_BITSPERPEL = 0x00040000 2570 DM_PELSWIDTH = 0x00080000 2571 DM_PELSHEIGHT = 0x00100000 2572 DM_DISPLAYFLAGS = 0x00200000 2573 DM_DISPLAYFREQUENCY = 0x00400000 2574 DM_ICMMETHOD = 0x00800000 2575 DM_ICMINTENT = 0x01000000 2576 DM_MEDIATYPE = 0x02000000 2577 DM_DITHERTYPE = 0x04000000 2578 DM_PANNINGWIDTH = 0x08000000 2579 DM_PANNINGHEIGHT = 0x10000000 2580 DM_DISPLAYFIXEDOUTPUT = 0x20000000 2581) 2582 2583// ChangeDisplaySettings 2584const ( 2585 CDS_UPDATEREGISTRY = 0x00000001 2586 CDS_TEST = 0x00000002 2587 CDS_FULLSCREEN = 0x00000004 2588 CDS_GLOBAL = 0x00000008 2589 CDS_SET_PRIMARY = 0x00000010 2590 CDS_VIDEOPARAMETERS = 0x00000020 2591 CDS_RESET = 0x40000000 2592 CDS_NORESET = 0x10000000 2593 2594 DISP_CHANGE_SUCCESSFUL = 0 2595 DISP_CHANGE_RESTART = 1 2596 DISP_CHANGE_FAILED = -1 2597 DISP_CHANGE_BADMODE = -2 2598 DISP_CHANGE_NOTUPDATED = -3 2599 DISP_CHANGE_BADFLAGS = -4 2600 DISP_CHANGE_BADPARAM = -5 2601 DISP_CHANGE_BADDUALVIEW = -6 2602) 2603 2604const ( 2605 ENUM_CURRENT_SETTINGS = 0xFFFFFFFF 2606 ENUM_REGISTRY_SETTINGS = 0xFFFFFFFE 2607) 2608 2609// PIXELFORMATDESCRIPTOR 2610const ( 2611 PFD_TYPE_RGBA = 0 2612 PFD_TYPE_COLORINDEX = 1 2613 2614 PFD_MAIN_PLANE = 0 2615 PFD_OVERLAY_PLANE = 1 2616 PFD_UNDERLAY_PLANE = -1 2617 2618 PFD_DOUBLEBUFFER = 0x00000001 2619 PFD_STEREO = 0x00000002 2620 PFD_DRAW_TO_WINDOW = 0x00000004 2621 PFD_DRAW_TO_BITMAP = 0x00000008 2622 PFD_SUPPORT_GDI = 0x00000010 2623 PFD_SUPPORT_OPENGL = 0x00000020 2624 PFD_GENERIC_FORMAT = 0x00000040 2625 PFD_NEED_PALETTE = 0x00000080 2626 PFD_NEED_SYSTEM_PALETTE = 0x00000100 2627 PFD_SWAP_EXCHANGE = 0x00000200 2628 PFD_SWAP_COPY = 0x00000400 2629 PFD_SWAP_LAYER_BUFFERS = 0x00000800 2630 PFD_GENERIC_ACCELERATED = 0x00001000 2631 PFD_SUPPORT_DIRECTDRAW = 0x00002000 2632 PFD_DIRECT3D_ACCELERATED = 0x00004000 2633 PFD_SUPPORT_COMPOSITION = 0x00008000 2634 2635 PFD_DEPTH_DONTCARE = 0x20000000 2636 PFD_DOUBLEBUFFER_DONTCARE = 0x40000000 2637 PFD_STEREO_DONTCARE = 0x80000000 2638) 2639 2640const ( 2641 INPUT_MOUSE = 0 2642 INPUT_KEYBOARD = 1 2643 INPUT_HARDWARE = 2 2644) 2645 2646const ( 2647 MOUSEEVENTF_ABSOLUTE = 0x8000 2648 MOUSEEVENTF_HWHEEL = 0x01000 2649 MOUSEEVENTF_MOVE = 0x0001 2650 MOUSEEVENTF_MOVE_NOCOALESCE = 0x2000 2651 MOUSEEVENTF_LEFTDOWN = 0x0002 2652 MOUSEEVENTF_LEFTUP = 0x0004 2653 MOUSEEVENTF_RIGHTDOWN = 0x0008 2654 MOUSEEVENTF_RIGHTUP = 0x0010 2655 MOUSEEVENTF_MIDDLEDOWN = 0x0020 2656 MOUSEEVENTF_MIDDLEUP = 0x0040 2657 MOUSEEVENTF_VIRTUALDESK = 0x4000 2658 MOUSEEVENTF_WHEEL = 0x0800 2659 MOUSEEVENTF_XDOWN = 0x0080 2660 MOUSEEVENTF_XUP = 0x0100 2661) 2662