constants.go 71 KB

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