user32.bmx 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  1. Strict
  2. Const MAX_PATH=260
  3. Const DLGWINDOWEXTRA=30
  4. ' popupmenus
  5. Const TPM_LEFTBUTTON=0
  6. Const TPM_RIGHTBUTTON=2
  7. Const TPM_LEFTALIGN=0
  8. Const TPM_CENTERALIGN=4
  9. Const TPM_RIGHTALIGN=8
  10. Const TPM_TOPALIGN=0
  11. Const TPM_VCENTERALIGN=16
  12. Const TPM_BOTTOMALIGN=32
  13. Const TPM_HORIZONTAL=0
  14. Const TPM_VERTICAL=$40
  15. Const TPM_NONOTIFY=$80
  16. Const TPM_RETURNCMD=$100
  17. Const TPM_RECURSE=1
  18. Const TPM_HORPOSANIMATION=$400
  19. Const TPM_HORNEGANIMATION=$800
  20. Const TPM_VERPOSANIMATION=$1000
  21. Const TPM_VERNEGANIMATION=$2000
  22. Const TPM_NOANIMATION=$4000
  23. Const TPM_LAYOUTRTL=$8000
  24. ' clipboard formats
  25. Const CF_TEXT=1
  26. Const CF_BITMAP=2
  27. Const CF_METAFILEPICT=3
  28. Const CF_SYLK=4
  29. Const CF_DIF=5
  30. Const CF_TIFF=6
  31. Const CF_OEMTEXT=7
  32. Const CF_DIB=8
  33. Const CF_PALETTE=9
  34. Const CF_PENDATA=10
  35. Const CF_RIFF=11
  36. Const CF_WAVE=12
  37. Const CF_UNICODETEXT=13
  38. Const CF_ENHMETAFILE=14
  39. Const CF_HDROP=15
  40. Const CF_LOCALE=16
  41. Const CF_DIBV5=17
  42. Const CF_OWNERDISPLAY=$0080
  43. Const CF_DSPTEXT=$0081
  44. Const CF_DSPBITMAP=$0082
  45. Const CF_DSPMETAFILEPICT=$0083
  46. Const CF_DSPENHMETAFILE=$008E
  47. ' "Private" formats don't get GlobalFree()'d
  48. Const CF_PRIVATEFIRST=$0200
  49. Const CF_PRIVATELAST=$02FF
  50. ' "GDIOBJ" formats do get DeleteObject()'d
  51. Const CF_GDIOBJFIRST=$0300
  52. Const CF_GDIOBJLAST=$03FF
  53. ' virtualkey modifiers
  54. Const VK_SHIFT=$10
  55. Const VK_CONTROL=$11
  56. Const VK_MENU=$12
  57. Const VK_LWIN=$5b
  58. Const VK_RWIN=$5c
  59. ' windows hooks
  60. Const WH_MSGFILTER=-1
  61. Const WH_JOURNALRECORD=0
  62. Const WH_JOURNALPLAYBACK=1
  63. Const WH_KEYBOARD=2
  64. Const WH_GETMESSAGE=3
  65. Const WH_CALLWNDPROC=4
  66. Const WH_CBT=5
  67. Const WH_SYSMSGFILTER=6
  68. Const WH_MOUSE=7
  69. Const WH_HARDWARE=8
  70. Const WH_DEBUG=9
  71. Const WH_SHELL=10
  72. Const WH_FOREGROUNDIDLE=11
  73. Const WH_CALLWNDPROCRET=12
  74. Const WH_KEYBOARD_LL=13
  75. Const WH_MOUSE_LL=14
  76. ' wndclass styles
  77. Const CS_BYTEALIGNCLIENT=4096
  78. Const CS_BYTEALIGNWINDOW=8192
  79. Const CS_KEYCVTWINDOW=4
  80. Const CS_NOKEYCVT=256
  81. Const CS_CLASSDC=64
  82. Const CS_DBLCLKS=8
  83. Const CS_GLOBALCLASS=16384
  84. Const CS_HREDRAW=2
  85. Const CS_NOCLOSE=512
  86. Const CS_OWNDC=32
  87. Const CS_PARENTDC=128
  88. Const CS_SAVEBITS=2048
  89. Const CS_VREDRAW=1
  90. Const CW_USEDEFAULT=$80000000
  91. Const COLOR_SCROLLBAR=0
  92. Const COLOR_BACKGROUND=1
  93. Const COLOR_ACTIVECAPTION=2
  94. Const COLOR_INACTIVECAPTION=3
  95. Const COLOR_MENU=4
  96. Const COLOR_WINDOW=5
  97. Const COLOR_WINDOWFRAME=6
  98. Const COLOR_MENUTEXT=7
  99. Const COLOR_WINDOWTEXT=8
  100. Const COLOR_CAPTIONTEXT=9
  101. Const COLOR_ACTIVEBORDER=10
  102. Const COLOR_INACTIVEBORDER=11
  103. Const COLOR_APPWORKSPACE=12
  104. Const COLOR_HIGHLIGHT=13
  105. Const COLOR_HIGHLIGHTTEXT=14
  106. Const COLOR_BTNFACE=15
  107. Const COLOR_BTNSHADOW=16
  108. Const COLOR_GRAYTEXT=17
  109. Const COLOR_BTNTEXT=18
  110. Const COLOR_INACTIVECAPTIONTEXT=19
  111. Const COLOR_BTNHIGHLIGHT=20
  112. Const COLOR_3DDKSHADOW=21
  113. Const COLOR_3DLIGHT=22
  114. Const COLOR_INFOTEXT=23
  115. Const COLOR_INFOBK=24
  116. Const COLOR_HOTLIGHT=26
  117. Const COLOR_GRADIENTACTIVECAPTION=27
  118. Const COLOR_GRADIENTINACTIVECAPTION=28
  119. Const COLOR_MENUHILIGHT=29
  120. Const COLOR_MENUBAR=30
  121. ' window styles
  122. Const WS_BORDER=$800000
  123. Const WS_CAPTION=$c00000
  124. Const WS_CHILD=$40000000
  125. Const WS_CHILDWINDOW=$40000000
  126. Const WS_CLIPCHILDREN=$2000000
  127. Const WS_CLIPSIBLINGS=$4000000
  128. Const WS_DISABLED=$8000000
  129. Const WS_DLGFRAME=$400000
  130. Const WS_GROUP=$20000
  131. Const WS_HSCROLL=$100000
  132. Const WS_ICONIC=$20000000
  133. Const WS_MAXIMIZE=$1000000
  134. Const WS_MAXIMIZEBOX=$10000
  135. Const WS_MINIMIZE=$20000000
  136. Const WS_MINIMIZEBOX=$20000
  137. Const WS_OVERLAPPED=0
  138. Const WS_OVERLAPPEDWINDOW=$cf0000
  139. Const WS_POPUP=$80000000
  140. Const WS_POPUPWINDOW=$80880000
  141. Const WS_SIZEBOX=$40000
  142. Const WS_SYSMENU=$80000
  143. Const WS_TABSTOP=$10000
  144. Const WS_THICKFRAME=$40000
  145. Const WS_TILED=0
  146. Const WS_TILEDWINDOW=$cf0000
  147. Const WS_VISIBLE=$10000000
  148. Const WS_VSCROLL=$200000
  149. ' windows extended styles
  150. Const WS_EX_DLGMODALFRAME=$1
  151. Const WS_EX_NOPARENTNOTIFY=$4
  152. Const WS_EX_TOPMOST=$8
  153. Const WS_EX_ACCEPTFILES=$10
  154. Const WS_EX_TRANSPARENT=$20
  155. Const WS_EX_MDICHILD=$40
  156. Const WS_EX_TOOLWINDOW=$80
  157. Const WS_EX_WINDOWEDGE=$100
  158. Const WS_EX_CLIENTEDGE=$200
  159. Const WS_EX_CONTEXTHELP=$400
  160. Const WS_EX_RIGHT=$1000
  161. Const WS_EX_LEFT=0
  162. Const WS_EX_RTLREADING=$2000
  163. Const WS_EX_LTRREADING=0
  164. Const WS_EX_LEFTSCROLLBAR=$4000
  165. Const WS_EX_RIGHTSCROLLBAR=0
  166. Const WS_EX_CONTROLPARENT=$10000
  167. Const WS_EX_STATICEDGE=$20000
  168. Const WS_EX_APPWINDOW=$40000
  169. Const WS_EX_OVERLAPPEDWINDOW=(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
  170. Const WS_EX_PALETTEWINDOW=(WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
  171. Const WS_EX_LAYERED=$80000
  172. Const WS_EX_NOINHERITLAYOUT=$100000
  173. Const WS_EX_LAYOUTRTL=$400000
  174. Const WS_EX_COMPOSITED=$2000000
  175. Const WS_EX_NOACTIVATE=$8000000
  176. ' windows messages
  177. Const WM_APP=32768
  178. Const WM_ACTIVATE=6
  179. Const WM_ACTIVATEAPP=28
  180. Const WM_AFXFIRST=864
  181. Const WM_AFXLAST=895
  182. Const WM_ASKCBFORMATNAME=780
  183. Const WM_CANCELJOURNAL=75
  184. Const WM_CANCELMODE=31
  185. Const WM_CAPTURECHANGED=533
  186. Const WM_CHANGECBCHAIN=781
  187. Const WM_CHAR=258
  188. Const WM_CHARTOITEM=47
  189. Const WM_CHILDACTIVATE=34
  190. Const WM_CLEAR=771
  191. Const WM_CLOSE=16
  192. Const WM_COMMAND=273
  193. Const WM_COMMNOTIFY=68
  194. Const WM_COMPACTING=65
  195. Const WM_COMPAREITEM=57
  196. Const WM_CONTEXTMENU=123
  197. Const WM_COPY=769
  198. Const WM_COPYDATA=74
  199. Const WM_CREATE=1
  200. Const WM_CTLCOLORBTN=309
  201. Const WM_CTLCOLORDLG=310
  202. Const WM_CTLCOLOREDIT=307
  203. Const WM_CTLCOLORLISTBOX=308
  204. Const WM_CTLCOLORMSGBOX=306
  205. Const WM_CTLCOLORSCROLLBAR=311
  206. Const WM_CTLCOLORSTATIC=312
  207. Const WM_CUT=768
  208. Const WM_DEADCHAR=259
  209. Const WM_DELETEITEM=45
  210. Const WM_DESTROY=2
  211. Const WM_DESTROYCLIPBOARD=775
  212. Const WM_DEVICECHANGE=537
  213. Const WM_DEVMODECHANGE=27
  214. Const WM_DISPLAYCHANGE=126
  215. Const WM_DRAWCLIPBOARD=776
  216. Const WM_DRAWITEM=43
  217. Const WM_DROPFILES=563
  218. Const WM_ENABLE=10
  219. Const WM_ENDSESSION=22
  220. Const WM_ENTERIDLE=289
  221. Const WM_ENTERMENULOOP=529
  222. Const WM_ENTERSIZEMOVE=561
  223. Const WM_ERASEBKGND=20
  224. Const WM_EXITMENULOOP=530
  225. Const WM_EXITSIZEMOVE=562
  226. Const WM_FONTCHANGE=29
  227. Const WM_GETDLGCODE=135
  228. Const WM_GETFONT=49
  229. Const WM_GETHOTKEY=51
  230. Const WM_GETICON=127
  231. Const WM_GETMINMAXINFO=36
  232. Const WM_GETTEXT=13
  233. Const WM_GETTEXTLENGTH=14
  234. Const WM_HANDHELDFIRST=856
  235. Const WM_HANDHELDLAST=863
  236. Const WM_HELP=83
  237. Const WM_HOTKEY=786
  238. Const WM_HSCROLL=276
  239. Const WM_HSCROLLCLIPBOARD=782
  240. Const WM_ICONERASEBKGND=39
  241. Const WM_INITDIALOG=272
  242. Const WM_INITMENU=278
  243. Const WM_INITMENUPOPUP=279
  244. Const WM_INPUTLANGCHANGE=81
  245. Const WM_INPUTLANGCHANGEREQUEST=80
  246. Const WM_KEYDOWN=256
  247. Const WM_KEYUP=257
  248. Const WM_KILLFOCUS=8
  249. Const WM_MDIACTIVATE=546
  250. Const WM_MDICASCADE=551
  251. Const WM_MDICREATE=544
  252. Const WM_MDIDESTROY=545
  253. Const WM_MDIGETACTIVE=553
  254. Const WM_MDIICONARRANGE=552
  255. Const WM_MDIMAXIMIZE=549
  256. Const WM_MDINEXT=548
  257. Const WM_MDIREFRESHMENU=564
  258. Const WM_MDIRESTORE=547
  259. Const WM_MDISETMENU=560
  260. Const WM_MDITILE=550
  261. Const WM_MEASUREITEM=44
  262. Const WM_MENURBUTTONUP=290
  263. Const WM_MENUCHAR=288
  264. Const WM_MENUSELECT=287
  265. Const WM_NEXTMENU=531
  266. Const WM_MOVE=3
  267. Const WM_MOVING=534
  268. Const WM_NCACTIVATE=134
  269. Const WM_NCCALCSIZE=131
  270. Const WM_NCCREATE=129
  271. Const WM_NCDESTROY=130
  272. Const WM_NCHITTEST=132
  273. Const WM_NCLBUTTONDBLCLK=163
  274. Const WM_NCLBUTTONDOWN=161
  275. Const WM_NCLBUTTONUP=162
  276. Const WM_NCMBUTTONDBLCLK=169
  277. Const WM_NCMBUTTONDOWN=167
  278. Const WM_NCMBUTTONUP=168
  279. Const WM_NCMOUSEMOVE=160
  280. Const WM_NCPAINT=133
  281. Const WM_NCRBUTTONDBLCLK=166
  282. Const WM_NCRBUTTONDOWN=164
  283. Const WM_NCRBUTTONUP=165
  284. Const WM_NEXTDLGCTL=40
  285. Const WM_NOTIFY=78
  286. Const WM_NOTIFYFORMAT=85
  287. Const WM_NULL=0
  288. Const WM_PAINT=15
  289. Const WM_PAINTCLIPBOARD=777
  290. Const WM_PAINTICON=38
  291. Const WM_PALETTECHANGED=785
  292. Const WM_PALETTEISCHANGING=784
  293. Const WM_PARENTNOTIFY=528
  294. Const WM_PASTE=770
  295. Const WM_PENWINFIRST=896
  296. Const WM_PENWINLAST=911
  297. Const WM_POWER=72
  298. Const WM_POWERBROADCAST=536
  299. Const WM_PRINT=791
  300. Const WM_PRINTCLIENT=792
  301. Const WM_QUERYDRAGICON=55
  302. Const WM_QUERYENDSESSION=17
  303. Const WM_QUERYNEWPALETTE=783
  304. Const WM_QUERYOPEN=19
  305. Const WM_QUEUESYNC=35
  306. Const WM_QUIT=18
  307. Const WM_RENDERALLFORMATS=774
  308. Const WM_RENDERFORMAT=773
  309. Const WM_SETCURSOR=32
  310. Const WM_SETFOCUS=7
  311. Const WM_SETFONT=48
  312. Const WM_SETHOTKEY=50
  313. Const WM_SETICON=128
  314. Const WM_SETREDRAW=11
  315. Const WM_SETTEXT=12
  316. Const WM_SETTINGCHANGE=26
  317. Const WM_SHOWWINDOW=24
  318. Const WM_SIZE=5
  319. Const WM_SIZECLIPBOARD=779
  320. Const WM_SIZING=532
  321. Const WM_SPOOLERSTATUS=42
  322. Const WM_STYLECHANGED=125
  323. Const WM_STYLECHANGING=124
  324. Const WM_SYSCHAR=262
  325. Const WM_SYSCOLORCHANGE=21
  326. Const WM_SYSCOMMAND=274
  327. Const WM_SYSDEADCHAR=263
  328. Const WM_SYSKEYDOWN=260
  329. Const WM_SYSKEYUP=261
  330. Const WM_TCARD=82
  331. Const WM_TIMECHANGE=30
  332. Const WM_TIMER=275
  333. Const WM_UNDO=772
  334. Const WM_USER=1024
  335. Const WM_USERCHANGED=84
  336. Const WM_VKEYTOITEM=46
  337. Const WM_VSCROLL=277
  338. Const WM_VSCROLLCLIPBOARD=778
  339. Const WM_WINDOWPOSCHANGED=71
  340. Const WM_WINDOWPOSCHANGING=70
  341. Const WM_WININICHANGE=26
  342. Const WM_KEYFIRST=256
  343. Const WM_KEYLAST=264
  344. Const WM_SYNCPAINT=136
  345. Const WM_MOUSEACTIVATE=33
  346. Const WM_MOUSEMOVE=512
  347. Const WM_LBUTTONDOWN=513
  348. Const WM_LBUTTONUP=514
  349. Const WM_LBUTTONDBLCLK=515
  350. Const WM_RBUTTONDOWN=516
  351. Const WM_RBUTTONUP=517
  352. Const WM_RBUTTONDBLCLK=518
  353. Const WM_MBUTTONDOWN=519
  354. Const WM_MBUTTONUP=520
  355. Const WM_MBUTTONDBLCLK=521
  356. Const WM_MOUSEWHEEL=522
  357. Const WM_MOUSEFIRST=512
  358. Const WM_MOUSELAST=522
  359. Const WM_MOUSEHOVER=$2A1
  360. Const WM_MOUSELEAVE=$2A3
  361. ' setwindowpos flags
  362. Const SWP_NOSIZE=1
  363. Const SWP_NOMOVE=2
  364. Const SWP_NOZORDER=4
  365. Const SWP_NOREDRAW=8
  366. Const SWP_NOACTIVATE=$10
  367. Const SWP_FRAMECHANGED=$20
  368. Const SWP_SHOWWINDOW=$40
  369. Const SWP_HIDEWINDOW=$80
  370. Const SWP_NOCOPYBITS=$100
  371. Const SWP_NOOWNERZORDER=$200
  372. Const SWP_NOSENDCHANGING=$400
  373. Const SWP_DRAWFRAME=SWP_FRAMECHANGED
  374. Const SWP_NOREPOSITION=SWP_NOOWNERZORDER
  375. Const SWP_DEFERERASE=$2000
  376. Const SWP_ASYNCWINDOWPOS=$4000
  377. Const HWND_TOP=0
  378. Const HWND_BOTTOM=1
  379. Const HWND_TOPMOST=-1
  380. Const HWND_NOTOPMOST=-2
  381. Const HWND_BROADCAST=$ffff
  382. Const HWND_DESKTOP=0
  383. Const HWND_MESSAGE=-3
  384. ' scroll info
  385. Const SB_HORZ=0
  386. Const SB_VERT=1
  387. Const SB_CTL=2
  388. Const SB_BOTH=3
  389. Const SB_LINEUP=0
  390. Const SB_LINELEFT=0
  391. Const SB_LINEDOWN=1
  392. Const SB_LINERIGHT=1
  393. Const SB_PAGEUP=2
  394. Const SB_PAGELEFT=2
  395. Const SB_PAGEDOWN=3
  396. Const SB_PAGERIGHT=3
  397. Const SB_THUMBPOSITION=4
  398. Const SB_THUMBTRACK=5
  399. Const SB_TOP=6
  400. Const SB_LEFT=6
  401. Const SB_BOTTOM=7
  402. Const SB_RIGHT=7
  403. Const SB_ENDSCROLL=8
  404. Const SIF_RANGE=$0001
  405. Const SIF_PAGE=$0002
  406. Const SIF_POS=$0004
  407. Const SIF_DISABLENOSCROLL=$0008
  408. Const SIF_TRACKPOS=$0010
  409. Const SIF_ALL=(SIF_RANGE|SIF_PAGE|SIF_POS|SIF_TRACKPOS)
  410. Type SCROLLINFO
  411. Field cbSize
  412. Field fMask
  413. Field nMin
  414. Field nMax
  415. Field nPage
  416. Field nPos
  417. Field nTrackPos
  418. End Type
  419. ' loadcursor consts
  420. Const IDC_ARROW=32512
  421. Const IDC_IBEAM=32513
  422. Const IDC_WAIT=32514
  423. Const IDC_CROSS=32515
  424. Const IDC_UPARROW=32516
  425. Const IDC_SIZENWSE=32642
  426. Const IDC_SIZENESW=32643
  427. Const IDC_SIZEWE=32644
  428. Const IDC_SIZENS=32645
  429. Const IDC_SIZEALL=32646
  430. Const IDC_NO=32648
  431. Const IDC_HAND=32649
  432. Const IDC_APPSTARTING=32650
  433. Const IDC_HELP=32651
  434. Const IDC_ICON=32641
  435. Const IDC_SIZE=32640
  436. ' changedisplaysettings flags
  437. Const CDS_UPDATEREGISTRY=1
  438. Const CDS_TEST=2
  439. Const CDS_FULLSCREEN=4
  440. Const CDS_GLOBAL=8
  441. Const CDS_SET_PRIMARY=16
  442. Const CDS_RESET=$40000000
  443. Const CDS_SETRECT=$20000000
  444. Const CDS_NORESET=$10000000
  445. ' changedisplaysettings results
  446. Const DISP_CHANGE_SUCCESSFUL=0
  447. Const DISP_CHANGE_RESTART=1
  448. Const DISP_CHANGE_BADFLAGS=-4
  449. Const DISP_CHANGE_BADPARAM=-5
  450. Const DISP_CHANGE_FAILED=-1
  451. Const DISP_CHANGE_BADMODE=-2
  452. Const DISP_CHANGE_NOTUPDATED=-3
  453. ' PeekMessage param wRemoveMsg
  454. Const PM_NOREMOVE=0
  455. Const PM_REMOVE=1
  456. Const PM_NOYIELD=2
  457. ' MsgWaitForMultipleObjects param dwWakeMask
  458. Const QS_ALLEVENTS=191
  459. Const QS_ALLINPUT=255
  460. Const QS_ALLPOSTMESSAGE=256
  461. Const QS_HOTKEY=128
  462. Const QS_INPUT=7
  463. Const QS_KEY=1
  464. Const QS_MOUSE=6
  465. Const QS_MOUSEBUTTON=4
  466. Const QS_MOUSEMOVE=2
  467. Const QS_PAINT=32
  468. Const QS_POSTMESSAGE=8
  469. Const QS_SENDMESSAGE=64
  470. Const QS_TIMER=16
  471. ' ShowWindow commands
  472. Const SW_HIDE=0
  473. Const SW_NORMAL=1
  474. Const SW_SHOWNORMAL=1
  475. Const SW_SHOWMINIMIZED=2
  476. Const SW_MAXIMIZE=3
  477. Const SW_SHOWMAXIMIZED=3
  478. Const SW_SHOWNOACTIVATE=4
  479. Const SW_SHOW=5
  480. Const SW_MINIMIZE=6
  481. Const SW_SHOWMINNOACTIVE=7
  482. Const SW_SHOWNA=8
  483. Const SW_RESTORE=9
  484. Const SW_SHOWDEFAULT=10
  485. Const SW_FORCEMINIMIZE=11
  486. Const SW_MAX=11
  487. ' menu flags
  488. Const MF_INSERT=0
  489. Const MF_CHANGE=$80
  490. Const MF_APPEND=$100
  491. Const MF_DELETE=$200
  492. Const MF_REMOVE=$1000
  493. Const MF_BYCOMMAND=0
  494. Const MF_BYPOSITION=$400
  495. Const MF_SEPARATOR=$800
  496. Const MF_ENABLED=0
  497. Const MF_GRAYED=1
  498. Const MF_DISABLED=2
  499. Const MF_UNCHECKED=0
  500. Const MF_CHECKED=8
  501. Const MF_USECHECKBITMAPS=$200
  502. Const MF_STRING=0
  503. Const MF_BITMAP=4
  504. Const MF_OWNERDRAW=$100
  505. Const MF_POPUP=$10
  506. Const MF_MENUBARBREAK=$20
  507. Const MF_MENUBREAK=$40
  508. Const MF_UNHILITE=0
  509. Const MF_HILITE=$80
  510. Const MF_DEFAULT=$1000
  511. Const MF_SYSMENU=$2000
  512. Const MF_HELP=$4000
  513. Const MF_RIGHTJUSTIFY=$4000
  514. Const MF_MOUSESELECT=$8000
  515. Const MF_END=$80
  516. Const MFT_STRING=MF_STRING
  517. Const MFT_BITMAP=MF_BITMAP
  518. Const MFT_MENUBARBREAK=MF_MENUBARBREAK
  519. Const MFT_MENUBREAK=MF_MENUBREAK
  520. Const MFT_OWNERDRAW=MF_OWNERDRAW
  521. Const MFT_RADIOCHECK=$200
  522. Const MFT_SEPARATOR=MF_SEPARATOR
  523. Const MFT_RIGHTORDER=$2000
  524. Const MFT_RIGHTJUSTIFY=MF_RIGHTJUSTIFY
  525. Const MFS_GRAYED=3
  526. Const MFS_DISABLED=MFS_GRAYED
  527. Const MFS_CHECKED=MF_CHECKED
  528. Const MFS_HILITE=MF_HILITE
  529. Const MFS_ENABLED=MF_ENABLED
  530. Const MFS_UNCHECKED=MF_UNCHECKED
  531. Const MFS_UNHILITE=MF_UNHILITE
  532. Const MFS_DEFAULT=MF_DEFAULT
  533. ' menu item info
  534. Const MIIM_STATE=1
  535. Const MIIM_ID=2
  536. Const MIIM_SUBMENU=4
  537. Const MIIM_CHECKMARKS=8
  538. Const MIIM_TYPE=$10
  539. Const MIIM_DATA=$20
  540. Const MIIM_STRING=$40
  541. Const MIIM_BITMAP=$80
  542. Const MIIM_FTYPE=$100
  543. Type MENUITEMINFOW
  544. Field cbSize,fMask,fType,fState,wID
  545. Field hSubMenu,hbmpChecked,hbmpUnchecked
  546. Field dwItemData:Int Ptr
  547. Field dwTypeData:Short Ptr
  548. Field cch
  549. Field hbmpItem
  550. End Type
  551. Const GWL_WNDPROC=-4
  552. Const GWL_HINSTANCE=-6
  553. Const GWL_HWNDPARENT=-8
  554. Const GWL_STYLE=-16
  555. Const GWL_EXSTYLE=-20
  556. Const GWL_USERDATA=-21
  557. Const GWL_ID=-12
  558. Const GCL_MENUNAME=-8
  559. Const GCL_HBRBACKGROUND=-10
  560. Const GCL_HCURSOR=-12
  561. Const GCL_HICON=-14
  562. Const GCL_HMODULE=-16
  563. Const GCL_CBWNDEXTRA=-18
  564. Const GCL_CBCLSEXTRA=-20
  565. Const GCL_WNDPROC=-24
  566. Const GCL_STYLE=-26
  567. Const GCW_ATOM=-32
  568. Const GCL_HICONSM=-34
  569. Const WA_INACTIVE=0
  570. Const WA_ACTIVE=1
  571. Const WA_CLICKACTIVE=2
  572. Type MSG
  573. Field hwnd
  574. Field message
  575. Field wParam
  576. Field lParam
  577. Field time
  578. Field pt_x,pt_y
  579. End Type
  580. Type WNDCLASS
  581. Field style
  582. Field lpfnWndProc:Byte Ptr
  583. Field cbClsExtra
  584. Field cbWndExtra
  585. Field hInstance
  586. Field hIcon
  587. Field hCursor
  588. Field hbrBackground
  589. Field lpszMenuName:Byte Ptr
  590. Field lpszClassName:Byte Ptr
  591. End Type
  592. Type WNDCLASSW
  593. Field style
  594. Field lpfnWndProc:Byte Ptr
  595. Field cbClsExtra
  596. Field cbWndExtra
  597. Field hInstance
  598. Field hIcon
  599. Field hCursor
  600. Field hbrBackground
  601. Field lpszMenuName:Short Ptr
  602. Field lpszClassName:Short Ptr
  603. End Type
  604. Type MINMAXINFO
  605. Field reserved0,reserved1
  606. Field maxw,maxh
  607. Field maxx,maxy
  608. Field minw,minh
  609. Field minx,miny
  610. End Type
  611. Type WINDOWINFO
  612. Field cbSize
  613. Field rcWindowl,rcWindowt,rcWindowr,rcWindowb
  614. Field rcClientl,rcClientt,rcClientr,rcClientb
  615. Field dwStyle
  616. Field dwExStyle
  617. Field dwWindowStatus
  618. Field cxWindowBorders
  619. Field cyWindowBorders
  620. Field atomWindowType
  621. Field wCreatorVersion:Short
  622. End Type
  623. Type PAINTSTRUCT
  624. Field hdc
  625. Field fErase
  626. Field rcPaint_left
  627. Field rcPaint_top
  628. Field rcPaint_right
  629. Field rcPaint_bottom
  630. Field fRestore
  631. Field fIncUpdate
  632. Field res0,res1,res2,res3
  633. Field res4,res5,res6,res7
  634. End Type
  635. Const RECT_LEFT=0
  636. Const RECT_TOP=1
  637. Const RECT_RIGHT=2
  638. Const RECT_BOTTOM=3
  639. Const POINT_X=0
  640. Const POINT_Y=1
  641. Extern "Win32"
  642. Function SetCapture( hwnd )
  643. Function ReleaseCapture()
  644. Function RegisterClassA( lpWndClass:Byte Ptr )
  645. Function RegisterClassW( lpWndClass:Byte Ptr )
  646. Function CreateWindowExA( dwExStyle,lpClassName:Byte Ptr,lpWindowName:Byte Ptr,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam:Byte Ptr )
  647. Function CreateWindowExW( dwExStyle,lpClassName$w,lpWindowName$w,dwStyle,x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam:Byte Ptr )
  648. Function DefWindowProcA( hWnd,MSG,wParam,lParam )
  649. Function DefWindowProcW( hWnd,MSG,wParam,lParam )
  650. Function DispatchMessageA( lpMsg:Byte Ptr )
  651. Function DispatchMessageW( lpMsg:Byte Ptr )
  652. Function GetMessageA( lpMsg:Byte Ptr,hWnd,wMsgFilterMin,wMsgFilterMax )
  653. Function GetMessageW( lpMsg:Byte Ptr,hWnd,wMsgFilterMin,wMsgFilterMax )
  654. Function PeekMessageA( lpMsg:Byte Ptr,hWnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg )
  655. Function PeekMessageW( lpMsg:Byte Ptr,hWnd,wMsgFilterMin,wMsgFilterMax,wRemoveMsg )
  656. Function PostMessageA( hWnd,MSG,wParam,lParam )
  657. Function PostMessageW( hWnd,MSG,wParam,lParam )
  658. Function SendMessageA( hWnd,MSG,wParam,lParam )
  659. Function SendMessageW( hWnd,MSG,wParam,lParam )
  660. Function PostThreadMessageA( idThread,Msg,wParam,lParam )
  661. Function PostThreadMessageW( idThread,Msg,wParam,lParam )
  662. Function GetDC( hWnd )
  663. Function PostQuitMessage( nExitCode )
  664. Function TranslateMessage( lpMsg:Byte Ptr )
  665. Function DestroyWindow( hWnd )
  666. Function MsgWaitForMultipleObjects( nCount,pHandles:Byte Ptr,fWaitAll,dwMilliseconds,dwWakeMask )
  667. Function MsgWaitForMultipleObjectsEx( nCount,pHandles:Byte Ptr,dwMilliseconds,dwWakeMask,dwFlags )
  668. Function ChangeDisplaySettingsA( lpDevMode:Byte Ptr,dwFlags )
  669. Function ChangeDisplaySettingsW( lpDevMode:Byte Ptr,dwFlags )
  670. Function LoadCursorA( hInstance,lpCursorName:Byte Ptr )
  671. Function LoadCursorW( hInstance,lpCursorName:Short Ptr )
  672. Function ShowCursor( visible )
  673. Function SetCursor( hCursor )
  674. Function LoadIconA( resourceid,lpIconName:Byte Ptr )
  675. Function LoadIconW( resourceid,lpIconName:Short Ptr )
  676. Function LoadLibraryA( dll$z )
  677. Function GetProcAddress:Byte Ptr( libhandle,func$z )
  678. Function LoadLibraryW( dll$w )
  679. Function GetClientRect( hWnd,lpRect:Int Ptr )
  680. Function GetWindowRect( hWnd,lpRect:Int Ptr )
  681. Function GetDesktopWindow()
  682. Function AdjustWindowRect( rect:Int Ptr,style,menu )
  683. Function AdjustWindowRectEx( rect:Int Ptr,style,menu,exstyle )
  684. Function ClientToScreen( hwnd,point:Byte Ptr )
  685. Function ShowWindow( hwnd,nCmdShow )
  686. Function SetMenu( hwnd,hmenu )
  687. Function DrawMenuBar( hwnd )
  688. Function CreateMenu_()="CreateMenu@0"
  689. Function CreatePopupMenu()
  690. Function TrackPopupMenu(hMenu,uFLags,x,y,nReserved,hWnd,prcRect)
  691. Function DestroyMenu(hMenu)
  692. Function EnableMenuItem(hMenu,uIDEnableItem,uEnable)
  693. Function CheckMenuItem(hMenu,uIDCheckItem,uCheck)
  694. Function AppendMenuA(hMenu,uFlags,uIDNewItem,lpNewItem:Byte Ptr)
  695. Function AppendMenuW(hMenu,uFlags,uIDNewItem,lpNewItem:Byte Ptr)
  696. Function SetMenuItemInfoA( hMenu,item,fByPosition,info:Byte Ptr )
  697. Function SetMenuItemInfoW( hMenu,item,fByPosition,info:Byte Ptr )
  698. Function GetMenuItemCount( hMenu )
  699. Function SetWindowTextA( hwnd,text$z )
  700. Function SetWindowTextW( hwnd,text$w )
  701. Function SetWindowPos( hwnd,hwndInsertAfter,x,y,cx,cy,uFlags )
  702. Function GetForegroundWindow()
  703. Function SetForegroundWindow(hwnd)
  704. Function IsIconic(hwnd)
  705. Function GetParent_(hwnd)="GetParent@4"
  706. Function GetWindowLongA( hwnd,index )
  707. Function SetWindowLongA( hwnd,index,newlong )
  708. Function GetWindowLongW( hwnd,index )
  709. Function SetWindowLongW( hwnd,index,newlong )
  710. Function GetClassLongA( hwnd,index )
  711. Function SetClassLongA( hwnd,index,newlong )
  712. Function GetClassLongW( hwnd,index )
  713. Function SetClassLongW( hwnd,index,newlong )
  714. Function IsZoomed( hwnd )
  715. Function CallWindowProcA( proc:Byte Ptr,hwnd,msg,wp,lp )
  716. Function CallWindowProcW( proc:Byte Ptr,hwnd,msg,wp,lp )
  717. Function OleInitialize(pvReserved:Byte Ptr)
  718. Function OleUninitialize()
  719. Function InitCommonControlsEx(controlsex:Byte Ptr)
  720. Function SetScrollPos( hwnd,nBar,nPos,bRedraw )
  721. Function GetScrollPos( hwnd,nBar )
  722. Function SetScrollRange( hwnd,nBar,nMinPos,nMaxPos,bRedraw )
  723. Function GetScrollRange( hwnd,nBar,lpMinPos:Int Ptr,lpMaxPos:Int Ptr )
  724. Function ShowScrollBar( hwnd,wBar,bShow )
  725. Function EnableScrollBar( hwnd,wSBflags,wArrows )
  726. Function SetScrollInfo( hwnd,nBar,lpsi:SCROLLINFO,redraw )
  727. Function GetScrollInfo( hwnd,nBar,lpsi:SCROLLINFO )
  728. Function InvalidateRect( hWnd,lpRect:Int Ptr,bErase )
  729. Function ValidateRect( hWnd,lpRect:Int Ptr )
  730. Function BeginPaint( hWnd,lpPaint:Byte Ptr )
  731. Function FillRect( hdc,lpRect:Int Ptr,hbr )
  732. Function EndPaint( hWnd,lpPaint:Byte Ptr )
  733. Function SetFocus( hWnd )
  734. Function GetFocus()
  735. Function GetActiveWindow()
  736. Function SetActiveWindow( hWnd )
  737. Function MoveWindow( hWnd,x,y,w,h,bRepaint )
  738. Function SetParent_( hWnd,hWnd2 )="SetParent@8"
  739. Function WindowFromPoint( point:Int Ptr )
  740. Function GetKeyState(vkey)
  741. Function SetWindowsHookExW(idHook,lpfn:Byte Ptr,hmod,dwThreadId)
  742. Function CallNextHookEx(hhk,ncode,wparam,lparam)
  743. Function UnhookWindowsHookEx(hhk)
  744. Function EnableWindow( hWnd,enable )
  745. Function IsWindowEnabled( hWnd )
  746. Function IsWindowVisible( hWnd )
  747. Function GetWindowInfo( hWnd,winfo:Byte Ptr )
  748. Function GetCursorPos_( lpPoint:Int Ptr)="GetCursorPos@4"
  749. Function EnumChildWindows( hWnd,lpfn:Byte Ptr,lp )
  750. Function OpenClipboard(hWnd)
  751. Function CloseClipboard()
  752. Function SetClipboardData(uFormat,hMem)
  753. Function GetClipboardData(uFormat)
  754. Function EmptyClipboard()
  755. Function IsClipboardFormatAvailable(format)
  756. Function DefDlgProcW(hDlg,Msg,wParam,lParam)
  757. 'shellapi
  758. Function DragAcceptFiles(hWnd,fAccept)
  759. Function DragQueryPoint(hDrop,lpPoint:Int Ptr)
  760. Function DragQueryFileW(hDrop,iFile,lpszFile:Short Ptr,cch)
  761. Function DragFinish(hDrop)
  762. End Extern