Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5327 lines
138 KiB

  1. TYPE {Standard C types}
  2. int = INTEGERC;
  3. short = INTEGER;
  4. long = INTEGER4;
  5. unsigned = WORD;
  6. unsignedlong = INTEGER4;
  7. LPshort = ADS OF short;
  8. CONST
  9. FALSE_ = 0;
  10. TRUE_ = 1;
  11. NULL_ = 0;
  12. TYPE
  13. DWORD = INTEGER4;
  14. BOOL = int;
  15. PSTR = ADR OF INTEGER1;
  16. NPSTR = ADR OF INTEGER1;
  17. LPSTR = ADS OF INTEGER1;
  18. LPINT = ADS OF int;
  19. LPWORD = ADS OF WORD;
  20. CONST
  21. OBM_CLOSE = 32767;
  22. OBM_SIZE = 32766;
  23. OBM_UPARROW = 32765;
  24. OBM_DNARROW = 32764;
  25. OBM_RGARROW = 32763;
  26. OBM_LfarROW = 32762;
  27. OBM_BTSIZE = 32761;
  28. OBM_CHECK = 32760;
  29. OBM_CHECKBOXES = 32759;
  30. OBM_BTNCORNERS = 32758;
  31. OBM_REDUCE = 32757;
  32. OBM_ZOOM = 32756;
  33. OBM_RESTORE = 32755;
  34. OCR_NORMAL = 32512;
  35. OCR_IBEAM = 32513;
  36. OCR_WAIT = 32514;
  37. OCR_CROSS = 32515;
  38. OCR_UP = 32516;
  39. OCR_SIZE = 32640;
  40. OCR_ICON = 32641;
  41. OCR_SIZENWSE = 32642;
  42. OCR_SIZENESW = 32643;
  43. OCR_SIZEWE = 32644;
  44. OCR_SIZENS = 32645;
  45. OCR_SIZEALL = 32646;
  46. OIC_SAMPLE = 32512;
  47. OIC_HAND = 32513;
  48. OIC_QUES = 32514;
  49. OIC_BANG = 32515;
  50. OIC_NOTE = 32516;
  51. (* Scroll bar constants *)
  52. SB_HORZ = 0;
  53. SB_VERT = 1;
  54. SB_CTL = 2;
  55. SB_BOTH = 3;
  56. (* Scroll Commands *)
  57. SB_LINEUP = 0;
  58. SB_LINEDOWN = 1;
  59. SB_PAGEUP = 2;
  60. SB_PAGEDOWN = 3;
  61. SB_THUMBPOSITION = 4;
  62. SB_THUMBTRACK = 5;
  63. SB_TOP = 6;
  64. SB_BOTTOM = 7;
  65. SB_ENDSCROLL = 8;
  66. (* ShowWindow commands *)
  67. SW_HIDE = 0;
  68. SW_SHOWNORMAL = 1;
  69. SW_RESTORE = 1;
  70. SW_NORMAL = 1;
  71. SW_SHOWMINIMIZED = 2;
  72. SW_SHOWMAXIMIZED = 3;
  73. SW_MAXIMIZE = 3;
  74. SW_SHOWNOACTIVATE = 4;
  75. SW_SHOW = 5;
  76. SW_MINIMIZE = 6;
  77. SW_SHOWMINNOACTIVE = 7;
  78. SW_SHOWNA = 8;
  79. (* Old ShowWindow commands *)
  80. HIDE_WINDOW = 0;
  81. SHOW_OPENWINDOW = 1;
  82. SHOW_ICONWINDOW = 2;
  83. SHOW_FULLSCREEN = 3;
  84. SHOW_OPENNOACTIVATE = 4;
  85. (* identifiers for the WM_SHOWWINDOW message *)
  86. SW_PARENTCLOSING = 1;
  87. SW_OTHERZOOM = 2;
  88. SW_PARENTOPENING = 3;
  89. SW_OTHERUNZOOM = 4;
  90. (* flags for regions *)
  91. ERROR = 0;
  92. NULLREGION = 1;
  93. SIMPLEREGION = 2;
  94. COMPLEXREGION = 3;
  95. (* styles for CombineRgn *)
  96. RGN_AND = 1;
  97. RGN_OR = 2;
  98. RGN_XOR = 3;
  99. RGN_DIFF = 4;
  100. RGN_COPY = 5;
  101. (* Virtual Keys, Standard Set *)
  102. VK_LBUTTON = #01;
  103. VK_RBUTTON = #02;
  104. VK_CANCEL = #03;
  105. VK_MBUTTON = #04 (* NOT contiguous with L & RBUTTON *);
  106. VK_BACK = #08;
  107. VK_TAB = #09;
  108. VK_CLEAR = #0c;
  109. VK_RETURN = #0d;
  110. VK_SHIFT = #10;
  111. VK_CONTROL = #11;
  112. VK_MENU = #12;
  113. VK_PAUSE = #13;
  114. VK_CAPITAL = #14;
  115. VK_ESCAPE = #1b;
  116. VK_SPACE = #20;
  117. VK_PRIOR = #21;
  118. VK_NEXT = #22;
  119. VK_END = #23;
  120. VK_HOME = #24;
  121. VK_LEFT = #25;
  122. VK_UP = #26;
  123. VK_RIGHT = #27;
  124. VK_DOWN = #28;
  125. (* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' *)
  126. (* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' *)
  127. VK_SELECT = #29;
  128. VK_PRINT = #2a;
  129. VK_EXECUTE = #2b;
  130. VK_INSERT = #2d;
  131. VK_DELETE = #2e;
  132. VK_HELP = #2f;
  133. VK_NUMPAD0 = #60;
  134. VK_NUMPAD1 = #61;
  135. VK_NUMPAD2 = #62;
  136. VK_NUMPAD3 = #63;
  137. VK_NUMPAD4 = #64;
  138. VK_NUMPAD5 = #65;
  139. VK_NUMPAD6 = #66;
  140. VK_NUMPAD7 = #67;
  141. VK_NUMPAD8 = #68;
  142. VK_NUMPAD9 = #69;
  143. VK_MULTIPLY = #6A;
  144. VK_ADD = #6B;
  145. VK_SEPARATOR = #6C;
  146. VK_SUBTRACT = #6D;
  147. VK_DECIMAL = #6E;
  148. VK_DIVIDE = #6F;
  149. VK_F1 = #70;
  150. VK_F2 = #71;
  151. VK_F3 = #72;
  152. VK_F4 = #73;
  153. VK_F5 = #74;
  154. VK_F6 = #75;
  155. VK_F7 = #76;
  156. VK_F8 = #77;
  157. VK_F9 = #78;
  158. VK_F10 = #79;
  159. VK_F11 = #7a;
  160. VK_F12 = #7b;
  161. VK_F13 = #7c;
  162. VK_F14 = #7d;
  163. VK_F15 = #7e;
  164. VK_F16 = #7f;
  165. VK_NUMLOCK = #90;
  166. (* SetWindowsHook codes *)
  167. WH_MSGFILTER = -1;
  168. WH_JOURNALRECORD = 0;
  169. WH_JOURNALPLAYBACK = 1;
  170. WH_KEYBOARD = 2;
  171. WH_GETMESSAGE = 3;
  172. WH_CALLWNDPROC = 4;
  173. WH_CBT = 5;
  174. WH_SYSMSGFILTER = 6;
  175. WH_WINDOWMGR = 7;
  176. (* HC_* Hook Codes *)
  177. HC_LPLPFNNEXT = -2;
  178. HC_LPFNNEXT = -1;
  179. HC_ACTION = 0;
  180. HC_GETNEXT = 1;
  181. HC_SKIP = 2;
  182. HC_NOREM = 3;
  183. (* CBT hook codes *)
  184. HCBT_MOVESIZE = 0;
  185. HCBT_MINMAX = 1;
  186. HCBT_QS = 2;
  187. (* WH_MSGFILTER filter proc codes *)
  188. MSGF_DIALOGBOX = 0;
  189. MSGF_MESSAGEBOX = 1;
  190. MSGF_MENU = 2;
  191. MSGF_MOVE = 3;
  192. MSGF_SIZE = 4;
  193. MSGF_SCROLLBAR = 5;
  194. MSGF_NEXTWINDOW = 6;
  195. (* Define window manager hook codes *)
  196. WC_INIT = 1;
  197. WC_SWP = 2;
  198. WC_DEFWINDOWPROC = 3;
  199. WC_MINMAX = 4;
  200. WC_MOVE = 5;
  201. WC_SIZE = 6;
  202. WC_DRAWCAPTION = 7;
  203. (* message structure used in journaling *)
  204. TYPE
  205. EVENTMSG = RECORD
  206. message : unsigned;
  207. paramL : WORD;
  208. paramH : WORD;
  209. time : DWORD;
  210. END;
  211. PEVENTMSGMSG = ADR OF EVENTMSG;
  212. NPEVENTMSGMSG = ADR OF EVENTMSG;
  213. LPEVENTMSGMSG = ADS OF EVENTMSG;
  214. CONST
  215. (* Binary raster ops *)
  216. R2_BLACK = 1 (* 0 *);
  217. R2_NOTMERGEPEN = 2 (* DPon *);
  218. R2_MASKNOTPEN = 3 (* DPna *);
  219. R2_NOTCOPYPEN = 4 (* PN *);
  220. R2_MASKPENNOT = 5 (* PDna *);
  221. R2_NOT = 6 (* Dn *);
  222. R2_XORPEN = 7 (* DPx *);
  223. R2_NOTMASKPEN = 8 (* DPan *);
  224. R2_MASKPEN = 9 (* DPa *);
  225. R2_NOTXORPEN = 10 (* DPxn *);
  226. R2_NOP = 11 (* D *);
  227. R2_MERGENOTPEN = 12 (* DPno *);
  228. R2_COPYPEN = 13 (* P *);
  229. R2_MERGEPENNOT = 14 (* PDno *);
  230. R2_MERGEPEN = 15 (* DPo *);
  231. R2_WHITE = 16 (* 1 *);
  232. (* Ternary raster operations *)
  233. SRCCOPY = #00CC0020 (* dest=source *);
  234. SRCPAINT = #00EE0086 (* dest=source OR dest *);
  235. SRCAND = #008800C6 (* dest = source AND dest *);
  236. SRCINVERT = #00660046 (* dest = source XOR dest *);
  237. SRCERASE = #00440328 (* dest = source AND (not dest ) *);
  238. NOTSRCCOPY = #00330008 (* dest = (not source) *);
  239. NOTSRCERASE = #001100A6 (* dest = (not source) AND (not dest) *);
  240. MERGECOPY = #00C000CA (* dest = (source AND pattern) *);
  241. MERGEPAINT = #00BB0226 (* dest = (NOT source) OR dest *);
  242. PATCOPY = #00F00021 (* dest = pattern *);
  243. PATPAINT = #00FB0A09 (* dest = DPSnoo *);
  244. PATINVERT = #005A0049 (* dest = pattern XOR dest *);
  245. DSTINVERT = #00550009 (* dest = (not dest) *);
  246. BLACKNESS = #00000042 (* dest = BLACK *);
  247. WHITENESS = #00FF0062 (* dest = WHITE *);
  248. (* StretchBlt() modes *)
  249. BLACKONWHITE = 1;
  250. WHITEONBLACK = 2;
  251. COLORONCOLOR = 3;
  252. (* PolyFill modes *)
  253. ALTERNATE = 1;
  254. WINDING = 2;
  255. (* text alignment options *)
  256. TA_UPDATECP = 1;
  257. TA_NOUPDATECP = 0;
  258. TA_LEFT = 0;
  259. TA_RIGHT = 2;
  260. TA_CENTER = 6;
  261. TA_TOP = 0;
  262. TA_BOTTOM = 8;
  263. TA_BASELINE = 24;
  264. ETO_GRAYED = 1;
  265. ETO_OPAQUE = 2;
  266. ETO_CLIPPED = 4;
  267. ASPECT_FILTERING = #0000001;
  268. (* Meta file function numbers *)
  269. META_SETBKCOLOR = #201;
  270. META_SETBKMODE = #102;
  271. META_SETMAPMODE = #103;
  272. META_SETROP2 = #104;
  273. META_SETRELABS = #105;
  274. META_SETPOLYFILLMODE = #106;
  275. META_SETSTRETCHBLTMODE = #107;
  276. META_SETTEXTCHAREXTRA = #108;
  277. META_SETTEXTCOLOR = #209;
  278. META_SETTEXTJUSTIFICATION = #20A;
  279. META_SETWINDOWORG = #20B;
  280. META_SETWINDOWEXT = #20C;
  281. META_SETVIEWPORTORG = #20D;
  282. META_SETVIEWPORTEXT = #20E;
  283. META_OFFSETWINDOWORG = #20F;
  284. META_SCALEWINDOWEXT = #400;
  285. META_OFFSETVIEWPORTORG = #211;
  286. META_SCALEVIEWPORTEXT = #412;
  287. META_LINETO = #213;
  288. META_MOVETO = #214;
  289. META_EXCLUDECLIPRECT = #415;
  290. META_INTERSECTCLIPRECT = #416;
  291. META_ARC = #817;
  292. META_ELLIPSE = #418;
  293. META_FLOODFILL = #419;
  294. META_PIE = #81A;
  295. META_RECTANGLE = #41B;
  296. META_ROUNDRECT = #61C;
  297. META_PATBLT = #61D;
  298. META_SAVEDC = #01E;
  299. META_SETPIXEL = #41F;
  300. META_OFFSETCLIPRGN = #220;
  301. META_TEXTOUT = #521;
  302. META_BITBLT = #922;
  303. META_STRETCHBLT = #B23;
  304. META_POLYGON = #324;
  305. META_POLYLINE = #325;
  306. META_ESCAPE = #626;
  307. META_RESTOREDC = #127;
  308. META_FILLREGION = #228;
  309. META_FRAMEREGION = #429;
  310. META_INVERTREGION = #12A;
  311. META_PAINTREGION = #12B;
  312. META_SELECTCLIPREGION = #12C;
  313. META_SELECTOBJECT = #12D;
  314. META_SETTEXTALIGN = #12E;
  315. META_DRAWTEXT = #62F;
  316. META_CHORD = #630;
  317. META_CREATEBRUSH = #0F8;
  318. META_CREATEPATTERNBRUSH = #1F9;
  319. META_CREATEPENINDIRECT = #2FA;
  320. META_CREATEFONTINDIRECT = #2FB;
  321. META_CREATEBRUSHINDIRECT = #2FC;
  322. META_CREATEBITMAPINDIRECT = #2FD;
  323. META_CREATEBITMAP = #6FE;
  324. META_CREATEREGION = #6FF;
  325. (* GDI escapes *)
  326. NEWFRAME = 1;
  327. ABORTDOC = 2;
  328. NEXTBAND = 3;
  329. SETCOLORTABLE = 4;
  330. GETCOLORTABLE = 5;
  331. FLUSHOUTPUT = 6;
  332. DRAFTMODE = 7;
  333. QUERYESCSUPPORT = 8;
  334. SETABORTPROC = 9;
  335. STARTDOC = 10;
  336. ENDDOC = 11;
  337. GETPHYSPAGESIZE = 12;
  338. GETPRINTINGOFFSET = 13;
  339. GETSCALINGFACTOR = 14;
  340. MFCOMMENT = 15; (* Metafile comment escape *)
  341. GETPENWIDTH = 16;
  342. SETCOPYCOUNT = 17;
  343. SELECTPAPERSOURCE = 18;
  344. DEVICEDATA = 19;
  345. PASSTHROUGH = 19;
  346. GETTECHNOLGY = 20;
  347. SETENDCAP = 21;
  348. SETLINEJOIN = 22;
  349. SETMITERLIMIT = 23;
  350. BANDINFO = 24;
  351. DRAWPATTERNRECT = 25;
  352. GETVECTORPENSIZE = 26;
  353. GETVECTORBRUSHSIZE = 27;
  354. ENABLEDUPLEX = 28;
  355. ENABLEMANUALFEED = 29;
  356. (* spooler error code *)
  357. SP_NOTREPORTED = #4000 (* set if GDI did not report error *);
  358. SP_ERROR = -1 (* general errors who know what went wrong *);
  359. SP_APPABORT = -2 (* app aborted the job - callback function returned false *);
  360. SP_USERABORT = -3 (* user aborted the job through spooler's front end *);
  361. SP_OUTOFDISK = -4 (* not enough disk space to spool *);
  362. SP_OUTOFMEMORY = -5;
  363. (* spooler WM_SPOOLERSTATUS wparm classes *)
  364. PR_JOBSTATUS = #000;
  365. (* Object definitions for GDI EnumObjects. *)
  366. OBJ_PEN = 1;
  367. OBJ_BRUSH = 2;
  368. TYPE
  369. HANDLE = WORD;
  370. PHANDLE = ADR OF HANDLE;
  371. SPHANDLE = ADR OF HANDLE;
  372. LPHANDLE = ADS OF HANDLE;
  373. FARPROC = ADSMEM;
  374. NEARPROC = ADRMEM;
  375. (* GLOBALHANDLE = HANDLE; Conflict with function name *)
  376. (* LOCALHANDLE = HANDLE; Conflict with function name *)
  377. BITMAP = RECORD
  378. bmType : short;
  379. bmWidth : short;
  380. bmHeight : short;
  381. bmWidthBytes : short;
  382. bmPlanes : BYTE;
  383. bmBitsPixel : BYTE;
  384. bmBits : LPSTR;
  385. END;
  386. PBITMAP = ADR OF BITMAP;
  387. NPBITMAP = ADR OF BITMAP;
  388. LPBITMAP = ADS OF BITMAP;
  389. HSTR = HANDLE;
  390. HICON = HANDLE;
  391. HDC = HANDLE;
  392. HMENU = HANDLE;
  393. HPEN = HANDLE;
  394. HFONT = HANDLE;
  395. HBRUSH = HANDLE;
  396. HBITMAP = HANDLE;
  397. HCURSOR = HANDLE;
  398. HRGN = HANDLE;
  399. POINT = RECORD
  400. x : int;
  401. y : int;
  402. END;
  403. PPOINT = ADR OF POINT;
  404. NPPOINT = ADR OF POINT;
  405. LPPOINT = ADS OF POINT;
  406. RECT = RECORD
  407. left : int;
  408. top : int;
  409. right : int;
  410. bottom : int;
  411. END;
  412. PRECT = ADR OF RECT;
  413. NPRECT = ADR OF RECT;
  414. LPRECT = ADS OF RECT;
  415. WNDCLASS = RECORD
  416. style : WORD;
  417. lpfnWndProc : FARPROC;
  418. cbClsExtra : int;
  419. cbWndExtra : int;
  420. hInstance : HANDLE;
  421. hIcon_ : HICON;
  422. hCursor_ : HCURSOR;
  423. hbrBackground : HBRUSH;
  424. lpszMenuName : LPSTR;
  425. lpszClassName : LPSTR;
  426. END;
  427. PWNDCLASS = ADR OF WNDCLASS;
  428. NPWNDCLASS = ADR OF WNDCLASS;
  429. LPWNDCLASS = ADS OF WNDCLASS;
  430. HWND = HANDLE;
  431. (* Message structure *)
  432. MSG = RECORD
  433. hwnd_ : HWND;
  434. message : WORD;
  435. wParam : WORD;
  436. lParam : LONG;
  437. time : DWORD;
  438. pt : POINT;
  439. END;
  440. PMSG = ADR OF MSG;
  441. NPMSG = ADR OF MSG;
  442. LPMSG = ADS OF MSG;
  443. (* Window field offsets for GetWindowLong & GetWindowWord *)
  444. CONST
  445. GWL_WNDPROC = -4;
  446. GWW_HINSTANCE = -6;
  447. GWW_HWNDPARENT = -8;
  448. GWW_HWNDTEXT = -10;
  449. GWW_ID = -12;
  450. GWL_STYLE = -16;
  451. (* Class field offsets for GetClassLong & GetClassWord *)
  452. GCL_MENUNAME = -8;
  453. GCW_HBRBACKGROUND = -10;
  454. GCW_HCURSOR = -12;
  455. GCW_HICON = -14;
  456. GCW_HMODULE = -16;
  457. GCW_CBWNDEXTRA = -18;
  458. GCW_CBCLSEXTRA = -20;
  459. GCL_WNDPROC = -24;
  460. GCW_STYLE = -26;
  461. (* ** Window Procedure Messages *)
  462. WM_NULL = #0000;
  463. WM_CREATE = #0001;
  464. WM_DESTROY = #0002;
  465. WM_MOVE = #0003;
  466. WM_SIZEWAIT = #0004;
  467. WM_SIZE = #0005;
  468. WM_ACTIVATE = #0006;
  469. WM_SETFOCUS_ = #0007;
  470. WM_KILLFOCUS_ = #0008;
  471. WM_SETVISIBLE = #0009;
  472. WM_ENABLE = #000a;
  473. WM_SETREDRAW = #000b;
  474. WM_SETTEXT = #000c;
  475. WM_GETTEXT = #000d;
  476. WM_GETTEXTLENGTH = #000e;
  477. WM_PAINT = #000f;
  478. WM_CLOSE = #0010;
  479. WM_QUERYENDSESSION = #0011;
  480. WM_QUIT = #0012;
  481. WM_QUERYOPEN = #0013;
  482. WM_ERASEBKGND = #0014;
  483. WM_SYSCOLORCHANGE = #0015;
  484. WM_ENDSESSION = #0016;
  485. WM_SYSTEMERROR = #0017;
  486. WM_SHOWWINDOW = #0018;
  487. WM_CTLCOLOR = #0019;
  488. WM_WININICHANGE = #001a;
  489. WM_DEVMODECHANGE = #001b;
  490. WM_ACTIVATEAPP = #001c;
  491. WM_FONTCHANGE = #001d;
  492. WM_TIMECHANGE = #001e;
  493. WM_CANCELMODE = #001f;
  494. WM_SETCURSOR = #0020;
  495. WM_MOUSEACTIVATE = #0021;
  496. WM_CHILDACTIVATE = #0022;
  497. WM_QUEUESYNC = #0023;
  498. WM_GETMINMAXINFO = #0024;
  499. WM_PAINTICON = #0026;
  500. WM_ICONERASEBKGND = #0027;
  501. WM_NEXTDLGCTL = #0028;
  502. WM_ALTTABACTIVE = #0029; (* for win386 only *)
  503. WM_SPOOLERSTATUS = #002A;
  504. WM_NCCREATE = #0081;
  505. WM_NCDESTROY = #0082;
  506. WM_NCCALCSIZE = #0083;
  507. WM_NCHITTEST = #0084;
  508. WM_NCPAINT = #0085;
  509. WM_NCACTIVATE = #0086;
  510. WM_GETDLGCODE = #0087;
  511. WM_SYNCPAINT = #0088;
  512. WM_SYNCTASK = #0089;
  513. ST_BEGINSWP = 0;
  514. ST_ENDSWP = 1;
  515. WM_NCMOUSEMOVE = #00a0;
  516. WM_NCLBUTTONDOWN = #00a1;
  517. WM_NCLBUTTONUP = #00a2;
  518. WM_NCLBUTTONDBLCLK = #00a3;
  519. WM_NCRBUTTONDOWN = #00a4;
  520. WM_NCRBUTTONUP = #00a5;
  521. WM_NCRBUTTONDBLCLK = #00a6;
  522. WM_NCMBUTTONDOWN = #00a7;
  523. WM_NCMBUTTONUP = #00a8;
  524. WM_NCMBUTTONDBLCLK = #00a9;
  525. (* WINWhere area codes *)
  526. HTERROR = -2;
  527. HTTRANSPARENT = -1;
  528. HTNOWHERE = 0;
  529. HTCLIENT = 1;
  530. HTCAPTION = 2;
  531. HTSYSMENU = 3;
  532. HTGROWBOX = 4;
  533. HTSIZE = HTGROWBOX;
  534. HTMENU = 5;
  535. HTHSCROLL = 6;
  536. HTVSCROLL = 7;
  537. HTREDUCE = 8;
  538. HTZOOM = 9;
  539. HTLEFT = 10;
  540. HTRIGHT = 11;
  541. HTTOP = 12;
  542. HTTOPLEFT = 13;
  543. HTTOPRIGHT = 14;
  544. HTBOTTOM = 15;
  545. HTBOTTOMLEFT = 16;
  546. HTBOTTOMRIGHT = 17;
  547. HTSIZEFIRST = HTLEFT;
  548. HTSIZELAST = HTBOTTOMRIGHT;
  549. (* WM_MOUSEACTIVATE return codes *)
  550. MA_ACTIVATE = 1;
  551. MA_ACTIVATEANDEAT = 2;
  552. MA_NOACTIVATE = 3;
  553. WM_KEYFIRST = #0100;
  554. WM_KEYLAST = #0107;
  555. WM_KEYDOWN = #0100;
  556. WM_KEYUP = #0101;
  557. WM_CHAR = #0102;
  558. WM_DEADCHAR = #0103;
  559. WM_SYSKEYDOWN = #0104;
  560. WM_SYSKEYUP = #0105;
  561. WM_SYSCHAR = #0106;
  562. WM_SYSDEADCHAR = #0107;
  563. WM_YOMICHAR = #0108;
  564. WM_MOVECONVERTWINDOW = #0109;
  565. WM_CONVERTREQUEST = #010A;
  566. WM_CONVERTRESULT = #010B;
  567. WM_INITDIALOG = #0110;
  568. WM_COMMAND = #0111;
  569. WM_SYSCOMMAND = #0112;
  570. WM_TIMER = #0113;
  571. WM_HSCROLL = #0114;
  572. WM_VSCROLL = #0115;
  573. WM_INITMENU = #0116;
  574. WM_INITMENUPOPUP = #0117;
  575. WM_SYSTIMER = #0118;
  576. WM_MENUSELECT = #011f;
  577. WM_MENUCHAR = #0120;
  578. WM_ENTERIDLE = #0121;
  579. WM_MOUSEFIRST = #0200;
  580. WM_MOUSELAST = #0209;
  581. WM_MOUSEMOVE = #0200 (* mouse related constants *);
  582. WM_LBUTTONDOWN = #0201;
  583. WM_LBUTTONUP = #0202;
  584. WM_LBUTTONDBLCLK = #0203;
  585. WM_RBUTTONDOWN = #0204;
  586. WM_RBUTTONUP = #0205;
  587. WM_RBUTTONDBLCLK = #0206;
  588. WM_MBUTTONDOWN = #0207;
  589. WM_MBUTTONUP = #0208;
  590. WM_MBUTTONDBLCLK = #0209;
  591. WM_KANJIFIRST = #0280;
  592. WM_KANJILAST = #029f;
  593. (* clipboard messages *)
  594. WM_CUT = #0300;
  595. WM_COPY = #0301;
  596. WM_PASTE = #0302;
  597. WM_CLEAR = #0303;
  598. WM_UNDO = #0304;
  599. WM_RENDERFORMAT = #0305;
  600. WM_RENDERALLFORMATS = #0306;
  601. WM_DESTROYCLIPBOARD = #0307;
  602. WM_DRAWCLIPBOARD = #0308;
  603. WM_PAINTCLIPBOARD = #0309;
  604. WM_VSCROLLCLIPBOARD = #030a;
  605. WM_SIZECLIPBOARD = #030b;
  606. WM_ASKCBFORMATNAME = #030c;
  607. WM_CHANGECBCHAIN = #030d;
  608. WM_HSCROLLCLIPBOARD = #030e;
  609. (* 0x03f0 to 0x03ff are reserved *)
  610. (* private window messages start here *)
  611. WM_USER = #0400;
  612. { $IFDECL MAKELONG $THEN BEGIN }
  613. FUNCTION MAKELONG (
  614. w1_,w2_ : WORD
  615. ) : LONG;
  616. { $END }
  617. { $IFDECL LOWORD $THEN BEGIN }
  618. FUNCTION LOWORD (
  619. l_ : LONG
  620. ) : WORD;
  621. { $END }
  622. { $IFDECL HIWORD $THEN BEGIN }
  623. FUNCTION HIWORD (
  624. l_ : LONG
  625. ) : WORD;
  626. { $END }
  627. { $IFDECL LOBYTE $THEN BEGIN }
  628. FUNCTION LOBYTE (
  629. w_ : WORD
  630. ) : BYTE;
  631. { $END }
  632. { $IFDECL HIBYTE $THEN BEGIN }
  633. FUNCTION HIBYTE (
  634. w_ : WORD
  635. ) : BYTE;
  636. { $END }
  637. { $IFDECL MAKEPOINT $THEN BEGIN }
  638. FUNCTION MAKEPOINT (
  639. l_ : LONG
  640. ) : POINT;
  641. { $END }
  642. { $IFDECL RegisterWindowMessage $THEN BEGIN }
  643. FUNCTION RegisterWindowMessage (
  644. l_ : LPSTR
  645. ) : WORD;
  646. { $END }
  647. (* Size message commands *)
  648. CONST
  649. SIZENORMAL = 0;
  650. SIZEICONIC = 1;
  651. SIZEFULLSCREEN = 2;
  652. SIZEZOOMSHOW = 3;
  653. SIZEZOOMHIDE = 4;
  654. (* Key state masks for mouse messages *)
  655. MK_LBUTTON = #0001;
  656. MK_RBUTTON = #0002;
  657. MK_SHIFT = #0004;
  658. MK_CONTROL = #0008;
  659. MK_MBUTTON = #0010;
  660. (* Window styles *)
  661. WS_TILED = #00000000;
  662. WS_OVERLAPPED = WS_TILED;
  663. WS_ICONICPOPUP = #c0000000;
  664. WS_POPUP = #80000000;
  665. WS_CHILD = #40000000;
  666. WS_MINIMIZE = #20000000;
  667. WS_VISIBLE = #10000000;
  668. WS_DISABLED = #08000000;
  669. WS_CLIPSIBLINGS = #04000000;
  670. WS_CLIPCHILDREN = #02000000;
  671. WS_MAXIMIZE = #01000000;
  672. WS_BORDER = #00800000;
  673. WS_CAPTION = #00c00000;
  674. WS_DLGFRAME = #00400000;
  675. WS_VSCROLL = #00200000;
  676. WS_HSCROLL = #00100000;
  677. WS_SYSMENU = #00080000;
  678. WS_SIZEBOX = #00040000;
  679. WS_THICKFRAME = #00040000;
  680. WS_GROUP = #00020000;
  681. WS_TABSTOP = #00010000;
  682. WS_MINIMIZEBOX = #00020000;
  683. WS_MAXIMIZEBOX = #00010000;
  684. WS_ICONIC = WS_MINIMIZE;
  685. (* Class styles *)
  686. CS_VREDRAW = #0001;
  687. CS_HREDRAW = #0002;
  688. CS_KEYCVTWINDOW = #0004;
  689. CS_DBLCLKS = #0008;
  690. CS_OEMCHARS = #0010;
  691. CS_OWNDC = #0020;
  692. CS_CLASSDC = #0040;
  693. CS_PARENTDC = #0080;
  694. CS_NOKEYCVT = #0100;
  695. CS_SAVEBITS = #0800;
  696. CS_NOCLOSE = #0200;
  697. CS_BYTEALIGNCLIENT = #1000;
  698. CS_BYTEALIGNWINDOW = #2000;
  699. (* Shorthand for the common cases *)
  700. WS_TILEDWINDOW = #00CF0000; (* WS_TILED | WS_CAPTION | WS_SYSMENU | WS_SIZEBOX *)
  701. WS_OVERLAPPEDWINDOW = WS_TILEDWINDOW;
  702. WS_POPUPWINDOW = #80880000; (* WS_POPUP | WS_BORDER | WS_SYSMENU *)
  703. WS_CHILDWINDOW = (WS_CHILD);
  704. (* clipboard metafile picture structure *)
  705. TYPE
  706. HANDLETABLE = RECORD
  707. objectHandle[1] : HANDLE;
  708. END;
  709. PHANDLETABLE = ADR OF HANDLETABLE;
  710. LPHANDLETABLE = ADS OF HANDLETABLE;
  711. METARECORD = RECORD
  712. rdSize : DWORD;
  713. rdFunction : WORD;
  714. rdParm[1] : WORD;
  715. END;
  716. PMETARECORD = ADR OF METARECORD;
  717. LPMETARECORD = ADS OF METARECORD;
  718. METAFILEPICT = RECORD
  719. mm : int;
  720. xExt : int;
  721. yExt : int;
  722. hMF : HANDLE;
  723. END;
  724. LPMETAFILEPICT = ADS OF METAFILEPICT;
  725. (* predefined clipboard formats *)
  726. CONST
  727. CF_TEXT = 1;
  728. CF_BITMAP = 2;
  729. CF_METAFILEPICT = 3;
  730. CF_SYLK = 4;
  731. CF_DIF = 5;
  732. CF_TIFF = 6;
  733. CF_OEMTEXT = 7;
  734. CF_OWNERDISPLAY = #80 (* owner display *);
  735. CF_DSPTEXT = #81 (* display text *);
  736. CF_DSPBITMAP = #82 (* display bitmap *);
  737. CF_DSPMETAFILEPICT = #83 (* display metafile *);
  738. (* Private clipboard format range *)
  739. CF_PRIVATEFIRST = #200 (* Anything in this range doesn't *);
  740. CF_PRIVATELAST = #2ff (* get GlobalFree'd *);
  741. CF_GDIOBJFIRST = #300 (* Anything in this range gets *);
  742. CF_GDIOBJLAST = #3ff (* DeleteObject'ed *);
  743. TYPE
  744. PAINTSTRUCT = RECORD
  745. hdc_ : HDC;
  746. fErase : BOOL;
  747. rcPaint : RECT;
  748. fRestore : BOOL;
  749. fIncUpdate : BOOL;
  750. rgbReserved : ARRAY [0..15] OF BYTE;
  751. END;
  752. PPAINTSTRUCT = ADR OF PAINTSTRUCT;
  753. NPPAINTSTRUCT = ADR OF PAINTSTRUCT;
  754. LPPAINTSTRUCT = ADS OF PAINTSTRUCT;
  755. CREATESTRUCT = RECORD
  756. lpCreateParams : LPSTR;
  757. hInstance : HANDLE;
  758. hMenu : HANDLE;
  759. hwndParent : HWND;
  760. cy : int;
  761. cx : int;
  762. y : int;
  763. x : int;
  764. style : long;
  765. lpszName : LPSTR;
  766. lpszClass : LPSTR;
  767. END;
  768. LPCREATESTRUCT = ADS OF CREATESTRUCT;
  769. (* TextMetric structure *)
  770. TEXTMETRIC = RECORD
  771. tmHeight : INTEGER2;
  772. tmAscent : INTEGER2;
  773. tmDescent : INTEGER2;
  774. tmInternalLeading : INTEGER2;
  775. tmExternalLeading : INTEGER2;
  776. tmAveCharWidth : INTEGER2;
  777. tmMaxCharWidth : INTEGER2;
  778. tmWeight : INTEGER2;
  779. tmItalic : BYTE;
  780. tmUnderlined : BYTE;
  781. tmStruckOut : BYTE;
  782. tmFirstChar : BYTE;
  783. tmLastChar : BYTE;
  784. tmDefaultChar : BYTE;
  785. tmBreakChar : BYTE;
  786. tmPitchAndFamily : BYTE;
  787. tmCharSet : BYTE;
  788. tmOverhang : INTEGER2;
  789. tmDigitizedAspectX : INTEGER2;
  790. tmDigitizedAspectY : INTEGER2;
  791. END;
  792. PTEXTMETRIC = ADR OF TEXTMETRIC;
  793. NPTEXTMETRIC = ADR OF TEXTMETRIC;
  794. LPTEXTMETRIC = ADS OF TEXTMETRIC;
  795. (* GDI logical objects *)
  796. (* Pel Array *)
  797. PELARRAY = RECORD
  798. paXCount : INTEGER2;
  799. paYCount : INTEGER2;
  800. paXExt : INTEGER2;
  801. paYExt : INTEGER2;
  802. paRGBs : BYTE;
  803. END;
  804. PPELARRAY = ADR OF PELARRAY;
  805. NPPELARRAY = ADR OF PELARRAY;
  806. LPPELARRAY = ADS OF PELARRAY;
  807. (* Logical Brush *)
  808. LOGBRUSH = RECORD
  809. lbStyle : WORD;
  810. lbColor : DWORD;
  811. lbHatch : INTEGER2;
  812. END;
  813. PLOGBRUSH = ADR OF LOGBRUSH;
  814. NPLOGBRUSH = ADR OF LOGBRUSH;
  815. LPLOGBRUSH = ADS OF LOGBRUSH;
  816. (* A PATTERN and a LOGBRUSH are the same thing *)
  817. PATTERN = LOGBRUSH;
  818. PPATTERN = ADR OF PATTERN;
  819. NPPATTERN = ADR OF PATTERN;
  820. LPPATTERN = ADS OF PATTERN;
  821. (* Logical Pen *)
  822. LOGPEN = RECORD
  823. lopnStyle : WORD;
  824. lopnWidth : POINT;
  825. lopnColor : DWORD;
  826. END;
  827. PLOGPEN = ADR OF LOGPEN;
  828. NPLOGPEN = ADR OF LOGPEN;
  829. LPLOGPEN = ADS OF LOGPEN;
  830. (* Logical Font *)
  831. CONST
  832. LF_FACESIZE = 32;
  833. TYPE
  834. LOGFONT = RECORD
  835. lfHeight : INTEGER2;
  836. lfWidth : INTEGER2;
  837. lfEscapement : INTEGER2;
  838. lfOrientation : INTEGER2;
  839. lfWeight : INTEGER2;
  840. lfItalic : BYTE;
  841. lfUnderline : BYTE;
  842. lfStrikeOut : BYTE;
  843. lfCharSet : BYTE;
  844. lfOutPrecision : BYTE;
  845. lfClipPrecision : BYTE;
  846. lfQuality : BYTE;
  847. lfPitchAndFamily : BYTE;
  848. lfFaceName : ARRAY [0..LF_FACESIZE-1] OF BYTE;
  849. END;
  850. PLOGFONT = ADR OF LOGFONT;
  851. NPLOGFONT = ADR OF LOGFONT;
  852. LPLOGFONT = ADS OF LOGFONT;
  853. (* Logical font constants *)
  854. CONST
  855. OUT_DEFAULT_PRECIS = 0;
  856. OUT_STRING_PRECIS = 1;
  857. OUT_CHARACTER_PRECIS = 2;
  858. OUT_STROKE_PRECIS = 3;
  859. CLIP_DEFAULT_PRECIS = 0;
  860. CLIP_CHARACTER_PRECIS = 1;
  861. CLIP_STROKE_PRECIS = 2;
  862. DEFAULT_QUALITY = 0;
  863. DRAFT_QUALITY = 1;
  864. PROOF_QUALITY = 2;
  865. DEFAULT_PITCH = 0;
  866. FIXED_PITCH = 1;
  867. VARIABLE_PITCH = 2;
  868. ANSI_CHARSET = 0;
  869. SHIFTJIS_CHARSET = 128; (* Kanji CharSet *)
  870. OEM_CHARSET = 255;
  871. (* GDI font families. *)
  872. FF_DONTCARE = 0 (* Don't care or don't know. *);
  873. FF_ROMAN = 16 (* Variable stroke width, serifed. *);
  874. (* Times Roman, Century Schoolbook, etc. *)
  875. FF_SWISS = 32 (* Variable stroke width, sans-serifed. *);
  876. (* Helvetica, Swiss, etc. *)
  877. FF_MODERN = 48 (* Constant stroke width, serifed or sans-serifed. *);
  878. (* Pica, Elite, Courier, etc. *)
  879. FF_SCRIPT = 64 (* Cursive, etc. *);
  880. FF_DECORATIVE = 80 (* Old English, etc. *);
  881. (* Font weights lightest to darkest. *)
  882. FW_DONTCARE = 0;
  883. FW_THIN = 100;
  884. FW_EXTRALIGHT = 200;
  885. FW_LIGHT = 300;
  886. FW_NORMAL = 400;
  887. FW_MEDIUM = 500;
  888. FW_SEMIBOLD = 600;
  889. FW_BOLD = 700;
  890. FW_EXTRABOLD = 800;
  891. FW_HEAVY = 900;
  892. FW_ULTRALIGHT = (FW_EXTRALIGHT);
  893. FW_REGULAR = (FW_NORMAL);
  894. FW_DEMIBOLD = (FW_SEMIBOLD);
  895. FW_ULTRABOLD = (FW_EXTRABOLD);
  896. FW_BLACK = (FW_HEAVY);
  897. (* EnumFonts masks. *)
  898. RASTER_FONTTYPE = #0001;
  899. DEVICE_FONTTYPE = #0002;
  900. (* GDI rgb values packed into a dword *)
  901. { $IFDECL RGB $THEN BEGIN }
  902. FUNCTION RGB (
  903. r,g,b : BYTE
  904. ) : DWORD;
  905. { $END }
  906. { $IFDECL GetRValue $THEN BEGIN }
  907. FUNCTION GetRValue (
  908. d_ : DWORD
  909. ) : BYTE;
  910. { $END }
  911. { $IFDECL GetGValue $THEN BEGIN }
  912. FUNCTION GetGValue (
  913. d_ : DWORD
  914. ) : BYTE;
  915. { $END }
  916. { $IFDECL GetBValue $THEN BEGIN }
  917. FUNCTION GetBValue (
  918. d_ : DWORD
  919. ) : BYTE;
  920. { $END }
  921. (* GDI Background Modes *)
  922. CONST
  923. TRANSPARENT = 1;
  924. OPAQUE = 2;
  925. (* GDI map modes *)
  926. MM_TEXT = 1;
  927. MM_LOMETRIC = 2;
  928. MM_HIMETRIC = 3;
  929. MM_LOENGLISH = 4;
  930. MM_HIENGLISH = 5;
  931. MM_TWIPS = 6;
  932. MM_ISOTROPIC = 7;
  933. MM_ANISOTROPIC = 8;
  934. (* GDI coordinate modes *)
  935. ABSOLUTE = 1;
  936. RELATIVE = 2;
  937. (* Stock Logical Objects *)
  938. WHITE_BRUSH = 0;
  939. LTGRAY_BRUSH = 1;
  940. GRAY_BRUSH = 2;
  941. DKGRAY_BRUSH = 3;
  942. BLACK_BRUSH = 4;
  943. NULL_BRUSH = 5;
  944. HOLLOW_BRUSH = (NULL_BRUSH);
  945. WHITE_PEN = 6;
  946. BLACK_PEN = 7;
  947. NULL_PEN = 8;
  948. OEM_FIXED_FONT = 10;
  949. ANSI_FIXED_FONT = 11;
  950. ANSI_VAR_FONT = 12;
  951. SYSTEM_FONT = 13;
  952. DEVICEDEFAULT_FONT = 14;
  953. (* GDI Brush Style definitions. *)
  954. BS_SOLID = 0;
  955. BS_NULL = 1;
  956. BS_HOLLOW = (BS_NULL);
  957. BS_HATCHED = 2;
  958. BS_PATTERN = 3;
  959. BS_INDEXED = 4;
  960. (* GDI Hatch Style definitions. *)
  961. HS_HORIZONTAL = 0 (* ----- *);
  962. HS_VERTICAL = 1 (* ||||| *);
  963. HS_FDIAGONAL = 2 (* ///// *);
  964. HS_BDIAGONAL = 3 (* \\\\\ *);
  965. HS_CROSS = 4 (* +++++ *);
  966. HS_DIAGCROSS = 5 (* xxxxx *);
  967. (* GDI Pen Style definitions *)
  968. PS_SOLID = 0 (* solid pen *);
  969. PS_DASH = 1 (* ------- *);
  970. PS_DOT = 2 (* ....... *);
  971. PS_DASHDOT = 3 (* _._._._ *);
  972. PS_DASHDOTDOT = 4 (* _.._.._ *);
  973. PS_NULL = 5 (* *);
  974. (* Device Parameters for GetDeviceCaps() *)
  975. DRIVERVERSION = 0 (* Device driver version *);
  976. TECHNOLOGY = 2 (* Device classification *);
  977. HORZSIZE = 4 (* Horizontal size in millimeters *);
  978. VERTSIZE = 6 (* Vertical size in millimeters *);
  979. HORZRES = 8 (* Horizontal width in pixels *);
  980. VERTRES = 10 (* Vertical width in pixels *);
  981. BITSPIXEL = 12 (* Number of bits per pixel *);
  982. PLANES = 14 (* Number of planes *);
  983. NUMBRUSHES = 16 (* Number of brushes the device has *);
  984. NUMPENS = 18 (* Number of pens the device has *);
  985. NUMMARKERS = 20 (* Number of markers the device has *);
  986. NUMFONTS = 22 (* Number of fonts the device has *);
  987. NUMCOLORS = 24;
  988. PDEVICESIZE = 26 (* Size required for device descriptor *);
  989. CURVECAPS = 28 (* Curves capabilities *);
  990. LINECAPS = 30 (* Line capabilities *);
  991. POLYGONALCAPS = 32 (* Polygonal capabilities *);
  992. TEXTCAPS = 34 (* Text capabilities *);
  993. CLIPCAPS = 36 (* Clipping capabilities *);
  994. RASTERCAPS = 38 (* Bitblt capabilities *);
  995. ASPECTX = 40 (* Length of the X leg *);
  996. ASPECTY = 42 (* Length of the Y leg *);
  997. ASPECTXY = 44 (* Length of the hypotenuse *);
  998. LOGPIXELSX = 88 (* Logical pixels/inch in X *);
  999. LOGPIXELSY = 90 (* Logical pixels/inch in Y *);
  1000. (* Device capability masks *)
  1001. (* Device Technologies *)
  1002. DT_PLOTTER = 0 (* Vector plotter *);
  1003. DT_RASDISPLAY = 1 (* Raster display *);
  1004. DT_RASPRINTER = 2 (* Raster printer *);
  1005. DT_RASCAMERA = 3 (* Raster camera *);
  1006. DT_CHARSTREAM = 4 (* Character-stream, PLP *);
  1007. DT_METAFILE = 5 (* Metafile, VDM *);
  1008. DT_DISPFILE = 6 (* Display-file *);
  1009. (* Curve Capabilities *)
  1010. CC_NONE = 0 (* Curves not supported *);
  1011. CC_CIRCLES = 1 (* Can do circles *);
  1012. CC_PIE = 2 (* Can do pie wedges *);
  1013. CC_CHORD = 4 (* Can do chord arcs *);
  1014. CC_ELLIPSES = 8 (* Can do ellipese *);
  1015. CC_WIDE = 16 (* Can do wide lines *);
  1016. CC_STYLED = 32 (* Can do styled lines *);
  1017. CC_WIDESTYLED = 64 (* Can do wide styled lines*);
  1018. CC_INTERIORS = 128 (* Can do interiors *);
  1019. (* Line Capabilities *)
  1020. LC_NONE = 0 (* Lines not supported *);
  1021. LC_POLYLINE = 2 (* Can do polylines *);
  1022. LC_MARKER = 4 (* Can do markers *);
  1023. LC_POLYMARKER = 8 (* Can do polymarkers *);
  1024. LC_WIDE = 16 (* Can do wide lines *);
  1025. LC_STYLED = 32 (* Can do styled lines *);
  1026. LC_WIDESTYLED = 64 (* Can do wide styled lines*);
  1027. LC_INTERIORS = 128 (* Can do interiors *);
  1028. (* Polygonal Capabilities *)
  1029. PC_NONE = 0 (* Polygonals not supported*);
  1030. PC_POLYGON = 1 (* Can do polygons *);
  1031. PC_RECTANGLE = 2 (* Can do rectangles *);
  1032. PC_TRAPEZOID = 4 (* Can do trapezoids *);
  1033. PC_SCANLINE = 8 (* Can do scanlines *);
  1034. PC_WIDE = 16 (* Can do wide borders *);
  1035. PC_STYLED = 32 (* Can do styled borders *);
  1036. PC_WIDESTYLED = 64 (* Can do wide styled borders*);
  1037. PC_INTERIORS = 128 (* Can do interiors *);
  1038. (* Polygonal Capabilities *)
  1039. CP_NONE = 0 (* no clipping of Output *);
  1040. CP_RECTANGLE = 1 (* Output clipped to Rects *);
  1041. (* Text Capabilities *)
  1042. TC_OP_CHARACTER = #0001 (* Can do OutputPrecision CHARACTER *);
  1043. TC_OP_STROKE = #0002 (* Can do OutputPrecision STROKE *);
  1044. TC_CP_STROKE = #0004 (* Can do ClipPrecision STROKE *);
  1045. TC_CR_90 = #0008 (* Can do CharRotAbility 90 *);
  1046. TC_CR_ANY = #0010 (* Can do CharRotAbility ANY *);
  1047. TC_SF_X_YINDEP = #0020 (* Can do ScaleFreedom X_YINDEPENDENT *);
  1048. TC_SA_DOUBLE = #0040 (* Can do ScaleAbility DOUBLE *);
  1049. TC_SA_INTEGER = #0080 (* Can do ScaleAbility INTEGER *);
  1050. TC_SA_CONTIN = #0100 (* Can do ScaleAbility CONTINUOUS *);
  1051. TC_EA_DOUBLE = #0200 (* Can do EmboldenAbility DOUBLE *);
  1052. TC_IA_ABLE = #0400 (* Can do ItalisizeAbility ABLE *);
  1053. TC_UA_ABLE = #0800 (* Can do UnderlineAbility ABLE *);
  1054. TC_SO_ABLE = #1000 (* Can do StrikeOutAbility ABLE *);
  1055. TC_RA_ABLE = #2000 (* Can do RasterFontAble ABLE *);
  1056. TC_VA_ABLE = #4000 (* Can do VectorFontAble ABLE *);
  1057. TC_RESERVED = #8000 (* Reserved. *);
  1058. (* Raster Capabilities *)
  1059. RC_BITBLT = 1 (* Can do standard non-stretching, non-inverting BLT. *);
  1060. RC_BANDING = 2 (* Device requires banding support *);
  1061. RC_SCALING = 4 (* Device requires scaling support *);
  1062. RC_BITMAP64 = 8 (* Device can support >64K bitmap *);
  1063. (* PeekMessage options *)
  1064. PM_REMOVE = TRUE_;
  1065. PM_NOREMOVE = FALSE_;
  1066. PM_NOYIELD = #02;
  1067. { $IFDECL GetMessage $THEN BEGIN }
  1068. FUNCTION GetMessage (
  1069. l_ : LPMSG;
  1070. h_ : HWND;
  1071. w_,x_ : WORD
  1072. ) : BOOL;
  1073. { $END }
  1074. { $IFDECL PeekMessage $THEN BEGIN }
  1075. FUNCTION PeekMessage (
  1076. l_ : LPMSG;
  1077. h_ : HWND;
  1078. w_,x_ : WORD;
  1079. b_ : BOOL
  1080. ) : BOOL;
  1081. { $END }
  1082. { $IFDECL TranslateMessage $THEN BEGIN }
  1083. FUNCTION TranslateMessage (
  1084. l_ : LPMSG
  1085. ) : BOOL;
  1086. { $END }
  1087. { $IFDECL DispatchMessage $THEN BEGIN }
  1088. FUNCTION DispatchMessage (
  1089. l_ : LPMSG
  1090. ) : LONG;
  1091. { $END }
  1092. { $IFDECL SwapMouseButton $THEN BEGIN }
  1093. FUNCTION SwapMouseButton (
  1094. b_ : BOOL
  1095. ) : BOOL;
  1096. { $END }
  1097. { $IFDECL GetMessagePos $THEN BEGIN }
  1098. FUNCTION GetMessagePos : DWORD;
  1099. { $END }
  1100. { $IFDECL GetMessageTime $THEN BEGIN }
  1101. FUNCTION GetMessageTime : long;
  1102. { $END }
  1103. { $IFDECL GetSysModalWindow $THEN BEGIN }
  1104. FUNCTION GetSysModalWindow : HWND;
  1105. { $END }
  1106. { $IFDECL SetSysModalWindow $THEN BEGIN }
  1107. FUNCTION SetSysModalWindow (
  1108. h_ : HWND
  1109. ) : HWND;
  1110. { $END }
  1111. { $IFDECL SendMessage $THEN BEGIN }
  1112. FUNCTION SendMessage (
  1113. h_ : HWND;
  1114. w_,x_ : WORD;
  1115. l_ : LONG
  1116. ) : long;
  1117. { $END }
  1118. { $IFDECL PostMessage $THEN BEGIN }
  1119. FUNCTION PostMessage (
  1120. h_ : HWND;
  1121. w_,x_ : WORD;
  1122. l_ : LONG
  1123. ) : BOOL;
  1124. { $END }
  1125. { $IFDECL PostAppMessage $THEN BEGIN }
  1126. FUNCTION PostAppMessage (
  1127. h_ : HANDLE;
  1128. w_,x_ : WORD;
  1129. l_ : LONG
  1130. ) : BOOL;
  1131. { $END }
  1132. { $IFDECL ReplyMessage $THEN BEGIN }
  1133. PROCEDURE ReplyMessage (
  1134. l_ : long
  1135. );
  1136. { $END }
  1137. { $IFDECL WaitMessage $THEN BEGIN }
  1138. PROCEDURE WaitMessage;
  1139. { $END }
  1140. { $IFDECL DefWindowProc $THEN BEGIN }
  1141. FUNCTION DefWindowProc (
  1142. h_ : HWND;
  1143. w_,x_ : WORD;
  1144. l_ : LONG
  1145. ) : long;
  1146. { $END }
  1147. { $IFDECL PostQuitMessage $THEN BEGIN }
  1148. PROCEDURE PostQuitMessage (
  1149. i_ : int
  1150. );
  1151. { $END }
  1152. { $IFDECL CallWindowProc $THEN BEGIN }
  1153. FUNCTION CallWindowProc (
  1154. f_ : FARPROC;
  1155. h_ : HWND;
  1156. w_,x_ : WORD;
  1157. l_ : LONG
  1158. ) : long;
  1159. { $END }
  1160. { $IFDECL InSendMessage $THEN BEGIN }
  1161. FUNCTION InSendMessage : BOOL;
  1162. { $END }
  1163. { $IFDECL GetDoubleClickTime $THEN BEGIN }
  1164. FUNCTION GetDoubleClickTime : WORD;
  1165. { $END }
  1166. { $IFDECL SetDoubleClickTime $THEN BEGIN }
  1167. FUNCTION SetDoubleClickTime (
  1168. w_ : WORD
  1169. );
  1170. { $END }
  1171. { $IFDECL RegisterClass $THEN BEGIN }
  1172. FUNCTION RegisterClass (
  1173. l_ : LPWNDCLASS
  1174. ) : BOOL;
  1175. { $END }
  1176. { $IFDECL SetMessageQueue $THEN BEGIN }
  1177. FUNCTION SetMessageQueue (
  1178. i_ : int
  1179. ) : BOOL;
  1180. { $END }
  1181. { $IFDECL CreateWindow $THEN BEGIN }
  1182. FUNCTION CreateWindow (
  1183. l_,m_ : LPSTR;
  1184. d_ : DWORD;
  1185. i_,j_,k_,n_ : int;
  1186. h_ : HWND;
  1187. o_ : HMENU;
  1188. p_ : HANDLE;
  1189. q_ : LPSTR
  1190. ) : HWND;
  1191. { $END }
  1192. CONST
  1193. CW_USEDEFAULT = RETYPE( int, #8000); { used on both x and cx }
  1194. { $IFDECL IsWindow $THEN BEGIN }
  1195. FUNCTION IsWindow (
  1196. h_ : HWND
  1197. ) : BOOL;
  1198. { $END }
  1199. { $IFDECL DestroyWindow $THEN BEGIN }
  1200. FUNCTION DestroyWindow (
  1201. h_ : HWND
  1202. ) : BOOL;
  1203. { $END }
  1204. { $IFDECL ShowWindow $THEN BEGIN }
  1205. FUNCTION ShowWindow (
  1206. h_ : HWND;
  1207. i_ : int
  1208. ) : BOOL;
  1209. { $END }
  1210. { $IFDECL FlashWindow $THEN BEGIN }
  1211. FUNCTION FlashWindow (
  1212. h_ : HWND;
  1213. b_ : BOOL
  1214. ) : BOOL;
  1215. { $END }
  1216. { $IFDECL OpenIcon $THEN BEGIN }
  1217. FUNCTION OpenIcon (
  1218. h_ : HWND
  1219. ) : BOOL;
  1220. { $END }
  1221. { $IFDECL CloseWindow $THEN BEGIN }
  1222. FUNCTION CloseWindow (
  1223. h_ : HWND
  1224. ) : int;
  1225. { $END }
  1226. { $IFDECL MoveWindow $THEN BEGIN }
  1227. PROCEDURE MoveWindow (
  1228. h_ : HWND;
  1229. i_,j_,k_,l_ : int;
  1230. b_ : BOOL
  1231. );
  1232. { $END }
  1233. { $IFDECL IsWindowVisible $THEN BEGIN }
  1234. FUNCTION IsWindowVisible (
  1235. h_ : HWND
  1236. ) : BOOL;
  1237. { $END }
  1238. { $IFDECL IsIconic $THEN BEGIN }
  1239. FUNCTION IsIconic (
  1240. h_ : HWND
  1241. ) : BOOL;
  1242. { $END }
  1243. { $IFDECL AnyPopup $THEN BEGIN }
  1244. FUNCTION AnyPopup : BOOL;
  1245. { $END }
  1246. { $IFDECL BringWindowToTop $THEN BEGIN }
  1247. PROCEDURE BringWindowToTop (
  1248. h_ : HWND
  1249. );
  1250. { $END }
  1251. { $IFDECL IsZoomed $THEN BEGIN }
  1252. FUNCTION IsZoomed (
  1253. h_ : HWND
  1254. ) : BOOL;
  1255. { $END }
  1256. (* SetWindowPos flags *)
  1257. CONST
  1258. SWP_NOSIZE = #01;
  1259. SWP_NOMOVE = #02;
  1260. SWP_NOZORDER = #04;
  1261. SWP_NOREDRAW = #08;
  1262. SWP_NOACTIVATE = #10;
  1263. SWP_DRAWFRAME = #20;
  1264. SWP_SHOWWINDOW = #40;
  1265. SWP_HIDEWINDOW = #80;
  1266. SWP_NOCOPYBITS = #0100;
  1267. SWP_NOREPOSITION = #200;
  1268. (* DrawFrame and associated defines *)
  1269. DF_SHIFT0 = #0000;
  1270. DF_SHIFT1 = #0001;
  1271. DF_SHIFT2 = #0002;
  1272. DF_SHIFT3 = #0003;
  1273. DF_PATCOPY = #0000;
  1274. DF_PATINVERT = #0004;
  1275. DF_SCROLLBAR = 0;
  1276. DF_BACKGROUND = 8;
  1277. DF_ACTIVECAPTION = 16;
  1278. DF_INACTIVECAPTION = 24;
  1279. DF_MENU = 32;
  1280. DF_WINDOW = 40;
  1281. DF_WINDOWFRAME = 48;
  1282. DF_MENUTEXT = 56;
  1283. DF_WINDOWTEXT = 64;
  1284. DF_CAPTIONTEXT = 72;
  1285. DF_ACTIVEBORDER = 80;
  1286. DF_INACTIVEBORDER = 88;
  1287. DF_APPWORKSPACE = 96;
  1288. DF_GRAY = 104;
  1289. (* DrawText format flags *)
  1290. DT_LEFT = #00;
  1291. DT_CENTER = #01;
  1292. DT_RIGHT = #02;
  1293. DT_TOP = #00;
  1294. DT_VCENTER = #04;
  1295. DT_BOTTOM = #08;
  1296. DT_WORDBREAK = #10;
  1297. DT_SINGLELINE = #20;
  1298. DT_EXPANDTABS = #40;
  1299. DT_TABSTOP = #80;
  1300. DT_NOCLIP = #100;
  1301. DT_EXTERNALLEADING = #200;
  1302. DT_CALCRECT = #400;
  1303. DT_NOPREFIX = #800;
  1304. DT_INTERNAL = #1000;
  1305. { $IFDECL DrawText $THEN BEGIN }
  1306. PROCEDURE DrawText (
  1307. h_ : HDC;
  1308. l_ : LPSTR;
  1309. i_ : int;
  1310. m_ : LPRECT;
  1311. w_ : WORD
  1312. );
  1313. { $END }
  1314. { $IFDECL DrawIcon $THEN BEGIN }
  1315. FUNCTION DrawIcon (
  1316. h_ : HDC;
  1317. i_,j_ : int;
  1318. k_ : HICON
  1319. ) : BOOL;
  1320. { $END }
  1321. { $IFDECL CreateDialog $THEN BEGIN }
  1322. FUNCTION CreateDialog (
  1323. h_ : HANDLE;
  1324. l_ : LPSTR;
  1325. i_ : HWND;
  1326. f_ : FARPROC
  1327. ) : HWND;
  1328. { $END }
  1329. { $IFDECL CreateDialogIndirect $THEN BEGIN }
  1330. FUNCTION CreateDialogIndirect (
  1331. h_ : HANDLE;
  1332. l_ : LPSTR;
  1333. i_ : HWND;
  1334. f_ : FARPROC
  1335. ) : HWND;
  1336. { $END }
  1337. { $IFDECL DialogBox $THEN BEGIN }
  1338. FUNCTION DialogBox (
  1339. h_ : HANDLE;
  1340. l_ : LPSTR;
  1341. i_ : HWND;
  1342. f_ : FARPROC
  1343. ) : int;
  1344. { $END }
  1345. { $IFDECL DialogBoxIndirect $THEN BEGIN }
  1346. FUNCTION DialogBoxIndirect (
  1347. h_ : HANDLE;
  1348. h_ : HANDLE;
  1349. i_ : HWND;
  1350. f_ : FARPROC
  1351. ) : int;
  1352. { $END }
  1353. { $IFDECL EndDialog $THEN BEGIN }
  1354. PROCEDURE EndDialog (
  1355. h_ : HWND;
  1356. i_ : int
  1357. );
  1358. { $END }
  1359. { $IFDECL GetDlgItem $THEN BEGIN }
  1360. FUNCTION GetDlgItem (
  1361. h_ : HWND;
  1362. i_ : int
  1363. ) : HWND;
  1364. { $END }
  1365. { $IFDECL SetDlgItemInt $THEN BEGIN }
  1366. PROCEDURE SetDlgItemInt (
  1367. h_ : HWND;
  1368. i_ : int;
  1369. w_ : WORD;
  1370. b_ : BOOL
  1371. );
  1372. { $END }
  1373. { $IFDECL GetDlgItemInt $THEN BEGIN }
  1374. FUNCTION GetDlgItemInt (
  1375. h_ : HWND;
  1376. i_ : int;
  1377. b_ : LPBOOL;
  1378. c_ : BOOL
  1379. ) : WORD;
  1380. { $END }
  1381. { $IFDECL SetDlgItemText $THEN BEGIN }
  1382. PROCEDURE SetDlgItemText (
  1383. h_ : HWND;
  1384. i_ : int;
  1385. l_ : LPSTR
  1386. );
  1387. { $END }
  1388. { $IFDECL GetDlgItemText $THEN BEGIN }
  1389. FUNCTION GetDlgItemText (
  1390. h_ : HWND;
  1391. i_ : int;
  1392. l_ : LPSTR;
  1393. j_ : int
  1394. ) : int;
  1395. { $END }
  1396. { $IFDECL CheckDlgButton $THEN BEGIN }
  1397. PROCEDURE CheckDlgButton (
  1398. h_ : HWND;
  1399. i_ : int;
  1400. w_ : WORD
  1401. );
  1402. { $END }
  1403. { $IFDECL CheckRadioButton $THEN BEGIN }
  1404. PROCEDURE CheckRadioButton (
  1405. h_ : HWND;
  1406. i_,j_,k_ : int
  1407. );
  1408. { $END }
  1409. { $IFDECL IsDlgButtonChecked $THEN BEGIN }
  1410. FUNCTION IsDlgButtonChecked (
  1411. h_ : HWND;
  1412. i_ : int
  1413. ) : WORD;
  1414. { $END }
  1415. { $IFDECL SendDlgItemMessage $THEN BEGIN }
  1416. FUNCTION SendDlgItemMessage (
  1417. h_ : HWND;
  1418. i_ : int;
  1419. w_,x_ : WORD;
  1420. l_ : LONG
  1421. ) : long;
  1422. { $END }
  1423. { $IFDECL CallMsgFilter $THEN BEGIN }
  1424. FUNCTION CallMsgFilter (
  1425. l_ : LPMSG;
  1426. i_ : int
  1427. ) : BOOL;
  1428. { $END }
  1429. (* Clipboard manager routines *)
  1430. { $IFDECL OpenClipboard $THEN BEGIN }
  1431. FUNCTION OpenClipboard (
  1432. h_ : HWND
  1433. ) : BOOL;
  1434. { $END }
  1435. { $IFDECL CloseClipboard $THEN BEGIN }
  1436. FUNCTION CloseClipboard : BOOL;
  1437. { $END }
  1438. { $IFDECL GetClipboardOwner $THEN BEGIN }
  1439. FUNCTION GetClipboardOwner : HWND;
  1440. { $END }
  1441. { $IFDECL SetClipboardViewer $THEN BEGIN }
  1442. FUNCTION SetClipboardViewer (
  1443. h_ : HWND
  1444. ) : HWND;
  1445. { $END }
  1446. { $IFDECL GetClipboardViewer $THEN BEGIN }
  1447. FUNCTION GetClipboardViewer : HWND;
  1448. { $END }
  1449. { $IFDECL ChangeClipboardChain $THEN BEGIN }
  1450. FUNCTION ChangeClipboardChain (
  1451. h_,i_ : HWND
  1452. ) : BOOL;
  1453. { $END }
  1454. { $IFDECL SetClipboardData $THEN BEGIN }
  1455. FUNCTION SetClipboardData (
  1456. w_ : WORD;
  1457. h_ : HANDLE
  1458. ) : HANDLE;
  1459. { $END }
  1460. { $IFDECL GetClipboardData $THEN BEGIN }
  1461. FUNCTION GetClipboardData (
  1462. w_ : WORD
  1463. ) : HANDLE;
  1464. { $END }
  1465. { $IFDECL RegisterClipboardFormat $THEN BEGIN }
  1466. FUNCTION RegisterClipboardFormat (
  1467. l_ : LPSTR
  1468. ) : WORD;
  1469. { $END }
  1470. { $IFDECL CountClipboardFormats $THEN BEGIN }
  1471. FUNCTION CountClipboardFormats : int;
  1472. { $END }
  1473. { $IFDECL EnumClipboardFormats $THEN BEGIN }
  1474. FUNCTION EnumClipboardFormats (
  1475. w_ : WORD
  1476. ) : WORD;
  1477. { $END }
  1478. { $IFDECL GetClipboardFormatName $THEN BEGIN }
  1479. FUNCTION GetClipboardFormatName (
  1480. w_ : WORD;
  1481. l_ : LPSTR;
  1482. i_ : int
  1483. ) : int;
  1484. { $END }
  1485. { $IFDECL EmptyClipboard $THEN BEGIN }
  1486. FUNCTION EmptyClipboard : BOOL;
  1487. { $END }
  1488. { $IFDECL IsClipboardFormatAvailable $THEN BEGIN }
  1489. FUNCTION IsClipboardFormatAvailable (
  1490. w_ : WORD
  1491. ) : BOOL;
  1492. { $END }
  1493. { $IFDECL SetFocus $THEN BEGIN }
  1494. FUNCTION SetFocus (
  1495. h_ : HWND
  1496. ) : HWND;
  1497. { $END }
  1498. { $IFDECL GetFocus $THEN BEGIN }
  1499. FUNCTION GetFocus : HWND;
  1500. { $END }
  1501. { $IFDECL GetActiveWindow $THEN BEGIN }
  1502. FUNCTION GetActiveWindow : HWND;
  1503. { $END }
  1504. { $IFDECL GetKeyState $THEN BEGIN }
  1505. FUNCTION GetKeyState (
  1506. i_ : int
  1507. ) : int;
  1508. { $END }
  1509. { $IFDECL GetAsyncKeyState $THEN BEGIN }
  1510. FUNCTION GetAsyncKeyState (
  1511. i_ : int
  1512. ) : int;
  1513. { $END }
  1514. { $IFDECL GetKeyboardState $THEN BEGIN }
  1515. PROCEDURE GetKeyboardState (
  1516. b_ : ADS OF BYTE
  1517. );
  1518. { $END }
  1519. { $IFDECL SetKeyboardState $THEN BEGIN }
  1520. PROCEDURE SetKeyboardState (
  1521. b_ : ADS OF BYTE
  1522. );
  1523. { $END }
  1524. { $IFDECL EnableHardwareInput $THEN BEGIN }
  1525. FUNCTION EnableHardwareInput (
  1526. b_ : BOOL
  1527. ) : BOOL;
  1528. { $END }
  1529. { $IFDECL GetInputState $THEN BEGIN }
  1530. FUNCTION GetInputState (
  1531. ) : BOOL;
  1532. { $END }
  1533. { $IFDECL GetCapture $THEN BEGIN }
  1534. FUNCTION GetCapture;
  1535. { $END }
  1536. { $IFDECL SetCapture $THEN BEGIN }
  1537. FUNCTION SetCapture (
  1538. h_ : HWND
  1539. ) : HWND;
  1540. { $END }
  1541. { $IFDECL ReleaseCapture $THEN BEGIN }
  1542. PROCEDURE ReleaseCapture;
  1543. { $END }
  1544. (* Windows Functions *)
  1545. { $IFDECL SetTimer $THEN BEGIN }
  1546. FUNCTION SetTimer (
  1547. h_ : HWND;
  1548. s_ : short;
  1549. w_ : WORD;
  1550. f_ : FARPROC
  1551. ) : WORD;
  1552. { $END }
  1553. { $IFDECL KillTimer $THEN BEGIN }
  1554. FUNCTION KillTimer (
  1555. h_ : HWND;
  1556. s_ : short
  1557. ) : BOOL;
  1558. { $END }
  1559. { $IFDECL EnableWindow $THEN BEGIN }
  1560. FUNCTION EnableWindow (
  1561. h_ : HWND;
  1562. b_ : BOOL
  1563. ) : BOOL;
  1564. { $END }
  1565. { $IFDECL IsWindowEnabled $THEN BEGIN }
  1566. FUNCTION IsWindowEnabled (
  1567. h_ : HWND
  1568. ) : BOOL;
  1569. { $END }
  1570. { $IFDECL LoadAccelerators $THEN BEGIN }
  1571. FUNCTION LoadAccelerators (
  1572. h_ : HANDLE;
  1573. l_ : LPSTR
  1574. ) : HANDLE;
  1575. { $END }
  1576. { $IFDECL TranslateAccelerator $THEN BEGIN }
  1577. FUNCTION TranslateAccelerator (
  1578. h_ : HWND;
  1579. i_ : HANDLE;
  1580. l_ : LPMSG
  1581. ) : int;
  1582. { $END }
  1583. (* GetSystemMetrics codes *)
  1584. CONST
  1585. SM_CXSCREEN = 0;
  1586. SM_CYSCREEN = 1;
  1587. SM_CXVSCROLL = 2;
  1588. SM_CYHSCROLL = 3;
  1589. SM_CYCAPTION = 4;
  1590. SM_CXBORDER = 5;
  1591. SM_CYBORDER = 6;
  1592. SM_CXDLGFRAME = 7;
  1593. SM_CYDLGFRAME = 8;
  1594. SM_CYVTHUMB = 9;
  1595. SM_CXHTHUMB = 10;
  1596. SM_CXICON = 11;
  1597. SM_CYICON = 12;
  1598. SM_CXCURSOR = 13;
  1599. SM_CYCURSOR = 14;
  1600. SM_CYMENU = 15;
  1601. SM_CXFULLSCREEN = 16;
  1602. SM_CYFULLSCREEN = 17;
  1603. SM_CYKANJIWINDOW = 18;
  1604. SM_MOUSEPRESENT = 19;
  1605. SM_CYVSCROLL = 20;
  1606. SM_CXHSCROLL = 21;
  1607. SM_DEBUG = 22;
  1608. SM_SWAPBUTTON = 23;
  1609. SM_RESERVED1 = 24;
  1610. SM_RESERVED2 = 25;
  1611. SM_RESERVED3 = 26;
  1612. SM_RESERVED4 = 27;
  1613. SM_CXMIN = 28;
  1614. SM_CYMIN = 29;
  1615. SM_CXSIZE = 30;
  1616. SM_CYSIZE = 31;
  1617. SM_CXFRAME = 32;
  1618. SM_CYFRAME = 33;
  1619. SM_CXMINTRACK = 34;
  1620. SM_CYMINTRACK = 35;
  1621. SM_CMETRICS = 36;
  1622. { $IFDECL GetSystemMetrics $THEN BEGIN }
  1623. FUNCTION GetSystemMetrics (
  1624. i_ : int
  1625. ) : int;
  1626. { $END }
  1627. { $IFDECL HiliteMenuItem $THEN BEGIN }
  1628. FUNCTION HiliteMenuItem (
  1629. h_ : HWND;
  1630. i_ : HMENU;
  1631. w_,x_ : WORD
  1632. ) : BOOL;
  1633. { $END }
  1634. { $IFDECL GetMenuString $THEN BEGIN }
  1635. FUNCTION GetMenuString (
  1636. h_ : HMENU;
  1637. w_ : WORD;
  1638. l_ : LPSTR;
  1639. i_ : int;
  1640. x_ : WORD
  1641. ) : int;
  1642. { $END }
  1643. { $IFDECL GetMenuState $THEN BEGIN }
  1644. FUNCTION GetMenuState (
  1645. h_ : HMENU;
  1646. w_ : WORD;
  1647. w_ : WORD
  1648. ) : WORD;
  1649. { $END }
  1650. { $IFDECL GetMenuItemID $THEN BEGIN }
  1651. FUNCTION GetMenuItemID (
  1652. h_ : HMENU;
  1653. i_ : int
  1654. ) : WORD;
  1655. { $END }
  1656. { $IFDECL GetMenuItemCount $THEN BEGIN }
  1657. FUNCTION GetMenuItemCount (
  1658. h_ : HMENU
  1659. ) : WORD;
  1660. { $END }
  1661. { $IFDECL DrawMenuBar $THEN BEGIN }
  1662. PROCEDURE DrawMenuBar (
  1663. h_ : HWND
  1664. );
  1665. { $END }
  1666. { $IFDECL GetSystemMenu $THEN BEGIN }
  1667. FUNCTION GetSystemMenu (
  1668. h_ : HWND;
  1669. b_ : BOOL
  1670. ) : HMENU;
  1671. { $END }
  1672. { $IFDECL CreateMenu $THEN BEGIN }
  1673. FUNCTION CreateMenu : HMENU;
  1674. { $END }
  1675. { $IFDECL DestroyMenu $THEN BEGIN }
  1676. FUNCTION DestroyMenu (
  1677. h_ : HMENU
  1678. ) : BOOL;
  1679. { $END }
  1680. { $IFDECL ChangeMenu $THEN BEGIN }
  1681. FUNCTION ChangeMenu (
  1682. h_ : HMENU;
  1683. w_ : WORD;
  1684. l_ : LPSTR;
  1685. x_,y_ : WORD
  1686. ) : BOOL;
  1687. { $END }
  1688. { $IFDECL CheckMenuItem $THEN BEGIN }
  1689. FUNCTION CheckMenuItem (
  1690. h_ : HMENU;
  1691. w_,x_ : WORD
  1692. ) : BOOL;
  1693. { $END }
  1694. { $IFDECL EnableMenuItem $THEN BEGIN }
  1695. FUNCTION EnableMenuItem (
  1696. h_ : HMENU;
  1697. w_,x_ : WORD
  1698. ) : BOOL;
  1699. { $END }
  1700. { $IFDECL GetSubMenu $THEN BEGIN }
  1701. FUNCTION GetSubMenu (
  1702. h_ : HMENU;
  1703. i_ : int
  1704. ) : HMENU;
  1705. { $END }
  1706. { $IFDECL EndMenu $THEN BEGIN }
  1707. PROCEDURE EndMenu;
  1708. { $END }
  1709. { $IFDECL GrayString $THEN BEGIN }
  1710. FUNCTION GrayString (
  1711. h_ : HDC;
  1712. i_ : HBRUSH;
  1713. f_ : FARPROC;
  1714. d_ : DWORD;
  1715. j_,k_,l_,m_,n_ : int
  1716. ) : BOOL;
  1717. { $END }
  1718. { $IFDECL UpdateWindow $THEN BEGIN }
  1719. PROCEDURE UpdateWindow (
  1720. h_ : HWND
  1721. );
  1722. { $END }
  1723. { $IFDECL SetActiveWindow $THEN BEGIN }
  1724. FUNCTION SetActiveWindow (
  1725. h_ : HWND
  1726. ) : HWND;
  1727. { $END }
  1728. { $IFDECL GetWindowDC $THEN BEGIN }
  1729. FUNCTION GetWindowDC (
  1730. h_ : HWND
  1731. ) : HDC;
  1732. { $END }
  1733. { $IFDECL GetDC $THEN BEGIN }
  1734. FUNCTION GetDC (
  1735. h_ : HWND
  1736. ) : HDC;
  1737. { $END }
  1738. { $IFDECL ReleaseDC $THEN BEGIN }
  1739. FUNCTION ReleaseDC (
  1740. h_ : HWND;
  1741. i_ : HDC
  1742. ) : int;
  1743. { $END }
  1744. { $IFDECL BeginPaint $THEN BEGIN }
  1745. FUNCTION BeginPaint (
  1746. h_ : HWND;
  1747. l_ : LPPAINTSTRUCT
  1748. ) : HDC;
  1749. { $END }
  1750. { $IFDECL EndPaint $THEN BEGIN }
  1751. PROCEDURE EndPaint (
  1752. h_ : HWND;
  1753. l_ : LPPAINTSTRUCT
  1754. );
  1755. { $END }
  1756. { $IFDECL GetUpdateRect $THEN BEGIN }
  1757. FUNCTION GetUpdateRect (
  1758. h_ : HWND;
  1759. l_ : LPRECT;
  1760. b_ : BOOL
  1761. ) : BOOL;
  1762. { $END }
  1763. { $IFDECL GetUpdateRgn $THEN BEGIN }
  1764. FUNCTION GetUpdateRgn (
  1765. h_ : HWND;
  1766. r_ : HRGN;
  1767. b_ : BOOL
  1768. ) : int;
  1769. { $END }
  1770. { $IFDECL GetUpdateRgn $THEN BEGIN }
  1771. FUNCTION GetUpdateRgn (
  1772. d_ : HDC;
  1773. h_ : HWND
  1774. ) : short;
  1775. { $END }
  1776. { $IFDECL InvalidateRect $THEN BEGIN }
  1777. PROCEDURE InvalidateRect (
  1778. h_ : HWND;
  1779. l_ : LPRECT;
  1780. b_ : BOOL
  1781. );
  1782. { $END }
  1783. { $IFDECL ValidateRect $THEN BEGIN }
  1784. PROCEDURE ValidateRect (
  1785. h_ : HWND;
  1786. l_ : LPRECT
  1787. );
  1788. { $END }
  1789. { $IFDECL InvalidateRgn $THEN BEGIN }
  1790. PROCEDURE InvalidateRgn (
  1791. h_ : HWND;
  1792. i_ : HRGN;
  1793. b_ : BOOL
  1794. );
  1795. { $END }
  1796. { $IFDECL ValidateRgn $THEN BEGIN }
  1797. PROCEDURE ValidateRgn (
  1798. h_ : HWND;
  1799. i_ : HRGN
  1800. );
  1801. { $END }
  1802. { $IFDECL ScrollWindow $THEN BEGIN }
  1803. PROCEDURE ScrollWindow (
  1804. h_ : HWND;
  1805. i_,j_ : int;
  1806. l_,m_ : LPRECT
  1807. );
  1808. { $END }
  1809. { $IFDECL ScrollDC $THEN BEGIN }
  1810. FUNCTION ScrollDC (
  1811. h_ : HDC;
  1812. i_,j_ : int;
  1813. l_,m_ : LPRECT;
  1814. r_ : HRGN;
  1815. p_ : LPRECT
  1816. ) : BOOL;
  1817. { $END }
  1818. { $IFDECL SetScrollPos $THEN BEGIN }
  1819. FUNCTION SetScrollPos (
  1820. h_ : HWND;
  1821. i_,j_ : int;
  1822. b_ : BOOL
  1823. ) : int;
  1824. { $END }
  1825. { $IFDECL GetScrollPos $THEN BEGIN }
  1826. FUNCTION GetScrollPos (
  1827. h_ : HWND;
  1828. i_ : int
  1829. ) : int;
  1830. { $END }
  1831. { $IFDECL SetScrollRange $THEN BEGIN }
  1832. PROCEDURE SetScrollRange (
  1833. h_ : HWND;
  1834. i_,j_,k_ : int;
  1835. b_ : BOOL
  1836. );
  1837. { $END }
  1838. { $IFDECL GetScrollRange $THEN BEGIN }
  1839. PROCEDURE GetScrollRange (
  1840. h_ : HWND;
  1841. i_ : int;
  1842. l_,m_ : LPINT
  1843. );
  1844. { $END }
  1845. { $IFDECL ShowScrollBar $THEN BEGIN }
  1846. PROCEDURE ShowScrollBar (
  1847. h_ : HWND;
  1848. w_ : WORD;
  1849. b_ : BOOL
  1850. );
  1851. { $END }
  1852. { $IFDECL SetProp $THEN BEGIN }
  1853. FUNCTION SetProp (
  1854. h_ : HWND;
  1855. l_ : LPSTR;
  1856. i_ : HANDLE
  1857. ) : BOOL;
  1858. { $END }
  1859. { $IFDECL GetProp $THEN BEGIN }
  1860. FUNCTION GetProp (
  1861. h_ : HWND;
  1862. l_ : LPSTR
  1863. ) : HANDLE;
  1864. { $END }
  1865. { $IFDECL RemoveProp $THEN BEGIN }
  1866. FUNCTION RemoveProp (
  1867. h_ : HWND;
  1868. l_ : LPSTR
  1869. ) : HANDLE;
  1870. { $END }
  1871. { $IFDECL EnumProps $THEN BEGIN }
  1872. FUNCTION EnumProps (
  1873. h_ : HWND;
  1874. f_ : FARPROC
  1875. ) : int;
  1876. { $END }
  1877. { $IFDECL SetWindowText $THEN BEGIN }
  1878. PROCEDURE SetWindowText (
  1879. h_ : HWND;
  1880. l_ : LPSTR
  1881. );
  1882. { $END }
  1883. { $IFDECL GetWindowText $THEN BEGIN }
  1884. FUNCTION GetWindowText (
  1885. h_ : HWND;
  1886. l_ : LPSTR;
  1887. i_ : int
  1888. ) : int;
  1889. { $END }
  1890. { $IFDECL GetWindowTextLength $THEN BEGIN }
  1891. FUNCTION GetWindowTextLength (
  1892. h_ : HWND
  1893. ) : int;
  1894. { $END }
  1895. { $IFDECL SetMenu $THEN BEGIN }
  1896. FUNCTION SetMenu (
  1897. h_ : HWND;
  1898. i_ : HMENU
  1899. ) : BOOL;
  1900. { $END }
  1901. { $IFDECL GetMenu $THEN BEGIN }
  1902. FUNCTION GetMenu (
  1903. h_ : HWND
  1904. ) : HMENU;
  1905. { $END }
  1906. { $IFDECL GetClientRect $THEN BEGIN }
  1907. PROCEDURE GetClientRect (
  1908. h_ : HWND;
  1909. l_ : LPRECT
  1910. );
  1911. { $END }
  1912. { $IFDECL GetWindowRect $THEN BEGIN }
  1913. PROCEDURE GetWindowRect (
  1914. h_ : HWND;
  1915. l_ : LPRECT
  1916. );
  1917. { $END }
  1918. { $IFDECL AdjustWindowRect $THEN BEGIN }
  1919. PROCEDURE AdjustWindowRect (
  1920. l_ : LPRECT
  1921. l2_ : long;
  1922. b_ : BOOL
  1923. );
  1924. { $END }
  1925. (* MessageBox type_flags *)
  1926. CONST
  1927. MB_OK = #0000;
  1928. MB_OKCANCEL = #0001;
  1929. MB_ABORTRETRYIGNORE = #0002;
  1930. MB_YESNOCANCEL = #0003;
  1931. MB_YESNO = #0004;
  1932. MB_RETRYCANCEL = #0005;
  1933. MB_ICONHAND = #0010;
  1934. MB_ICONQUESTION = #0020;
  1935. MB_ICONEXCLAMATION = #0030;
  1936. MB_ICONASTERISK = #0040;
  1937. MB_DEFBUTTON1 = #0000;
  1938. MB_DEFBUTTON2 = #0100;
  1939. MB_DEFBUTTON3 = #0200;
  1940. MB_APPLMODAL = #0000;
  1941. MB_SYSTEMMODAL = #1000;
  1942. MB_NOFOCUS = #8000;
  1943. MB_MISCMASK = #c000;
  1944. MB_TYPEMASK = #000f;
  1945. MB_ICONMASK = #00f0;
  1946. MB_DEFMASK = #0f00;
  1947. MB_MODEMASK = #3000;
  1948. { $IFDECL MessageBox $THEN BEGIN }
  1949. FUNCTION MessageBox (
  1950. h_ : HWND;
  1951. l_,m_ : LPSTR;
  1952. w_ : WORD
  1953. ) : int;
  1954. { $END }
  1955. { $IFDECL MessageBeep $THEN BEGIN }
  1956. FUNCTION MessageBeep (
  1957. w_ : WORD
  1958. ) : BOOL;
  1959. { $END }
  1960. { $IFDECL ShowCursor $THEN BEGIN }
  1961. FUNCTION ShowCursor (
  1962. b_ : BOOL
  1963. ) : int;
  1964. { $END }
  1965. { $IFDECL SetCursor $THEN BEGIN }
  1966. FUNCTION SetCursor (
  1967. h_ : HCURSOR
  1968. ) : HCURSOR;
  1969. { $END }
  1970. { $IFDECL SetCursorPos $THEN BEGIN }
  1971. PROCEDURE SetCursorPos (
  1972. i_,j_ : int
  1973. );
  1974. { $END }
  1975. { $IFDECL GetCursorPos $THEN BEGIN }
  1976. PROCEDURE GetCursorPos (
  1977. l_ : LPPOINT
  1978. );
  1979. { $END }
  1980. { $IFDECL ClipCursor $THEN BEGIN }
  1981. PROCEDURE ClipCursor (
  1982. l_ : LPRECT
  1983. );
  1984. { $END }
  1985. { $IFDECL CreateCaret $THEN BEGIN }
  1986. PROCEDURE CreateCaret (
  1987. h_ : HWND;
  1988. i_ : HBITMAP;
  1989. j_,k_ : int
  1990. );
  1991. { $END }
  1992. { $IFDECL GetCaretBlinkTime $THEN BEGIN }
  1993. FUNCTION GetCaretBlinkTime : WORD;
  1994. { $END }
  1995. { $IFDECL SetCaretBlinkTime $THEN BEGIN }
  1996. PROCEDURE SetCaretBlinkTime (
  1997. w_ : WORD
  1998. );
  1999. { $END }
  2000. { $IFDECL DestroyCaret $THEN BEGIN }
  2001. PROCEDURE DestroyCaret;
  2002. { $END }
  2003. { $IFDECL HideCaret $THEN BEGIN }
  2004. PROCEDURE HideCaret (
  2005. h_ : HWND
  2006. );
  2007. { $END }
  2008. { $IFDECL ShowCaret $THEN BEGIN }
  2009. PROCEDURE ShowCaret (
  2010. h_ : HWND
  2011. );
  2012. { $END }
  2013. { $IFDECL SetCaretPos $THEN BEGIN }
  2014. PROCEDURE SetCaretPos (
  2015. i_,j_ : int
  2016. );
  2017. { $END }
  2018. { $IFDECL GetCaretPos $THEN BEGIN }
  2019. PROCEDURE GetCaretPos (
  2020. l_ : LPPOINT
  2021. );
  2022. { $END }
  2023. { $IFDECL ClientToScreen $THEN BEGIN }
  2024. PROCEDURE ClientToScreen (
  2025. h_ : HWND;
  2026. l_ : LPPOINT
  2027. );
  2028. { $END }
  2029. { $IFDECL ScreenToClient $THEN BEGIN }
  2030. PROCEDURE ScreenToClient (
  2031. h_ : HWND;
  2032. l_ : LPPOINT
  2033. );
  2034. { $END }
  2035. { $IFDECL WindowFromPoint $THEN BEGIN }
  2036. FUNCTION WindowFromPoint (
  2037. p_ : POINT
  2038. ) : HWND;
  2039. { $END }
  2040. { $IFDECL ChildWindowFromPoint $THEN BEGIN }
  2041. FUNCTION ChildWindowFromPoint (
  2042. h_ : HWND;
  2043. p_ : POINT
  2044. ) : HWND;
  2045. { $END }
  2046. (* color type_indices *)
  2047. (* for the WM_CTLCOLOR message *)
  2048. CONST
  2049. CTLCOLOR_MSGBOX = 0;
  2050. CTLCOLOR_EDIT = 1;
  2051. CTLCOLOR_LISTBOX = 2;
  2052. CTLCOLOR_BTN = 3;
  2053. CTLCOLOR_DLG = 4;
  2054. CTLCOLOR_SCROLLBAR = 5;
  2055. CTLCOLOR_STATIC = 6;
  2056. CTLCOLOR_MAX = 8 (* three bits max *);
  2057. COLOR_SCROLLBAR = 0;
  2058. COLOR_BACKGROUND = 1;
  2059. COLOR_ACTIVECAPTION = 2;
  2060. COLOR_INACTIVECAPTION = 3;
  2061. COLOR_MENU = 4;
  2062. COLOR_WINDOW = 5;
  2063. COLOR_WINDOWFRAME = 6;
  2064. COLOR_MENUTEXT = 7;
  2065. COLOR_WINDOWTEXT = 8;
  2066. COLOR_CAPTIONTEXT = 9;
  2067. COLOR_ACTIVEBORDER = 10;
  2068. COLOR_INACTIVEBORDER = 11;
  2069. COLOR_APPWORKSPACE = 12;
  2070. { $IFDECL GetSysColor $THEN BEGIN }
  2071. FUNCTION GetSysColor (
  2072. i_ : int
  2073. ) : DWORD;
  2074. { $END }
  2075. { $IFDECL SetSysColors $THEN BEGIN }
  2076. PROCEDURE SetSysColors (
  2077. i_ : int;
  2078. l_ : LPINT;
  2079. m_ : LPlong
  2080. );
  2081. { $END }
  2082. CP_GETBEEP = 1;
  2083. CP_SETBEEP = 2;
  2084. CP_GETMOUSE = 3;
  2085. CP_SETMOUSE = 4;
  2086. CP_GETBORDER = 5;
  2087. CP_SETBORDER = 6;
  2088. CP_TIMEOUTS = 7;
  2089. CP_KANJIMENU = 8;
  2090. { $IFDECL ControlPanelInfo $THEN BEGIN }
  2091. PROCEDURE ControlPanelInfo (
  2092. w_,x_ : WORD;
  2093. l_ : LONG
  2094. );
  2095. { $END }
  2096. { $IFDECL CreateDC $THEN BEGIN }
  2097. FUNCTION CreateDC (
  2098. l_,m_,n_,o_ : LPSTR
  2099. ) : HDC;
  2100. { $END }
  2101. { $IFDECL CreateIC $THEN BEGIN }
  2102. FUNCTION CreateIC (
  2103. l_,m_,n_,o_ : LPSTR
  2104. ) : HDC;
  2105. { $END }
  2106. { $IFDECL CreateCompatibleDC $THEN BEGIN }
  2107. FUNCTION CreateCompatibleDC (
  2108. h_ : HDC
  2109. ) : HDC;
  2110. { $END }
  2111. { $IFDECL DeleteDC $THEN BEGIN }
  2112. FUNCTION DeleteDC (
  2113. h_ : HDC
  2114. ) : BOOL;
  2115. { $END }
  2116. { $IFDECL SaveDC $THEN BEGIN }
  2117. FUNCTION SaveDC (
  2118. h_ : HDC
  2119. ) : short;
  2120. { $END }
  2121. { $IFDECL RestoreDC $THEN BEGIN }
  2122. FUNCTION RestoreDC (
  2123. h_ : HDC;
  2124. s_ : short
  2125. ) : BOOL;
  2126. { $END }
  2127. { $IFDECL MoveTo $THEN BEGIN }
  2128. FUNCTION MoveTo (
  2129. h_ : HDC;
  2130. s_,t_ : short
  2131. ) : DWORD;
  2132. { $END }
  2133. { $IFDECL GetCurrentPosition $THEN BEGIN }
  2134. FUNCTION GetCurrentPosition (
  2135. h_ : HDC
  2136. ) : DWORD;
  2137. { $END }
  2138. { $IFDECL LineTo $THEN BEGIN }
  2139. FUNCTION LineTo (
  2140. h_ : HDC;
  2141. s_,t_ : short
  2142. ) : BOOL;
  2143. { $END }
  2144. { $IFDECL GetDCOrg $THEN BEGIN }
  2145. FUNCTION GetDCOrg (
  2146. h_ : HDC
  2147. ) : DWORD;
  2148. { $END }
  2149. { $IFDECL ExtTextOut $THEN BEGIN }
  2150. FUNCTION ExtTextOut (
  2151. h_ : HDC;
  2152. s_,t_ : short;
  2153. w_ : WORD;
  2154. l_ : LPRECT;
  2155. p_ : LPSTR;
  2156. i_ : WORD;
  2157. n_ : LPINT
  2158. ) : BOOL;
  2159. { $END }
  2160. { $IFDECL FastWindowFrame $THEN BEGIN }
  2161. FUNCTION FastWindowFrame (
  2162. h_ : HDC;
  2163. l_ : LPRECT;
  2164. w_,x_ : WORD;
  2165. i_ : DWORD
  2166. ) : BOOL;
  2167. { $END }
  2168. { $IFDECL Polyline $THEN BEGIN }
  2169. FUNCTION Polyline (
  2170. h_ : HDC;
  2171. l_ : LPPOINT;
  2172. s_ : short
  2173. ) : BOOL;
  2174. { $END }
  2175. { $IFDECL Polygon $THEN BEGIN }
  2176. FUNCTION Polygon (
  2177. h_ : HDC;
  2178. l_ : LPPOINT;
  2179. s_ : short
  2180. ) : BOOL;
  2181. { $END }
  2182. { $IFDECL Rectangle $THEN BEGIN }
  2183. FUNCTION Rectangle (
  2184. h_ : HDC;
  2185. s_,t_,u_,v_ : short
  2186. ) : BOOL;
  2187. { $END }
  2188. { $IFDECL RoundRect $THEN BEGIN }
  2189. FUNCTION RoundRect (
  2190. h_ : HDC;
  2191. s_,t_,u_,v_,w_,x_ : short
  2192. ) : BOOL;
  2193. { $END }
  2194. { $IFDECL Ellipse $THEN BEGIN }
  2195. FUNCTION Ellipse (
  2196. h_ : HDC;
  2197. s_,t_,u_,v_ : short
  2198. ) : BOOL;
  2199. { $END }
  2200. { $IFDECL Arc $THEN BEGIN }
  2201. FUNCTION Arc (
  2202. h_ : HDC;
  2203. s_,t_,u_,v_,w_,x_,y_,z_ : short
  2204. ) : BOOL;
  2205. { $END }
  2206. { $IFDECL Chord $THEN BEGIN }
  2207. FUNCTION Chord (
  2208. h_ : HDC;
  2209. s_,t_,u_,v_,w_,x_,y_,z_ : short
  2210. ) : BOOL;
  2211. { $END }
  2212. { $IFDECL Pie $THEN BEGIN }
  2213. FUNCTION Pie (
  2214. h_ : HDC;
  2215. s_,t_,u_,v_,w_,x_,y_,z_ : short
  2216. ) : BOOL;
  2217. { $END }
  2218. { $IFDECL PatBlt $THEN BEGIN }
  2219. FUNCTION PatBlt (
  2220. h_ : HDC;
  2221. s_,t_,u_,v_ : short;
  2222. d_ : DWORD
  2223. ) : BOOL;
  2224. { $END }
  2225. { $IFDECL BitBlt $THEN BEGIN }
  2226. FUNCTION BitBlt (
  2227. h_ : HDC;
  2228. s_,t_,u_,v_ : short;
  2229. i_ : HDC;
  2230. w_,x_ : short;
  2231. d_ : DWORD
  2232. ) : BOOL;
  2233. { $END }
  2234. { $IFDECL StretchBlt $THEN BEGIN }
  2235. FUNCTION StretchBlt (
  2236. h_ : HDC;
  2237. s_,t_,u_,v_ : short;
  2238. i_ : HDC;
  2239. w_,x_,y_,z_ : short;
  2240. d_ : DWORD
  2241. ) : BOOL;
  2242. { $END }
  2243. { $IFDECL TextOut $THEN BEGIN }
  2244. FUNCTION TextOut (
  2245. h_ : HDC;
  2246. s_,t_ : short;
  2247. l_ : LPSTR;
  2248. u_ : short
  2249. ) : BOOL;
  2250. { $END }
  2251. { $IFDECL GetCharWidth $THEN BEGIN }
  2252. FUNCTION GetCharWidth (
  2253. h_ : HDC;
  2254. w_,x_ : WORD;
  2255. l_ : LPINT
  2256. ) : BOOL;
  2257. { $END }
  2258. { $IFDECL SetPixel $THEN BEGIN }
  2259. FUNCTION SetPixel (
  2260. h_ : HDC;
  2261. s_,t_ : short;
  2262. d_ : DWORD
  2263. ) : DWORD;
  2264. { $END }
  2265. { $IFDECL GetPixel $THEN BEGIN }
  2266. FUNCTION GetPixel (
  2267. h_ : HDC;
  2268. s_,t_ : short
  2269. ) : DWORD;
  2270. { $END }
  2271. { $IFDECL FloodFill $THEN BEGIN }
  2272. FUNCTION FloodFill (
  2273. h_ : HDC;
  2274. s_,t_ : short;
  2275. d_ : DWORD
  2276. ) : BOOL;
  2277. { $END }
  2278. { $IFDECL LineDDA $THEN BEGIN }
  2279. PROCEDURE LineDDA (
  2280. s_,t_,u_,v_ : short;
  2281. f_ : FARPROC;
  2282. l_ : LPSTR
  2283. );
  2284. { $END }
  2285. { $IFDECL FillRect $THEN BEGIN }
  2286. FUNCTION FillRect (
  2287. h_ : HDC;
  2288. l_ : LPRECT;
  2289. i_ : HBRUSH
  2290. ) : int;
  2291. { $END }
  2292. { $IFDECL FrameRect $THEN BEGIN }
  2293. FUNCTION FrameRect (
  2294. h_ : HDC;
  2295. l_ : LPRECT;
  2296. i_ : HBRUSH
  2297. ) : int;
  2298. { $END }
  2299. { $IFDECL InvertRect $THEN BEGIN }
  2300. FUNCTION InvertRect (
  2301. h_ : HDC;
  2302. l_ : LPRECT
  2303. ) : int;
  2304. { $END }
  2305. { $IFDECL FillRgn $THEN BEGIN }
  2306. FUNCTION FillRgn (
  2307. h_ : HDC;
  2308. i_ : HRGN;
  2309. j_ : HBRUSH
  2310. ) : BOOL;
  2311. { $END }
  2312. { $IFDECL FrameRgn $THEN BEGIN }
  2313. FUNCTION FrameRgn (
  2314. h_ : HDC;
  2315. i_ : HRGN;
  2316. j_ : HBRUSH;
  2317. s_,t_ : short
  2318. ) : BOOL;
  2319. { $END }
  2320. { $IFDECL InvertRgn $THEN BEGIN }
  2321. FUNCTION InvertRgn (
  2322. h_ : HDC;
  2323. i_ : HRGN
  2324. ) : BOOL;
  2325. { $END }
  2326. { $IFDECL PaintRgn $THEN BEGIN }
  2327. FUNCTION PaintRgn (
  2328. h_ : HDC;
  2329. i_ : HRGN
  2330. ) : BOOL;
  2331. { $END }
  2332. { $IFDECL PtInRegion $THEN BEGIN }
  2333. FUNCTION PtInRegion (
  2334. h_ : HRGN;
  2335. s_,t_ : short
  2336. ) : BOOL;
  2337. { $END }
  2338. { $IFDECL GetStockObject $THEN BEGIN }
  2339. FUNCTION GetStockObject (
  2340. s_ : short
  2341. ) : HANDLE;
  2342. { $END }
  2343. { $IFDECL CreatePen $THEN BEGIN }
  2344. FUNCTION CreatePen (
  2345. s_,t_ : short;
  2346. d_ : DWORD
  2347. ) : HPEN;
  2348. { $END }
  2349. { $IFDECL CreatePenIndirect $THEN BEGIN }
  2350. FUNCTION CreatePenIndirect (
  2351. l_ : LPLOGPEN
  2352. ) : HPEN;
  2353. { $END }
  2354. { $IFDECL CreateSolidBrush $THEN BEGIN }
  2355. FUNCTION CreateSolidBrush (
  2356. d_ : DWORD
  2357. ) : HBRUSH;
  2358. { $END }
  2359. { $IFDECL CreateHatchBrush $THEN BEGIN }
  2360. FUNCTION CreateHatchBrush (
  2361. s_ : short;
  2362. d_ : DWORD
  2363. ) : HBRUSH;
  2364. { $END }
  2365. { $IFDECL SetBrushOrg $THEN BEGIN }
  2366. FUNCTION SetBrushOrg (
  2367. h_ : HDC;
  2368. i_,j_ : int
  2369. ) : DWORD;
  2370. { $END }
  2371. { $IFDECL GetBrushOrg $THEN BEGIN }
  2372. FUNCTION GetBrushOrg (
  2373. h_ : HDC
  2374. ) : DWORD;
  2375. { $END }
  2376. { $IFDECL UnrealizeObject $THEN BEGIN }
  2377. FUNCTION UnrealizeObject (
  2378. h_ : HBRUSH
  2379. ) : BOOL;
  2380. { $END }
  2381. { $IFDECL CreatePatternBrush $THEN BEGIN }
  2382. FUNCTION CreatePatternBrush (
  2383. h_ : HBITMAP
  2384. ) : HBRUSH;
  2385. { $END }
  2386. { $IFDECL CreateBrushIndirect $THEN BEGIN }
  2387. FUNCTION CreateBrushIndirect (
  2388. l_ : LPLOGBRUSH
  2389. ) : HBRUSH;
  2390. { $END }
  2391. { $IFDECL CreateBitmap $THEN BEGIN }
  2392. FUNCTION CreateBitmap (
  2393. s_,t_ : short;
  2394. b_,c_ : BYTE;
  2395. l_ : LPSTR
  2396. ) : HBITMAP;
  2397. { $END }
  2398. { $IFDECL CreateBitmapIndirect $THEN BEGIN }
  2399. FUNCTION CreateBitmapIndirect (
  2400. b_ : LPBITMAP
  2401. ) : HBITMAP;
  2402. { $END }
  2403. { $IFDECL CreateCompatibleBitmap $THEN BEGIN }
  2404. FUNCTION CreateCompatibleBitmap (
  2405. h_ : HDC;
  2406. s_,t_ : short
  2407. ) : HBITMAP;
  2408. { $END }
  2409. { $IFDECL CreateDiscardableBitmap $THEN BEGIN }
  2410. FUNCTION CreateDiscardableBitmap (
  2411. h_ : HDC;
  2412. s_,t_ : short
  2413. ) : HBITMAP;
  2414. { $END }
  2415. { $IFDECL SetBitmapBits $THEN BEGIN }
  2416. FUNCTION SetBitmapBits (
  2417. h_ : HBITMAP;
  2418. d_ : DWORD;
  2419. l_ : LPSTR
  2420. ) : long;
  2421. { $END }
  2422. { $IFDECL GetBitmapBits $THEN BEGIN }
  2423. FUNCTION GetBitmapBits (
  2424. h_ : HBITMAP;
  2425. l_ : long;
  2426. m_ : LPSTR
  2427. ) : long;
  2428. { $END }
  2429. { $IFDECL SetBitmapDimension $THEN BEGIN }
  2430. FUNCTION SetBitmapDimension (
  2431. h_ : HBITMAP;
  2432. s_,t_ : short
  2433. ) : DWORD;
  2434. { $END }
  2435. { $IFDECL GetBitmapDimension $THEN BEGIN }
  2436. FUNCTION GetBitmapDimension (
  2437. h_ : HBITMAP
  2438. ) : DWORD;
  2439. { $END }
  2440. { $IFDECL CreateFont $THEN BEGIN }
  2441. FUNCTION CreateFont (
  2442. s_,t_,u_,v_,w_ : short;
  2443. b_,c_,d_,e_,f_,g_,h_,i_ : BYTE;
  2444. l_ : LPSTR
  2445. ) : HFONT;
  2446. { $END }
  2447. { $IFDECL CreateFontIndirect $THEN BEGIN }
  2448. FUNCTION CreateFontIndirect (
  2449. l_ : LPLOGFONT
  2450. ) : HFONT;
  2451. { $END }
  2452. { $IFDECL CreateRectRgn $THEN BEGIN }
  2453. FUNCTION CreateRectRgn (
  2454. s_,t_,u_,v_ : short
  2455. ) : HRGN;
  2456. { $END }
  2457. { $IFDECL SetRectRgn $THEN BEGIN }
  2458. PROCEDURE SetRectRgn (
  2459. h_ : HRGN;
  2460. s_,t_,u_,v_ : short;
  2461. );
  2462. { $END }
  2463. { $IFDECL CreateRectRgnIndirect $THEN BEGIN }
  2464. FUNCTION CreateRectRgnIndirect (
  2465. l_ : LPRECT
  2466. ) : HRGN;
  2467. { $END }
  2468. { $IFDECL CreateEllipticRgnIndirect $THEN BEGIN }
  2469. FUNCTION CreateEllipticRgnIndirect (
  2470. l_ : LPRECT
  2471. ) : HRGN;
  2472. { $END }
  2473. { $IFDECL CreateEllipticRgn $THEN BEGIN }
  2474. FUNCTION CreateEllipticRgn (
  2475. s_,t_,u_,v_ : short
  2476. ) : HRGN;
  2477. { $END }
  2478. { $IFDECL CreatePolygonRgn $THEN BEGIN }
  2479. FUNCTION CreatePolygonRgn (
  2480. l_ : LPPOINT;
  2481. s_,t_ : short
  2482. ) : HRGN;
  2483. { $END }
  2484. { $IFDECL DeleteObject $THEN BEGIN }
  2485. FUNCTION DeleteObject (
  2486. h_ : HANDLE
  2487. ) : BOOL;
  2488. { $END }
  2489. { $IFDECL SelectObject $THEN BEGIN }
  2490. FUNCTION SelectObject (
  2491. h_ : HDC;
  2492. i_ : HANDLE
  2493. ) : HANDLE;
  2494. { $END }
  2495. { $IFDECL SelectClipRgn $THEN BEGIN }
  2496. FUNCTION SelectClipRgn (
  2497. h_ : HDC;
  2498. i_ : HRGN
  2499. ) : short;
  2500. { $END }
  2501. { $IFDECL GetObject $THEN BEGIN }
  2502. FUNCTION GetObject (
  2503. h_ : HANDLE;
  2504. s_ : short;
  2505. l_ : LPSTR
  2506. ) : short;
  2507. { $END }
  2508. { $IFDECL SetRelAbs $THEN BEGIN }
  2509. FUNCTION SetRelAbs (
  2510. h_ : HDC;
  2511. s_ : short
  2512. ) : short;
  2513. { $END }
  2514. { $IFDECL GetRelAbs $THEN BEGIN }
  2515. FUNCTION GetRelAbs (
  2516. h_ : HDC
  2517. ) : short;
  2518. { $END }
  2519. { $IFDECL SetBkColor $THEN BEGIN }
  2520. FUNCTION SetBkColor (
  2521. h_ : HDC;
  2522. d_ : DWORD
  2523. ) : DWORD;
  2524. { $END }
  2525. { $IFDECL GetBkColor $THEN BEGIN }
  2526. FUNCTION GetBkColor (
  2527. h_ : HDC
  2528. ) : DWORD;
  2529. { $END }
  2530. { $IFDECL SetBkMode $THEN BEGIN }
  2531. FUNCTION SetBkMode (
  2532. h_ : HDC;
  2533. s_ : short
  2534. ) : short;
  2535. { $END }
  2536. { $IFDECL GetBkMode $THEN BEGIN }
  2537. FUNCTION GetBkMode (
  2538. h_ : HDC
  2539. ) : short;
  2540. { $END }
  2541. { $IFDECL SetTextColor $THEN BEGIN }
  2542. FUNCTION SetTextColor (
  2543. h_ : HDC;
  2544. d_ : DWORD
  2545. ) : DWORD;
  2546. { $END }
  2547. { $IFDECL GetTextColor $THEN BEGIN }
  2548. FUNCTION GetTextColor (
  2549. h_ : HDC
  2550. ) : DWORD;
  2551. { $END }
  2552. { $IFDECL SetTextAlign $THEN BEGIN }
  2553. FUNCTION SetTextAlign (
  2554. h_ : HDC;
  2555. w_ : WORD
  2556. ) : WORD;
  2557. { $END }
  2558. { $IFDECL GetTextAlign $THEN BEGIN }
  2559. FUNCTION GetTextAlign (
  2560. h_ : HDC
  2561. ) : WORD;
  2562. { $END }
  2563. { $IFDECL SetMapperFlags $THEN BEGIN }
  2564. FUNCTION SetMapperFlags (
  2565. h_ : HDC;
  2566. w_ : WORD
  2567. ) : DWORD;
  2568. { $END }
  2569. { $IFDECL GetAspectRatioFilter $THEN BEGIN }
  2570. FUNCTION GetAspectRatioFilter (
  2571. h_ : HDC
  2572. ) : DWORD;
  2573. { $END }
  2574. { $IFDECL GetNearestColor $THEN BEGIN }
  2575. FUNCTION GetNearestColor (
  2576. h_ : HDC;
  2577. d_ : DWORD
  2578. ) : DWORD;
  2579. { $END }
  2580. { $IFDECL SetROP2 $THEN BEGIN }
  2581. FUNCTION SetROP2 (
  2582. h_ : HDC;
  2583. s_ : short
  2584. ) : short;
  2585. { $END }
  2586. { $IFDECL GetROP2 $THEN BEGIN }
  2587. FUNCTION GetROP2 (
  2588. h_ : HDC
  2589. ) : short;
  2590. { $END }
  2591. { $IFDECL SetStretchBltMode $THEN BEGIN }
  2592. FUNCTION SetStretchBltMode (
  2593. h_ : HDC;
  2594. s_ : short
  2595. ) : short;
  2596. { $END }
  2597. { $IFDECL GetStretchBltMode $THEN BEGIN }
  2598. FUNCTION GetStretchBltMode (
  2599. h_ : HDC
  2600. ) : short;
  2601. { $END }
  2602. { $IFDECL SetPolyFillMode $THEN BEGIN }
  2603. FUNCTION SetPolyFillMode (
  2604. h_ : HDC;
  2605. s_ : short
  2606. ) : short;
  2607. { $END }
  2608. { $IFDECL GetPolyFillMode $THEN BEGIN }
  2609. FUNCTION GetPolyFillMode (
  2610. h_ : HDC
  2611. ) : short;
  2612. { $END }
  2613. { $IFDECL SetMapMode $THEN BEGIN }
  2614. FUNCTION SetMapMode (
  2615. h_ : HDC;
  2616. s_ : short
  2617. ) : short;
  2618. { $END }
  2619. { $IFDECL GetMapMode $THEN BEGIN }
  2620. FUNCTION GetMapMode (
  2621. h_ : HDC
  2622. ) : short;
  2623. { $END }
  2624. { $IFDECL SetWindowOrg $THEN BEGIN }
  2625. FUNCTION SetWindowOrg (
  2626. h_ : HDC;
  2627. s_,t_ : short
  2628. ) : DWORD;
  2629. { $END }
  2630. { $IFDECL GetWindowOrg $THEN BEGIN }
  2631. FUNCTION GetWindowOrg (
  2632. h_ : HDC
  2633. ) : DWORD;
  2634. { $END }
  2635. { $IFDECL SetWindowExt $THEN BEGIN }
  2636. FUNCTION SetWindowExt (
  2637. h_ : HDC;
  2638. s_,t_ : short
  2639. ) : DWORD;
  2640. { $END }
  2641. { $IFDECL GetWindowExt $THEN BEGIN }
  2642. FUNCTION GetWindowExt (
  2643. h_ : HDC
  2644. ) : DWORD;
  2645. { $END }
  2646. { $IFDECL SetViewportOrg $THEN BEGIN }
  2647. FUNCTION SetViewportOrg (
  2648. h_ : HDC;
  2649. s_,t_ : short
  2650. ) : DWORD;
  2651. { $END }
  2652. { $IFDECL GetViewportOrg $THEN BEGIN }
  2653. FUNCTION GetViewportOrg (
  2654. h_ : HDC
  2655. ) : DWORD;
  2656. { $END }
  2657. { $IFDECL SetViewportExt $THEN BEGIN }
  2658. FUNCTION SetViewportExt (
  2659. h_ : HDC;
  2660. s_,t_ : short
  2661. ) : DWORD;
  2662. { $END }
  2663. { $IFDECL GetViewportExt $THEN BEGIN }
  2664. FUNCTION GetViewportExt (
  2665. h_ : HDC
  2666. ) : DWORD;
  2667. { $END }
  2668. { $IFDECL OffsetViewportOrg $THEN BEGIN }
  2669. FUNCTION OffsetViewportOrg (
  2670. h_ : HDC;
  2671. s_,t_ : short
  2672. ) : DWORD;
  2673. { $END }
  2674. { $IFDECL ScaleViewportExt $THEN BEGIN }
  2675. FUNCTION ScaleViewportExt (
  2676. h_ : HDC;
  2677. s_,t_,r_,q_ : short
  2678. ) : DWORD;
  2679. { $END }
  2680. { $IFDECL OffsetWindowOrg $THEN BEGIN }
  2681. FUNCTION OffsetWindowOrg (
  2682. h_ : HDC;
  2683. s_,t_ : short
  2684. ) : DWORD;
  2685. { $END }
  2686. { $IFDECL ScaleWindowExt $THEN BEGIN }
  2687. FUNCTION ScaleWindowExt (
  2688. h_ : HDC;
  2689. s_,t_,r_,q_ : short
  2690. ) : DWORD;
  2691. { $END }
  2692. { $IFDECL GetClipBox $THEN BEGIN }
  2693. FUNCTION GetClipBox (
  2694. h_ : HDC;
  2695. l_ : LPRECT
  2696. ) : short;
  2697. { $END }
  2698. { $IFDECL IntersectClipRect $THEN BEGIN }
  2699. FUNCTION IntersectClipRect (
  2700. h_ : HDC;
  2701. s_,t_,u_,v_ : short
  2702. ) : short;
  2703. { $END }
  2704. { $IFDECL OffsetClipRgn $THEN BEGIN }
  2705. FUNCTION OffsetClipRgn (
  2706. h_ : HDC;
  2707. s_,t_ : short
  2708. ) : short;
  2709. { $END }
  2710. { $IFDECL ExcludeClipRect $THEN BEGIN }
  2711. FUNCTION ExcludeClipRect (
  2712. h_ : HDC;
  2713. s_,t_,u_,v_ : short
  2714. ) : short;
  2715. { $END }
  2716. { $IFDECL PtVisible $THEN BEGIN }
  2717. FUNCTION PtVisible (
  2718. h_ : HDC;
  2719. s_,t_ : short
  2720. ) : BOOL;
  2721. { $END }
  2722. { $IFDECL SetRect $THEN BEGIN }
  2723. FUNCTION SetRect (
  2724. l_ : LPRECT;
  2725. i_,j_,k_,m_ : int
  2726. ) : int;
  2727. { $END }
  2728. { $IFDECL SetRectEmpty $THEN BEGIN }
  2729. FUNCTION SetRectEmpty (
  2730. l_ : LPRECT
  2731. ) : int;
  2732. { $END }
  2733. { $IFDECL CopyRect $THEN BEGIN }
  2734. FUNCTION CopyRect (
  2735. l_,m_ : LPRECT
  2736. ) : int;
  2737. { $END }
  2738. { $IFDECL InflateRect $THEN BEGIN }
  2739. FUNCTION InflateRect (
  2740. l_ : LPRECT;
  2741. i_,j_ : int
  2742. ) : int;
  2743. { $END }
  2744. { $IFDECL IntersectRect $THEN BEGIN }
  2745. FUNCTION IntersectRect (
  2746. l_,m_,n_ : LPRECT
  2747. ) : int;
  2748. { $END }
  2749. { $IFDECL UnionRect $THEN BEGIN }
  2750. FUNCTION UnionRect (
  2751. l_,m_,n_ : LPRECT
  2752. ) : int;
  2753. { $END }
  2754. { $IFDECL OffsetRect $THEN BEGIN }
  2755. FUNCTION OffsetRect (
  2756. l_ : LPRECT;
  2757. i_,j_ : int
  2758. ) : int;
  2759. { $END }
  2760. { $IFDECL IsRectEmpty $THEN BEGIN }
  2761. FUNCTION IsRectEmpty (
  2762. l_ : LPRECT
  2763. ) : BOOL;
  2764. { $END }
  2765. { $IFDECL EqualRect $THEN BEGIN }
  2766. FUNCTION EqualRect (
  2767. l_,k_ : LPRECT
  2768. ) : BOOL;
  2769. { $END }
  2770. { $IFDECL PtInRect $THEN BEGIN }
  2771. FUNCTION PtInRect (
  2772. l_ : LPRECT;
  2773. p_ : POINT
  2774. ) : BOOL;
  2775. { $END }
  2776. { $IFDECL RectVisible $THEN BEGIN }
  2777. FUNCTION RectVisible (
  2778. h_ : HDC;
  2779. l_ : LPRECT
  2780. ) : BOOL;
  2781. { $END }
  2782. { $IFDECL CombineRgn $THEN BEGIN }
  2783. FUNCTION CombineRgn (
  2784. h_,i_,j_ : HRGN;
  2785. s_ : short
  2786. ) : short;
  2787. { $END }
  2788. { $IFDECL EqualRgn $THEN BEGIN }
  2789. FUNCTION EqualRgn (
  2790. h_,i_ : HRGN
  2791. ) : BOOL;
  2792. { $END }
  2793. { $IFDECL OffsetRgn $THEN BEGIN }
  2794. FUNCTION OffsetRgn (
  2795. h_ : HRGN;
  2796. s_,t_ : short
  2797. ) : short;
  2798. { $END }
  2799. { $IFDECL SetTextJustification $THEN BEGIN }
  2800. FUNCTION SetTextJustification (
  2801. h_ : HDC;
  2802. s_,t_ : short
  2803. ) : short;
  2804. { $END }
  2805. { $IFDECL GetTextExtent $THEN BEGIN }
  2806. FUNCTION GetTextExtent (
  2807. h_ : HDC;
  2808. l_ : LPSTR;
  2809. s_ : short
  2810. ) : DWORD;
  2811. { $END }
  2812. { $IFDECL SetTextCharacterExtra $THEN BEGIN }
  2813. FUNCTION SetTextCharacterExtra (
  2814. h_ : HDC;
  2815. s_ : short
  2816. ) : short;
  2817. { $END }
  2818. { $IFDECL GetTextCharacterExtra $THEN BEGIN }
  2819. FUNCTION GetTextCharacterExtra (
  2820. h_ : HDC
  2821. ) : short;
  2822. { $END }
  2823. { $IFDECL GetMetaFile $THEN BEGIN }
  2824. FUNCTION GetMetaFile (
  2825. l_ : LPSTR
  2826. ) : HANDLE;
  2827. { $END }
  2828. { $IFDECL DeleteMetaFile $THEN BEGIN }
  2829. FUNCTION DeleteMetaFile (
  2830. h_ : HANDLE
  2831. ) : BOOL;
  2832. { $END }
  2833. { $IFDECL CopyMetaFile $THEN BEGIN }
  2834. FUNCTION CopyMetaFile (
  2835. h_ : HANDLE;
  2836. l_ : LPSTR
  2837. ) : HANDLE;
  2838. { $END }
  2839. { $IFDECL PlayMetaFileRecord $THEN BEGIN }
  2840. PROCEDURE PlayMetaFileRecord (
  2841. h_ : HDC;
  2842. i_ : LPHANDLETABLE;
  2843. j_ : LPMETARECORD;
  2844. w_ : WORD;
  2845. );
  2846. { $END }
  2847. { $IFDECL EnumMetaFile $THEN BEGIN }
  2848. FUNCTION EnumMetaFile (
  2849. h_ : HDC;
  2850. i_ : LOCALHANDLE;
  2851. f_ : FARPROC;
  2852. a_ ; ADS OF BYTE
  2853. ) : BOOL;
  2854. { $END }
  2855. { $IFDECL PlayMetaFile $THEN BEGIN }
  2856. FUNCTION PlayMetaFile (
  2857. h_ : HDC;
  2858. i_ : HANDLE
  2859. ) : BOOL;
  2860. { $END }
  2861. { $IFDECL Escape $THEN BEGIN }
  2862. FUNCTION Escape (
  2863. h_ : HDC;
  2864. s_,t_ : short;
  2865. l_,m_ : LPSTR
  2866. ) : short;
  2867. { $END }
  2868. { $IFDECL EnumFonts $THEN BEGIN }
  2869. FUNCTION EnumFonts (
  2870. h_ : HDC;
  2871. l_ : LPSTR;
  2872. f_ : FARPROC;
  2873. m_ : LPSTR
  2874. ) : short;
  2875. { $END }
  2876. { $IFDECL EnumObjects $THEN BEGIN }
  2877. FUNCTION EnumObjects (
  2878. h_ : HDC;
  2879. s_ : short;
  2880. f_ : FARPROC;
  2881. l_ : LPSTR
  2882. ) : short;
  2883. { $END }
  2884. { $IFDECL GetTextFace $THEN BEGIN }
  2885. FUNCTION GetTextFace (
  2886. h_ : HDC;
  2887. s_ : short;
  2888. l_ : LPSTR
  2889. ) : short;
  2890. { $END }
  2891. { $IFDECL GetTextMetrics $THEN BEGIN }
  2892. FUNCTION GetTextMetrics (
  2893. h_ : HDC;
  2894. l_ : LPTEXTMETRIC
  2895. ) : BOOL;
  2896. { $END }
  2897. { $IFDECL GetDeviceCaps $THEN BEGIN }
  2898. FUNCTION GetDeviceCaps (
  2899. h_ : HDC;
  2900. s_ : short
  2901. ) : short;
  2902. { $END }
  2903. { $IFDECL DeviceModes $THEN BEGIN }
  2904. FUNCTION DeviceModes (
  2905. h_ : HWND;
  2906. i_ : HANDLE;
  2907. l_,m_ : LPSTR
  2908. ) : LPSTR;
  2909. { $END }
  2910. { $IFDECL SetEnvironment $THEN BEGIN }
  2911. FUNCTION SetEnvironment (
  2912. l_,m_ : LPSTR;
  2913. w_ : WORD
  2914. ) : short;
  2915. { $END }
  2916. { $IFDECL GetEnvironment $THEN BEGIN }
  2917. FUNCTION GetEnvironment (
  2918. l_,m_ : LPSTR;
  2919. w_ : WORD
  2920. ) : short;
  2921. { $END }
  2922. { $IFDECL DPtoLP $THEN BEGIN }
  2923. FUNCTION DPtoLP (
  2924. h_ : HDC;
  2925. l_ : LPPOINT;
  2926. s_ : short
  2927. ) : BOOL;
  2928. { $END }
  2929. { $IFDECL LPtoDP $THEN BEGIN }
  2930. FUNCTION LPtoDP (
  2931. h_ : HDC;
  2932. l_ : LPPOINT;
  2933. s_ : short
  2934. ) : BOOL;
  2935. { $END }
  2936. (* Interface to the dynamic loader/linker *)
  2937. { $IFDECL GetVersion $THEN BEGIN }
  2938. FUNCTION GetVersion : WORD;
  2939. { $END }
  2940. { $IFDECL GetNumTasks $THEN BEGIN }
  2941. FUNCTION GetNumTasks : WORD;
  2942. { $END }
  2943. { $IFDECL GetCodeHandle $THEN BEGIN }
  2944. FUNCTION GetCodeHandle (
  2945. f_ : FARPROC
  2946. ) : HANDLE;
  2947. { $END }
  2948. { $IFDECL GetModuleHandle $THEN BEGIN }
  2949. FUNCTION GetModuleHandle (
  2950. l_ : LPSTR
  2951. ) : HANDLE;
  2952. { $END }
  2953. { $IFDECL GetModuleUsage $THEN BEGIN }
  2954. FUNCTION GetModuleUsage (
  2955. h_ : HANDLE
  2956. ) : int;
  2957. { $END }
  2958. { $IFDECL GetModuleFileName $THEN BEGIN }
  2959. FUNCTION GetModuleFileName (
  2960. h_ : HANDLE;
  2961. l_ : LPSTR;
  2962. i_ : int
  2963. ) : int;
  2964. { $END }
  2965. { $IFDECL GetInstanceData $THEN BEGIN }
  2966. FUNCTION GetInstanceData (
  2967. h_ : HANDLE;
  2968. n_ : NPSTR;
  2969. i_ : int
  2970. ) : int;
  2971. { $END }
  2972. { $IFDECL GetProcAddress $THEN BEGIN }
  2973. FUNCTION GetProcAddress (
  2974. h_ : HANDLE;
  2975. l_ : LPSTR
  2976. ) : FARPROC;
  2977. { $END }
  2978. { $IFDECL MakeProcInstance $THEN BEGIN }
  2979. FUNCTION MakeProcInstance (
  2980. f_ : FARPROC;
  2981. h_ : HANDLE
  2982. ) : FARPROC;
  2983. { $END }
  2984. { $IFDECL FreeProcInstance $THEN BEGIN }
  2985. PROCEDURE FreeProcInstance (
  2986. f_ : FARPROC
  2987. );
  2988. { $END }
  2989. { $IFDECL LoadLibrary $THEN BEGIN }
  2990. FUNCTION LoadLibrary (
  2991. l_ : LPSTR
  2992. ) : HANDLE;
  2993. { $END }
  2994. { $IFDECL FreeLibrary $THEN BEGIN }
  2995. FUNCTION FreeLibrary (
  2996. h_ : HANDLE
  2997. ) : HANDLE;
  2998. { $END }
  2999. { $IFDECL AnsiToOem $THEN BEGIN }
  3000. FUNCTION AnsiToOem (
  3001. l_,m_ : LPSTR
  3002. ) : BOOL;
  3003. { $END }
  3004. { $IFDECL OemToAnsi $THEN BEGIN }
  3005. FUNCTION OemToAnsi (
  3006. l_,m_ : LPSTR
  3007. ) : BOOL;
  3008. { $END }
  3009. { $IFDECL AnsiUpper $THEN BEGIN }
  3010. FUNCTION AnsiUpper (
  3011. l_ : LPSTR
  3012. ) : BYTE;
  3013. { $END }
  3014. { $IFDECL AnsiLower $THEN BEGIN }
  3015. FUNCTION AnsiLower (
  3016. l_ : LPSTR
  3017. ) : BYTE;
  3018. { $END }
  3019. { $IFDECL AnsiNext $THEN BEGIN }
  3020. FUNCTION AnsiNext (
  3021. l_ : LPSTR
  3022. ) : LPSTR;
  3023. { $END }
  3024. { $IFDECL AnsiPrev $THEN BEGIN }
  3025. FUNCTION AnsiPrev (
  3026. l_,m_ : LPSTR
  3027. ) : LPSTR;
  3028. { $END }
  3029. TYPE
  3030. OFSTRUCT = RECORD
  3031. cBytes : BYTE; (* length of structure *)
  3032. fFixedDisk : BYTE; (* non-zero if file located on non- *)
  3033. (* removeable media *)
  3034. nErrCode : WORD; (* DOS error code if OpenFile fails *)
  3035. reserved : ARRAY [0..3] OF BYTE;
  3036. szPathName : ARRAY [0..127] OF BYTE;
  3037. END;
  3038. POFSTRUCT = ADR OF OFSTRUCT;
  3039. NPOFSTRUCT = ADR OF OFSTRUCT;
  3040. LPOFSTRUCT = ADS OF OFSTRUCT;
  3041. { $IFDECL GetTempDrive $THEN BEGIN }
  3042. FUNCTION GetTempDrive (
  3043. b_ : BYTE
  3044. ) : BYTE;
  3045. { $END }
  3046. { $IFDECL GetTempFileName $THEN BEGIN }
  3047. FUNCTION GetTempFileName (
  3048. b_ : BYTE;
  3049. l_ : LPSTR;
  3050. w_ : WORD;
  3051. m_ : LPSTR
  3052. ) : int;
  3053. { $END }
  3054. { $IFDECL OpenFile $THEN BEGIN }
  3055. FUNCTION OpenFile (
  3056. l_ : LPSTR;
  3057. m_ : LPOFSTRUCT;
  3058. w_ : WORD
  3059. ) : int;
  3060. { $END }
  3061. (* Flags for GetTempFileName *)
  3062. CONST
  3063. TF_FORCEDRIVE = #80; (* Forces use of current dir of passed *)
  3064. (* drive *)
  3065. (* Flags for OpenFile *)
  3066. CONST
  3067. OF_REOPEN = #8000;
  3068. OF_EXIST = #4000;
  3069. OF_PROMPT = #2000;
  3070. OF_CREATE = #1000;
  3071. OF_CANCEL = #0800;
  3072. OF_VERIFY = #0400;
  3073. OF_DELETE = #0200;
  3074. OF_PARSE = #0100;
  3075. OF_READ = 0;
  3076. OF_WRITE = 1;
  3077. OF_READWRITE = 2;
  3078. (* Interface to global memory manager *)
  3079. GMEM_FIXED = #0000;
  3080. GMEM_MOVEABLE = #0002;
  3081. GMEM_NOCOMPACT = #0010;
  3082. GMEM_NODISCARD = #0020;
  3083. GMEM_ZEROINIT = #0040;
  3084. GMEM_MODIFY = #0080;
  3085. GMEM_DISCARDABLE = #0F00;
  3086. GHND = (GMEM_MOVEABLE OR GMEM_ZEROINIT);
  3087. GPTR = (GMEM_FIXED OR GMEM_ZEROINIT);
  3088. GMEM_SHARE = #2000;
  3089. GMEM_DDESHARE = #2000;
  3090. GMEM_LOWER = #1000;
  3091. GMEM_NOTIFY = #4000;
  3092. GMEM_NOT_BANKED = #1000;
  3093. { $IFDECL GlobalAlloc $THEN BEGIN }
  3094. FUNCTION GlobalAlloc (
  3095. w_ : WORD;
  3096. d_ : DWORD
  3097. ) : HANDLE;
  3098. { $END }
  3099. { $IFDECL GlobalCompact $THEN BEGIN }
  3100. FUNCTION GlobalCompact (
  3101. d_ : DWORD
  3102. ) : DWORD;
  3103. { $END }
  3104. { $IFDECL GlobalDiscard $THEN BEGIN }
  3105. FUNCTION GlobalDiscard (
  3106. h_ : HANDLE;
  3107. ) : HANDLE;
  3108. { $END }
  3109. { $IFDECL GlobalFree $THEN BEGIN }
  3110. FUNCTION GlobalFree (
  3111. h_ : HANDLE
  3112. ) : HANDLE;
  3113. { $END }
  3114. { $IFDECL GlobalHandle $THEN BEGIN }
  3115. FUNCTION GlobalHandle (
  3116. w_ : WORD
  3117. ) : DWORD;
  3118. { $END }
  3119. { $IFDECL GlobalLock $THEN BEGIN }
  3120. FUNCTION GlobalLock (
  3121. h_ : HANDLE
  3122. ) : LPSTR;
  3123. { $END }
  3124. { $IFDECL GlobalReAlloc $THEN BEGIN }
  3125. FUNCTION GlobalReAlloc (
  3126. h_ : HANDLE;
  3127. d_ : DWORD;
  3128. w_ : WORD
  3129. ) : HANDLE;
  3130. { $END }
  3131. { $IFDECL GlobalSize $THEN BEGIN }
  3132. FUNCTION GlobalSize (
  3133. h_ : HANDLE
  3134. ) : DWORD;
  3135. { $END }
  3136. { $IFDECL GlobalFlags $THEN BEGIN }
  3137. FUNCTION GlobalFlags (
  3138. h_ : HANDLE
  3139. ) : WORD;
  3140. { $END }
  3141. { $IFDECL GlobalWire $THEN BEGIN }
  3142. FUNCTION GlobalWire (
  3143. h_ : HANDLE
  3144. ) : LPSTR;
  3145. { $END }
  3146. { $IFDECL GlobalUnWire $THEN BEGIN }
  3147. FUNCTION GlobalUnWire (
  3148. h_ : HANDLE
  3149. ) : BOOL;
  3150. { $END }
  3151. { $IFDECL GlobalUnlock $THEN BEGIN }
  3152. FUNCTION GlobalUnlock (
  3153. h_ : HANDLE
  3154. ) : BOOL;
  3155. { $END }
  3156. { $IFDECL UnlockResource $THEN BEGIN }
  3157. FUNCTION UnlockResource ( h_ : HANDLE) : BOOL;
  3158. BEGIN
  3159. UnlockResource := GlobalUnlock(h_)
  3160. END;
  3161. { $END }
  3162. { $IFDECL GlobalLRUNewest $THEN BEGIN }
  3163. FUNCTION GlobalLRUNewest (
  3164. h_ : HANDLE
  3165. ) : HANDLE;
  3166. { $END }
  3167. { $IFDECL GlobalLRUOldest $THEN BEGIN }
  3168. FUNCTION GlobalLRUOldest (
  3169. h_ : HANDLE
  3170. ) : HANDLE;
  3171. { $END }
  3172. { $IFDECL GlobalNotify $THEN BEGIN }
  3173. PROCEDURE GlobalNotify (
  3174. l_ : LPSTR
  3175. );
  3176. { $END }
  3177. (* Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) *)
  3178. CONST
  3179. GMEM_DISCARDED = #4000;
  3180. GMEM_SWAPPED = #8000;
  3181. GMEM_LOCKCOUNT = #00FF;
  3182. { $IFDECL LockData $THEN BEGIN }
  3183. FUNCTION LockData (
  3184. i_ : int
  3185. ) : HANDLE;
  3186. { $END }
  3187. { $IFDECL UnlockData $THEN BEGIN }
  3188. FUNCTION UnlockData (
  3189. i_ : int
  3190. ) : HANDLE;
  3191. { $END }
  3192. { $IFDECL LockSegment $THEN BEGIN }
  3193. FUNCTION LockSegment (
  3194. w_ : WORD
  3195. ) : HANDLE;
  3196. { $END }
  3197. { $IFDECL UnlockSegment $THEN BEGIN }
  3198. FUNCTION UnlockSegment (
  3199. w_ : WORD
  3200. ) : HANDLE;
  3201. { $END }
  3202. (* Interface to local memory manager *)
  3203. CONST
  3204. LMEM_FIXED = #0000;
  3205. LMEM_MOVEABLE = #0002;
  3206. LMEM_NOCOMPACT = #0010;
  3207. LMEM_NODISCARD = #0020;
  3208. LMEM_ZEROINIT = #0040;
  3209. LMEM_MODIFY = #0080;
  3210. LMEM_DISCARDABLE = #0F00;
  3211. LHND = (LMEM_MOVEABLE OR LMEM_ZEROINIT);
  3212. LPTR = (LMEM_FIXED OR LMEM_ZEROINIT);
  3213. NONZEROLHND = (LMEM_MOVEABLE);
  3214. NONZEROLPTR = (LMEM_FIXED);
  3215. LNOTIFY_OUTOFMEM = 0;
  3216. LNOTIFY_MOVE = 1;
  3217. LNOTIFY_DISCARD = 2;
  3218. { $IFDECL LocalAlloc $THEN BEGIN }
  3219. FUNCTION LocalAlloc (
  3220. w_,x_ : WORD
  3221. ) : HANDLE;
  3222. { $END }
  3223. { $IFDECL LocalCompact $THEN BEGIN }
  3224. FUNCTION LocalCompact (
  3225. w_ : WORD
  3226. ) : WORD;
  3227. { $END }
  3228. { $IFDECL LocalDiscard $THEN BEGIN }
  3229. FUNCTION LocalDiscard (
  3230. h_ : HANDLE
  3231. ) : HANDLE;
  3232. { $END }
  3233. { $IFDECL LocalFree $THEN BEGIN }
  3234. FUNCTION LocalFree (
  3235. h_ : HANDLE
  3236. ) : HANDLE;
  3237. { $END }
  3238. { $IFDECL LocalHandle $THEN BEGIN }
  3239. FUNCTION LocalHandle (
  3240. w_ : WORD
  3241. ) : HANDLE;
  3242. { $END }
  3243. { $IFDECL LocalFreeze $THEN BEGIN }
  3244. PROCEDURE LocalFreeze (
  3245. i_ : int
  3246. );
  3247. { $END }
  3248. { $IFDECL LocalHandleDelta $THEN BEGIN }
  3249. FUNCTION LocalHandleDelta (
  3250. i_ : int
  3251. ) : int;
  3252. { $END }
  3253. { $IFDECL LocalInit $THEN BEGIN }
  3254. FUNCTION LocalInit (
  3255. w_ : WORD;
  3256. p_,q_ : PSTR
  3257. ) : BOOL;
  3258. { $END }
  3259. { $IFDECL LocalLock $THEN BEGIN }
  3260. FUNCTION LocalLock (
  3261. h_ : HANDLE
  3262. ) : PSTR;
  3263. { $END }
  3264. { $IFDECL LocalMelt $THEN BEGIN }
  3265. PROCEDURE LocalMelt (
  3266. i_ : int
  3267. );
  3268. { $END }
  3269. { $IFDECL LocalNotify $THEN BEGIN }
  3270. FUNCTION LocalNotify (
  3271. f_ : FARPROC
  3272. ) : FARPROC;
  3273. { $END }
  3274. { $IFDECL LocalReAlloc $THEN BEGIN }
  3275. FUNCTION LocalReAlloc (
  3276. h_ : HANDLE;
  3277. w_,x_ : WORD
  3278. ) : HANDLE;
  3279. { $END }
  3280. { $IFDECL LocalSize $THEN BEGIN }
  3281. FUNCTION LocalSize (
  3282. h_ : HANDLE
  3283. ) : WORD;
  3284. { $END }
  3285. { $IFDECL LocalUnlock $THEN BEGIN }
  3286. FUNCTION LocalUnlock (
  3287. h_ : HANDLE
  3288. ) : BOOL;
  3289. { $END }
  3290. { $IFDECL LocalFlags $THEN BEGIN }
  3291. FUNCTION LocalFlags (
  3292. h_ : HANDLE
  3293. ) : WORD;
  3294. { $END }
  3295. { $IFDECL LocalShrink $THEN BEGIN }
  3296. FUNCTION LocalShrink (
  3297. h_ : HANDLE;
  3298. w_ : WORD
  3299. ) : WORD;
  3300. { $END }
  3301. (* Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) *)
  3302. CONST
  3303. LMEM_DISCARDED = #4000;
  3304. LMEM_LOCKCOUNT = #00FF;
  3305. (* SetSwapAreaSize really returns 2 words -
  3306. lo word is Size actually set (or current size if you passed in 0)
  3307. hi word is Max size you can get
  3308. *)
  3309. { $IFDECL SetSwapAreaSize $THEN BEGIN }
  3310. FUNCTION SetSwapAreaSize (
  3311. w_ : WORD
  3312. ) : LONG;
  3313. { $END }
  3314. { $IFDECL ValidateFreeSpaces $THEN BEGIN }
  3315. FUNCTION ValidateFreeSpaces : LPSTR;
  3316. { $END }
  3317. { $IFDECL LimitEmsPages $THEN BEGIN }
  3318. PROCEDURE LimitEmsPages (
  3319. w_ : DWORD
  3320. );
  3321. { $END }
  3322. { $IFDECL SetErrorMode $THEN BEGIN }
  3323. FUNCTION SetErrorMode (
  3324. w_ : WORD
  3325. ) : BOOL;
  3326. { $END }
  3327. (* Interface to the resource manager *)
  3328. { $IFDECL FindResource $THEN BEGIN }
  3329. FUNCTION FindResource (
  3330. h_ : HANDLE;
  3331. l_,m_ : LPSTR
  3332. ) : HANDLE;
  3333. { $END }
  3334. { $IFDECL LoadResource $THEN BEGIN }
  3335. FUNCTION LoadResource (
  3336. h_,i_ : HANDLE
  3337. ) : HANDLE;
  3338. { $END }
  3339. { $IFDECL FreeResource $THEN BEGIN }
  3340. FUNCTION FreeResource (
  3341. h_ : HANDLE
  3342. ) : BOOL;
  3343. { $END }
  3344. { $IFDECL LockResource $THEN BEGIN }
  3345. FUNCTION LockResource (
  3346. h_ : HANDLE
  3347. ) : LPSTR;
  3348. { $END }
  3349. { $IFDECL SetResourceHandler $THEN BEGIN }
  3350. FUNCTION SetResourceHandler (
  3351. h_ : HANDLE;
  3352. l_ : LPSTR;
  3353. f_ : FARPROC
  3354. ) : FARPROC;
  3355. { $END }
  3356. { $IFDECL AllocResource $THEN BEGIN }
  3357. FUNCTION AllocResource (
  3358. h_,i_ : HANDLE;
  3359. d_ : DWORD
  3360. ) : HANDLE;
  3361. { $END }
  3362. { $IFDECL SizeofResource $THEN BEGIN }
  3363. FUNCTION SizeofResource (
  3364. h_,i_ : HANDLE
  3365. ) : WORD;
  3366. { $END }
  3367. { $IFDECL AccessResource $THEN BEGIN }
  3368. FUNCTION AccessResource (
  3369. h_,i_ : HANDLE
  3370. ) : int;
  3371. { $END }
  3372. { $IFDECL MAKEINTRESOURCE $THEN BEGIN }
  3373. FUNCTION MAKEINTRESOURCE (
  3374. i_ : int
  3375. ) : LPSTR;
  3376. { $END }
  3377. (* Predefined resource types *)
  3378. CONST
  3379. RT_CURSOR = RETYPE( LPSTR, BYLONG(0, 1) );
  3380. RT_BITMAP = RETYPE( LPSTR, BYLONG(0, 2) );
  3381. RT_ICON = RETYPE( LPSTR, BYLONG(0, 3) );
  3382. RT_MENU = RETYPE( LPSTR, BYLONG(0, 4) );
  3383. RT_DIALOG = RETYPE( LPSTR, BYLONG(0, 5) );
  3384. RT_STRING = RETYPE( LPSTR, BYLONG(0, 6) );
  3385. RT_FONTDIR = RETYPE( LPSTR, BYLONG(0, 7) );
  3386. RT_FONT = RETYPE( LPSTR, BYLONG(0, 8) );
  3387. RT_ACCELERATOR = RETYPE( LPSTR, BYLONG(0, 9) );
  3388. RT_RCDATA = RETYPE( LPSTR, BYLONG(0, 10) );
  3389. (* Interface to the task scheduler *)
  3390. { $IFDECL Yield $THEN BEGIN }
  3391. FUNCTION Yield : BOOL;
  3392. { $END }
  3393. { $IFDECL GetCurrentTask $THEN BEGIN }
  3394. FUNCTION GetCurrentTask : HANDLE;
  3395. { $END }
  3396. { $IFDECL SetPriority $THEN BEGIN }
  3397. FUNCTION SetPriority (
  3398. h_ : HANDLE;
  3399. i_ : int
  3400. ) : int;
  3401. { $END }
  3402. (* Interface to the atom manager *)
  3403. TYPE
  3404. ATOM = WORD;
  3405. { $IFDECL InitAtomTable $THEN BEGIN }
  3406. FUNCTION InitAtomTable (
  3407. i_ : int
  3408. ) : BOOL;
  3409. { $END }
  3410. { $IFDECL AddAtom $THEN BEGIN }
  3411. FUNCTION AddAtom (
  3412. l_ : LPSTR
  3413. ) : ATOM;
  3414. { $END }
  3415. { $IFDECL DeleteAtom $THEN BEGIN }
  3416. FUNCTION DeleteAtom (
  3417. a_ : ATOM
  3418. ) : ATOM;
  3419. { $END }
  3420. { $IFDECL FindAtom $THEN BEGIN }
  3421. FUNCTION FindAtom (
  3422. l_ : LPSTR
  3423. ) : ATOM;
  3424. { $END }
  3425. { $IFDECL GetAtomName $THEN BEGIN }
  3426. FUNCTION GetAtomName (
  3427. a_ : ATOM;
  3428. l_ : LPSTR;
  3429. i_ : int
  3430. ) : WORD;
  3431. { $END }
  3432. { $IFDECL GlobalAddAtom $THEN BEGIN }
  3433. FUNCTION GlobalAddAtom (
  3434. l_ : LPSTR
  3435. ) : ATOM;
  3436. { $END }
  3437. { $IFDECL GlobalDeleteAtom $THEN BEGIN }
  3438. FUNCTION GlobalDeleteAtom (
  3439. a_ : ATOM
  3440. ) : ATOM;
  3441. { $END }
  3442. { $IFDECL GlobalFindAtom $THEN BEGIN }
  3443. FUNCTION GlobalFindAtom (
  3444. l_ : LPSTR
  3445. ) : ATOM;
  3446. { $END }
  3447. { $IFDECL GlobalGetAtomName $THEN BEGIN }
  3448. FUNCTION GlobalGetAtomName (
  3449. a_ : ATOM;
  3450. l_ : LPSTR;
  3451. i_ : int
  3452. ) : WORD;
  3453. { $END }
  3454. { $IFDECL GetAtomHandle $THEN BEGIN }
  3455. FUNCTION GetAtomHandle (
  3456. a_ : ATOM
  3457. ) : HANDLE;
  3458. { $END }
  3459. { $IFDECL MAKEINTATOM $THEN BEGIN }
  3460. FUNCTION MAKEINTATOM (
  3461. i_ : int
  3462. ) : LPSTR;
  3463. { $END }
  3464. (* Interface to the user profile *)
  3465. { $IFDECL GetProfileInt $THEN BEGIN }
  3466. FUNCTION GetProfileInt (
  3467. l_,m_ : LPSTR;
  3468. i_ : int
  3469. ) : int;
  3470. { $END }
  3471. { $IFDECL GetProfileString $THEN BEGIN }
  3472. FUNCTION GetProfileString (
  3473. l_,m_,n_,o_ : LPSTR;
  3474. i_ : int
  3475. ) : int;
  3476. { $END }
  3477. { $IFDECL WriteProfileString $THEN BEGIN }
  3478. FUNCTION WriteProfileString (
  3479. l_,m_,n_ : LPSTR
  3480. ) : BOOL;
  3481. { $END }
  3482. (* Interface to FatalExit procedure *)
  3483. { $IFDECL FatalExit $THEN BEGIN }
  3484. PROCEDURE FatalExit (
  3485. i_ : int
  3486. );
  3487. { $END }
  3488. (* Interface to Catch and Throw procedures *)
  3489. TYPE
  3490. CATCHBUF = ARRAY [0..8] OF int;
  3491. LPCATCHBUF = ADS OF int;
  3492. { $IFDECL Catch $THEN BEGIN }
  3493. FUNCTION Catch (
  3494. l_ : LPCATCHBUF
  3495. ) : int;
  3496. { $END }
  3497. { $IFDECL Throw $THEN BEGIN }
  3498. PROCEDURE Throw (
  3499. l_ : LPCATCHBUF;
  3500. i_ : int
  3501. );
  3502. { $END }
  3503. { $IFDECL CreateMetaFile $THEN BEGIN }
  3504. FUNCTION CreateMetaFile (
  3505. l_ : LPSTR
  3506. ) : HANDLE;
  3507. { $END }
  3508. { $IFDECL CloseMetaFile $THEN BEGIN }
  3509. FUNCTION CloseMetaFile (
  3510. h_ : HANDLE
  3511. ) : HANDLE;
  3512. { $END }
  3513. { $IFDECL GetMetaFileBits $THEN BEGIN }
  3514. FUNCTION GetMetaFileBits (
  3515. h_ : HANDLE
  3516. ) : HANDLE;
  3517. { $END }
  3518. { $IFDECL SetMetaFileBits $THEN BEGIN }
  3519. FUNCTION SetMetaFileBits (
  3520. h_ : HANDLE
  3521. ) : HANDLE;
  3522. { $END }
  3523. { $IFDECL GetCurrentTime $THEN BEGIN }
  3524. FUNCTION GetCurrentTime : DWORD;
  3525. { $END }
  3526. { $IFDECL GetTickCount $THEN BEGIN }
  3527. FUNCTION GetTickCount : DWORD;
  3528. { $END }
  3529. { $IFDECL GetTimerResolution $THEN BEGIN }
  3530. FUNCTION GetTimerResolution : DWORD;
  3531. { $END }
  3532. { $IFDECL IsChild $THEN BEGIN }
  3533. FUNCTION IsChild (
  3534. h_,i_ : HWND
  3535. ) : BOOL;
  3536. { $END }
  3537. { $IFDECL GetWindowWord $THEN BEGIN }
  3538. FUNCTION GetWindowWord (
  3539. h_ : HWND;
  3540. i_ : int
  3541. ) : WORD;
  3542. { $END }
  3543. { $IFDECL SetWindowWord $THEN BEGIN }
  3544. FUNCTION SetWindowWord (
  3545. h_ : HWND;
  3546. i_ : int;
  3547. w_ : WORD
  3548. ) : WORD;
  3549. { $END }
  3550. { $IFDECL GetWindowLong $THEN BEGIN }
  3551. FUNCTION GetWindowLong (
  3552. h_ : HWND;
  3553. i_ : int
  3554. ) : LONG;
  3555. { $END }
  3556. { $IFDECL SetWindowLong $THEN BEGIN }
  3557. FUNCTION SetWindowLong (
  3558. h_ : HWND;
  3559. i_ : int;
  3560. l_ : LONG
  3561. ) : LONG;
  3562. { $END }
  3563. { $IFDECL GetClassWord $THEN BEGIN }
  3564. FUNCTION GetClassWord (
  3565. h_ : HWND;
  3566. i_ : int
  3567. ) : WORD;
  3568. { $END }
  3569. { $IFDECL SetClassWord $THEN BEGIN }
  3570. FUNCTION SetClassWord (
  3571. h_ : HWND;
  3572. i_ : int;
  3573. w_ : WORD
  3574. ) : WORD;
  3575. { $END }
  3576. { $IFDECL GetClassLong $THEN BEGIN }
  3577. FUNCTION GetClassLong (
  3578. h_ : HWND;
  3579. i_ : int
  3580. ) : LONG;
  3581. { $END }
  3582. { $IFDECL SetClassLong $THEN BEGIN }
  3583. FUNCTION SetClassLong (
  3584. h_ : HWND;
  3585. i_ : int;
  3586. l_ : LONG
  3587. ) : LONG;
  3588. { $END }
  3589. { $IFDECL GetParent $THEN BEGIN }
  3590. FUNCTION GetParent (
  3591. h_ : HWND
  3592. ) : HWND;
  3593. { $END }
  3594. { $IFDECL SetParent $THEN BEGIN }
  3595. FUNCTION SetParent (
  3596. h_,w_ : HWND
  3597. ) : HWND;
  3598. { $END }
  3599. { $IFDECL EnumChildWindows $THEN BEGIN }
  3600. FUNCTION EnumChildWindows (
  3601. h_ : HWND;
  3602. f_ : FARPROC;
  3603. l_ : LONG
  3604. ) : BOOL;
  3605. { $END }
  3606. { $IFDECL FindWindow $THEN BEGIN }
  3607. FUNCTION FindWindow (
  3608. l_,m_ : LPSTR
  3609. ) : HWND;
  3610. { $END }
  3611. { $IFDECL EnumWindows $THEN BEGIN }
  3612. FUNCTION EnumWindows (
  3613. f_ : FARPROC;
  3614. l_ : LONG
  3615. ) : BOOL;
  3616. { $END }
  3617. { $IFDECL EnumTaskWindows $THEN BEGIN }
  3618. FUNCTION EnumTaskWindows (
  3619. h_ : HANDLE;
  3620. f_ : FARPROC;
  3621. l_ : LONG
  3622. ) : BOOL;
  3623. { $END }
  3624. { $IFDECL GetClassName $THEN BEGIN }
  3625. FUNCTION GetClassName (
  3626. h_ : HWND;
  3627. l_ : LPSTR;
  3628. i_ : int
  3629. ) : int;
  3630. { $END }
  3631. { $IFDECL GetTopWindow $THEN BEGIN }
  3632. FUNCTION GetTopWindow (
  3633. h_ : HWND
  3634. ) : HWND;
  3635. { $END }
  3636. { $IFDECL GetNextWindow $THEN BEGIN }
  3637. FUNCTION GetNextWindow (
  3638. h_ : HWND;
  3639. W_ : WORD
  3640. ) : HWND;
  3641. { $END }
  3642. { $IFDECL GetWindowTask $THEN BEGIN }
  3643. FUNCTION GetWindowTask (
  3644. h_ : HWND
  3645. ) : HANDLE;
  3646. { $END }
  3647. (* GetWindow() and constants *)
  3648. { $IFDECL GetWindow $THEN BEGIN }
  3649. FUNCTION GetWindow (
  3650. h_ : HWND;
  3651. w_ : WORD
  3652. ) : HWND;
  3653. { $END }
  3654. { $IFDECL SetWindowsHook $THEN BEGIN }
  3655. FUNCTION SetWindowsHook (
  3656. i_ : int;
  3657. f_ : FARPROC
  3658. ) : FARPROC;
  3659. { $END }
  3660. { $IFDECL UnhookWindowsHook $THEN BEGIN }
  3661. FUNCTION UnhookWindowsHook (
  3662. i_ : int;
  3663. f_ : FARPROC
  3664. ) : BOOL;
  3665. { $END }
  3666. { $IFDECL DefHookProc $THEN BEGIN }
  3667. FUNCTION DefHookProc (
  3668. i_ : int;
  3669. w_ : WORD;
  3670. d_ : DWORD;
  3671. f_ : ADS OF FARPROC
  3672. ) : DWORD;
  3673. { $END }
  3674. (* Key conversion window *)
  3675. { $IFDECL CreateConvertWindow $THEN BEGIN }
  3676. FUNCTION CreateConvertWindow (
  3677. l_ : LPSTR;
  3678. h_ : HANDLE;
  3679. m_ : LPSTR
  3680. ) : HWND;
  3681. { $END }
  3682. { $IFDECL ShowConvertWindow $THEN BEGIN }
  3683. PROCEDURE ShowConvertWindow (
  3684. h_ : HWND;
  3685. b_ : BOOL
  3686. );
  3687. { $END }
  3688. { $IFDECL SetConvertWindowHeight $THEN BEGIN }
  3689. PROCEDURE SetConvertWindowHeight (
  3690. i_ : int
  3691. );
  3692. { $END }
  3693. { $IFDECL IsTwoByteCharPrefix $THEN BEGIN }
  3694. FUNCTION IsTwoByteCharPrefix (
  3695. i_ : INTEGER1
  3696. ) : BOOL;
  3697. { $END }
  3698. CONST
  3699. GW_HWNDFIRST = 0;
  3700. GW_HWNDLAST = 1;
  3701. GW_HWNDNEXT = 2;
  3702. GW_HWNDPREV = 3;
  3703. GW_OWNER = 4;
  3704. GW_CHILD = 5;
  3705. (* Menu flags for Add/Check/EnableMenuItem *)
  3706. MF_CHANGE = #0080;
  3707. MF_INSERT = #0000;
  3708. MF_APPEND = #0100;
  3709. MF_DELETE = #0200;
  3710. MF_BYPOSITION = #0400;
  3711. MF_SEPARATOR = #0800;
  3712. MF_REMOVE = #1000;
  3713. MF_BYCOMMAND = #0000;
  3714. MF_GRAYED = #0001;
  3715. MF_DISABLED = #0002;
  3716. MF_ENABLED = #0000;
  3717. MF_CHECKED = #0008;
  3718. MF_UNCHECKED = #0000;
  3719. MF_BITMAP = #0004;
  3720. MF_STRING = #0000;
  3721. MF_POPUP = #0010;
  3722. MF_MENUBARBREAK = #0020;
  3723. MF_MENUBREAK = #0040;
  3724. MF_HILITE = #0080;
  3725. MF_UNHILITE = #0000;
  3726. MF_HELP = #4000;
  3727. MF_SYSMENU = #2000;
  3728. MF_MOUSESELECT = #8000;
  3729. (* System Menu Command Values *)
  3730. SC_SIZE = #f000;
  3731. SC_MOVE = #f010;
  3732. SC_MINIMIZE = #f020;
  3733. SC_MAXIMIZE = #f030;
  3734. SC_NEXTWINDOW = #f040;
  3735. SC_PREVWINDOW = #f050;
  3736. SC_CLOSE = #f060;
  3737. SC_VSCROLL = #f070;
  3738. SC_HSCROLL = #f080;
  3739. SC_MOUSEMENU = #f090;
  3740. SC_KEYMENU = #f100;
  3741. SC_ARRANGE = #F110;
  3742. SC_RESTORE = #F120;
  3743. SC_ICON = SC_MINIMIZE;
  3744. SC_ZOOM = SC_MAXIMIZE;
  3745. (* Resource loading routines *)
  3746. { $IFDECL LoadBitmap $THEN BEGIN }
  3747. FUNCTION LoadBitmap (
  3748. h_ : HANDLE;
  3749. l_ : LPSTR
  3750. ) : HBITMAP;
  3751. { $END }
  3752. { $IFDECL LoadCursor $THEN BEGIN }
  3753. FUNCTION LoadCursor (
  3754. h_ : HANDLE;
  3755. l_ : LPSTR
  3756. ) : HCURSOR;
  3757. { $END }
  3758. (* Standard cursor IDs *)
  3759. CONST
  3760. IDC_ARROW = RETYPE( LPSTR, BYLONG(0,32512) );
  3761. IDC_IBEAM = RETYPE( LPSTR, BYLONG(0,32513) );
  3762. IDC_WAIT = RETYPE( LPSTR, BYLONG(0,32514) );
  3763. IDC_CROSS = RETYPE( LPSTR, BYLONG(0,32515) );
  3764. IDC_UPARROW = RETYPE( LPSTR, BYLONG(0,32516) );
  3765. IDC_SIZE = RETYPE( LPSTR, BYLONG(0,32640) );
  3766. IDC_ICON = RETYPE( LPSTR, BYLONG(0,32641) );
  3767. IDC_SIZENWSE = RETYPE( LPSTR, BYLONG(0,32642) );
  3768. IDC_SIZENESW = RETYPE( LPSTR, BYLONG(0,32643) );
  3769. IDC_SIZEWE = RETYPE( LPSTR, BYLONG(0,32644) );
  3770. IDC_SIZENS = RETYPE( LPSTR, BYLONG(0,32645) );
  3771. { $IFDECL LoadIcon $THEN BEGIN }
  3772. FUNCTION LoadIcon (
  3773. h_ : HANDLE;
  3774. l_ : LPSTR
  3775. ) : HICON;
  3776. { $END }
  3777. (* Standard icon IDs *)
  3778. CONST
  3779. IDI_APPLICATION = RETYPE( LPSTR, BYLONG(0,32512) );
  3780. IDI_HAND = RETYPE( LPSTR, BYLONG(0,32513) );
  3781. IDI_QUESTION = RETYPE( LPSTR, BYLONG(0,32514) );
  3782. IDI_EXCLAMATION = RETYPE( LPSTR, BYLONG(0,32515) );
  3783. IDI_ASTERISK = RETYPE( LPSTR, BYLONG(0,32516) );
  3784. { $IFDECL LoadMenu $THEN BEGIN }
  3785. FUNCTION LoadMenu (
  3786. h_ : HANDLE;
  3787. l_ : LPSTR
  3788. ) : HMENU;
  3789. { $END }
  3790. { $IFDECL LoadMenuIndirect $THEN BEGIN }
  3791. FUNCTION LoadMenuIndirect (
  3792. l_ : LPSTR
  3793. ) : HMENU;
  3794. { $END }
  3795. { $IFDECL LoadString $THEN BEGIN }
  3796. FUNCTION LoadString (
  3797. h_ : HANDLE;
  3798. w_ : WORD;
  3799. l_ : LPSTR;
  3800. i_ : int
  3801. ) : int;
  3802. { $END }
  3803. { $IFDECL AddFontResource $THEN BEGIN }
  3804. FUNCTION AddFontResource (
  3805. l_ : LPSTR
  3806. ) : short;
  3807. { $END }
  3808. { $IFDECL RemoveFontResource $THEN BEGIN }
  3809. FUNCTION RemoveFontResource (
  3810. l_ : LPSTR
  3811. ) : BOOL;
  3812. { $END }
  3813. CONST
  3814. CP_HWND = 0;
  3815. CP_OPEN = 1;
  3816. CP_DIRECT = 2;
  3817. (* VK from the keyboard driver *)
  3818. VK_KANA = #15;
  3819. VK_ROMAJI = #16;
  3820. VK_ZENKAKU = #17;
  3821. VK_HIRAGANA = #18;
  3822. VK_KANJI = #19;
  3823. (* VK to send to Applications *)
  3824. VK_CONVERT = #1C;
  3825. VK_NONCONVERT = #1D;
  3826. VK_ACCEPT = #1E;
  3827. VK_MODECHANGE = #1F;
  3828. (* Conversion function numbers *)
  3829. KNJ_START = #01;
  3830. KNJ_END = #02;
  3831. KNJ_QUERY = #03;
  3832. KNJ_LEARN_MODE = #10;
  3833. KNJ_GETMODE = #11;
  3834. KNJ_SETMODE = #12;
  3835. KNJ_CODECONVERT = #20;
  3836. KNJ_CONVERT = #21;
  3837. KNJ_NEXT = #22;
  3838. KNJ_PREVIOUS = #23;
  3839. KNJ_ACCEPT = #24;
  3840. KNJ_LEARN = #30;
  3841. KNJ_REGISTER = #31;
  3842. KNJ_REMOVE = #32;
  3843. KNJ_CHANGE_UDIC = #33;
  3844. (* note: DEFAULT = 0
  3845. JIS1 = 1
  3846. JIS2 = 2
  3847. SJIS2 = 3
  3848. JIS1KATAKANA = 4
  3849. SJIS2HIRAGANA = 5
  3850. SJIS2KATAKANA = 6
  3851. OEM = F
  3852. *)
  3853. KNJ_JIS1toJIS1KATAKANA = #14;
  3854. KNJ_JIS1toSJIS2 = #13;
  3855. KNJ_JIS1toSJIS2HIRAGANA = #15;
  3856. KNJ_JIS1toSJIS2KATAKANA = #16;
  3857. KNJ_JIS1toDEFAULT = #10;
  3858. KNJ_JIS1toSJIS2OEM = #1F;
  3859. KNJ_JIS2toSJIS2 = #23;
  3860. KNJ_SJIS2toJIS2 = #32;
  3861. (* see KNJ_GETMODE for definition *)
  3862. KNJ_MD_ALPHA = #01;
  3863. KNJ_MD_HIRAGANA = #02;
  3864. KNJ_MD_HALF = #04;
  3865. KNJ_MD_JIS = #08;
  3866. KNJ_MD_SPECIAL = #10;
  3867. (* conversion modes, low word of lParam when VK_CONVERT is sent to the app *)
  3868. KNJ_CVT_NEXT = #01;
  3869. KNJ_CVT_PREV = #02;
  3870. KNJ_CVT_KATAKANA = #03;
  3871. KNJ_CVT_HIRAGANA = #04;
  3872. KNJ_CVT_JIS1 = #05;
  3873. KNJ_CVT_SJIS2 = #06;
  3874. KNJ_CVT_DEFAULT = #07;
  3875. KNJ_CVT_TYPED = #08;
  3876. (* WM_YOMICHAR = #0108;
  3877. WM_CONVERTREQUEST = #010A;
  3878. WM_CONVERTRESULT = #010B; Previously defined constants.
  3879. *)
  3880. TYPE
  3881. KANJISTRUCT = RECORD
  3882. fnc : short;
  3883. wParam : short;
  3884. lpSource : LPSTR;
  3885. lpdest : LPSTR;
  3886. wCount : short;
  3887. lpReserved1 : LPSTR;
  3888. lpReserved2 : LPSTR;
  3889. END;
  3890. LPKANJISTRUCT = ADS OF KANJISTRUCT;
  3891. { $IFDECL MoveConvertWindow $THEN BEGIN }
  3892. PROCEDURE MoveConvertWindow (
  3893. s_,t_ : short
  3894. );
  3895. { $END }
  3896. { $IFDECL ConvertRequest $THEN BEGIN }
  3897. FUNCTION ConvertRequest (
  3898. h_ : HWND;
  3899. l_ : LPKANJISTRUCT
  3900. ) : short;
  3901. { $END }
  3902. { $IFDECL SetConvertParams $THEN BEGIN }
  3903. FUNCTION SetConvertParams (
  3904. s_,t_ : short
  3905. ) : BOOL;
  3906. { $END }
  3907. { $IFDECL SetConvertHook $THEN BEGIN }
  3908. PROCEDURE SetConvertHook (
  3909. b_ : BOOL
  3910. );
  3911. { $END }
  3912. (* Conventional dialog box and message box command IDs *)
  3913. CONST
  3914. IDOK = 1;
  3915. IDCANCEL = 2;
  3916. IDABORT = 3;
  3917. IDRETRY = 4;
  3918. IDIGNORE = 5;
  3919. IDYES = 6;
  3920. IDNO = 7;
  3921. (* Control manager structures & definitions *)
  3922. (* Edit control class stuff *)
  3923. (* styles *)
  3924. ES_LEFT = BYLONG(0,0);
  3925. ES_CENTER = BYLONG(0,1);
  3926. ES_RIGHT = BYLONG(0,2);
  3927. ES_MULTILINE = BYLONG(0,4);
  3928. ES_AUTOVSCROLL = BYLONG(0,64);
  3929. ES_AUTOHSCROLL = BYLONG(0,128);
  3930. ES_NOHIDESEL = BYLONG(0,256);
  3931. (* notification codes *)
  3932. EN_SETFOCUS_ = #0100;
  3933. EN_KILLFOCUS_ = #0200;
  3934. EN_CHANGE = #0300;
  3935. EN_UPDATE = #0400;
  3936. EN_ERRSPACE = #0500;
  3937. EN_HSCROLL = #0601;
  3938. EN_VSCROLL = #0602;
  3939. (* control messages: *)
  3940. EM_GETSEL = WM_USER+0;
  3941. EM_SETSEL = WM_USER+1;
  3942. EM_GETRECT = WM_USER+2;
  3943. EM_SETRECT = WM_USER+3;
  3944. EM_SETRECTNP = WM_USER+4;
  3945. EM_SCROLL = WM_USER+5;
  3946. EM_LINESCROLL = WM_USER+6;
  3947. EM_GETMODIFY = WM_USER+8;
  3948. EM_SETMODIFY = WM_USER+9;
  3949. EM_GETLINECOUNT = WM_USER+10;
  3950. EM_LINEINDEX = WM_USER+11;
  3951. EM_SETHANDLE = WM_USER+12;
  3952. EM_GETHANDLE = WM_USER+13;
  3953. EM_GETTHUMB = WM_USER+14;
  3954. EM_LINELENGTH = WM_USER+17;
  3955. EM_REPLACESEL = WM_USER+18;
  3956. EM_SETFONT = WM_USER+19;
  3957. EM_GETLINE = WM_USER+20;
  3958. EM_LIMITTEXT = WM_USER+21;
  3959. EM_CANUNDO = WM_USER+22;
  3960. EM_UNDO = WM_USER+23;
  3961. EM_FMTLINES = WM_USER+24;
  3962. EM_LINEFROMCHAR = WM_USER+25;
  3963. EM_SETWORDBREAK = WM_USER+26;
  3964. (* button control styles *)
  3965. BS_PUSHBUTTON = BYLONG(0,0);
  3966. BS_DEFPUSHBUTTON = BYLONG(0,1);
  3967. BS_CHECKBOX = BYLONG(0,2);
  3968. BS_AUTOCHECKBOX = BYLONG(0,3);
  3969. BS_RADIOBUTTON = BYLONG(0,4);
  3970. BS_3STATE = BYLONG(0,5);
  3971. BS_AUTO3STATE = BYLONG(0,6);
  3972. BS_GROUPBOX = BYLONG(0,7);
  3973. BS_USERBUTTON = BYLONG(0,8);
  3974. BS_AUTORADIOBUTTON = BYLONG(0,9);
  3975. BS_PUSHBOX = BYLONG(0,10);
  3976. BS_LEFTTEXT = BYLONG(0,20);
  3977. (* user button notification codes *)
  3978. BN_CLICKED = 0;
  3979. BN_PAINT = 1;
  3980. BN_HILITE = 2;
  3981. BN_UNHILITE = 3;
  3982. BN_DISABLE = 4;
  3983. BN_DOUBLECLICKED = 5;
  3984. (* control messages *)
  3985. BM_GETCHECK = WM_USER+0;
  3986. BM_SETCHECK = WM_USER+1;
  3987. BM_GETSTATE = WM_USER+2;
  3988. BM_SETSTATE = WM_USER+3;
  3989. BM_SETSTYLE = WM_USER+4;
  3990. (* Static control constants *)
  3991. SS_LEFT = BYLONG(0,0);
  3992. SS_CENTER = BYLONG(0,1);
  3993. SS_RIGHT = BYLONG(0,2);
  3994. SS_ICON = BYLONG(0,3);
  3995. SS_BLACKRECT = BYLONG(0,4);
  3996. SS_GRAYRECT = BYLONG(0,5);
  3997. SS_WHITERECT = BYLONG(0,6);
  3998. SS_BLACKFRAME = BYLONG(0,7);
  3999. SS_GRAYFRAME = BYLONG(0,8);
  4000. SS_WHITEFRAME = BYLONG(0,9);
  4001. SS_USERITEM = BYLONG(0,10);
  4002. SS_SIMPLE = BYLONG(0,11);
  4003. SS_NOPREFIX = BYLONG(0,128);
  4004. (* 0x80 - don't do "&" character translation *)
  4005. (* Dialog manager routines *)
  4006. { $IFDECL IsDialogMessage $THEN BEGIN }
  4007. FUNCTION IsDialogMessage (
  4008. h_ : HWND;
  4009. l_ : LPMSG
  4010. ) : BOOL;
  4011. { $END }
  4012. { $IFDECL MapDialogRect $THEN BEGIN }
  4013. PROCEDURE MapDialogRect (
  4014. h_ : HWND;
  4015. l_ : LPRECT
  4016. );
  4017. { $END }
  4018. { $IFDECL DlgDirList $THEN BEGIN }
  4019. FUNCTION DlgDirList (
  4020. h_ : HWND;
  4021. l_ : LPSTR;
  4022. i_,j_ : int;
  4023. w_ : WORD
  4024. ) : int;
  4025. { $END }
  4026. { $IFDECL DlgDirSelect $THEN BEGIN }
  4027. FUNCTION DlgDirSelect (
  4028. h_ : HWND;
  4029. l_ : LPSTR;
  4030. i_ : int
  4031. ) : BOOL;
  4032. { $END }
  4033. (* Dialog style bits *)
  4034. CONST
  4035. DS_ABSALIGN = #000000001;
  4036. DS_SYSMODAL = #000000002;
  4037. DS_LOCALEDIT = #000000020; (* Edit items get Local storage. *)
  4038. DM_GETDEFID = WM_USER+0;
  4039. DM_SETDEFID = WM_USER+1;
  4040. DC_HASDEFID = #534B;
  4041. (* Dialog codes (returned by WM_GETDLGCODE message) *)
  4042. DLGC_WANTARROWS = #0001; (* control wants arrow keys *)
  4043. DLGC_WANTTAB = #0002; (* control wants tab keys *)
  4044. DLGC_WANTALLKEYS = #0004; (* control wants all keys *)
  4045. DLGC_HASSETSEL = #0008; (* understands EM_SETSEL message *)
  4046. DLGC_WANTMESSAGE = #0004; (* pass message to control *)
  4047. DLGC_DEFPUSHBUTTON = #0010; (* Default pushbutton *)
  4048. DLGC_UNDEFPUSHBUTTON = #0020; (* Non-default pushbutton *)
  4049. DLGC_RADIOBUTTON = #0040; (* radio button *)
  4050. DLGC_WANTCHARS = #0080; (* Want WM_CHAR messages *)
  4051. DLGC_STATIC = #0100; (* Static item: don't include *)
  4052. DLGC_BUTTON = #2000; (* Button item: can be checked *)
  4053. LB_CTLCODE = BYLONG(0,0);
  4054. (* Listbox control return values *)
  4055. LB_OKAY = 0;
  4056. LB_ERR = -1;
  4057. LB_ERRSPACE = -2;
  4058. (* listbox notification codes *)
  4059. LBN_ERRSPACE = -2;
  4060. LBN_SELCHANGE = 1;
  4061. LBN_DBLCLK = 2;
  4062. (* listbox messages *)
  4063. LB_ADDSTRING = 1+WM_USER;
  4064. LB_INSERTSTRING = 2+WM_USER;
  4065. LB_DELETESTRING = 3+WM_USER;
  4066. LB_REPLACESTRING = 4+WM_USER;
  4067. LB_RESETCONTENT = 5+WM_USER;
  4068. LB_SETSEL = 6+WM_USER;
  4069. LB_SETCURSEL = 7+WM_USER;
  4070. LB_GETSEL = 8+WM_USER;
  4071. LB_GETCURSEL = 9+WM_USER;
  4072. LB_GETTEXT = 10+WM_USER;
  4073. LB_GETTEXTLEN = 11+WM_USER;
  4074. LB_GETCOUNT = 12+WM_USER;
  4075. LB_SELECTSTRING = 13+WM_USER;
  4076. LB_DIR = 14+WM_USER;
  4077. LB_GETTOPINDEX = 15+WM_USER;
  4078. LB_MSGMAX = 16+WM_USER;
  4079. (* listbox style bits *)
  4080. LBS_NOTIFY = #00000001;
  4081. LBS_SORT = #00000002;
  4082. LBS_NOREDRAW = #00000004;
  4083. LBS_MULTIPLESEL = #00000008;
  4084. LBS_STANDARD = #00A00003; (*LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER *)
  4085. (* scroll bar styles *)
  4086. SBS_HORZ = #00000000;
  4087. SBS_VERT = #00000001;
  4088. SBS_TOPALIGN = #00000002;
  4089. SBS_LEFTALIGN = #00000002;
  4090. SBS_BOTTOMALIGN = #00000004;
  4091. SBS_RIGHTALIGN = #00000004;
  4092. SBS_SIZEBOXTOPLEFTALIGN = #00000002;
  4093. SBS_SIZEBOXBOTTOMRIGHTALIGN = #00000004;
  4094. SBS_SIZEBOX = #00000008;
  4095. { $IFDECL OpenSound $THEN BEGIN }
  4096. FUNCTION OpenSound : int;
  4097. { $END }
  4098. { $IFDECL CloseSound $THEN BEGIN }
  4099. FUNCTION CloseSound : int;
  4100. { $END }
  4101. { $IFDECL SetVoiceQueueSize $THEN BEGIN }
  4102. FUNCTION SetVoiceQueueSize (
  4103. i_,j_ : int
  4104. ) : int;
  4105. { $END }
  4106. { $IFDECL SetVoiceNote $THEN BEGIN }
  4107. FUNCTION SetVoiceNote (
  4108. i_,j_,k_,l_ : int
  4109. ) : int;
  4110. { $END }
  4111. { $IFDECL SetVoiceAccent $THEN BEGIN }
  4112. FUNCTION SetVoiceAccent (
  4113. i_,j_,k_,l_,m_ : int
  4114. ) : int;
  4115. { $END }
  4116. { $IFDECL SetVoiceEnvelope $THEN BEGIN }
  4117. FUNCTION SetVoiceEnvelope (
  4118. i_,j_,k_ : int
  4119. ) : int;
  4120. { $END }
  4121. { $IFDECL SetSoundNoise $THEN BEGIN }
  4122. FUNCTION SetSoundNoise (
  4123. i_,j_ : int
  4124. ) : int;
  4125. { $END }
  4126. { $IFDECL SetVoiceSound $THEN BEGIN }
  4127. FUNCTION SetVoiceSound (
  4128. i_,j_,k_ : int
  4129. ) : int;
  4130. { $END }
  4131. { $IFDECL StartSound $THEN BEGIN }
  4132. FUNCTION StartSound : int;
  4133. { $END }
  4134. { $IFDECL StopSound $THEN BEGIN }
  4135. FUNCTION StopSound : int;
  4136. { $END }
  4137. { $IFDECL WaitSoundState $THEN BEGIN }
  4138. FUNCTION WaitSoundState (
  4139. i_ : int
  4140. ) : int;
  4141. { $END }
  4142. { $IFDECL SyncAllVoices $THEN BEGIN }
  4143. FUNCTION SyncAllVoices : int;
  4144. { $END }
  4145. { $IFDECL CountVoiceNotes $THEN BEGIN }
  4146. FUNCTION CountVoiceNotes (
  4147. i_ : int
  4148. ) : int;
  4149. { $END }
  4150. { $IFDECL GetThresholdEvent $THEN BEGIN }
  4151. FUNCTION GetThresholdEvent : LPINT;
  4152. { $END }
  4153. { $IFDECL GetThresholdStatus $THEN BEGIN }
  4154. FUNCTION GetThresholdStatus : int;
  4155. { $END }
  4156. { $IFDECL SetVoiceThreshold $THEN BEGIN }
  4157. FUNCTION SetVoiceThreshold (
  4158. i_,j_ : int
  4159. ) : int;
  4160. { $END }
  4161. (* constants used to specify return condition for WaitSoundState *)
  4162. CONST
  4163. QUEUEEMPTY = 0;
  4164. THRESHOLD = 1;
  4165. ALLTHRESHOLD = 2;
  4166. (* constants used to specify accent mode *)
  4167. S_NORMAL = 0;
  4168. S_LEGATO = 1;
  4169. S_STACCATO = 2;
  4170. (* constants used to specify source in SetSoundNoise *)
  4171. S_PERIOD512 = 0 (* freq = N/512 high pitch, less coarse hiss *);
  4172. S_PERIOD1024 = 1 (* freq = N/1024 *);
  4173. S_PERIOD2048 = 2 (* freq = N/2048 low pitch, more coarse hiss *);
  4174. S_PERIODVOICE = 3 (* source is frequency from voice channel (3) *);
  4175. S_WHITE512 = 4 (* freq = N/512 high pitch, less coarse hiss *);
  4176. S_WHITE1024 = 5 (* freq = N/1024 *);
  4177. S_WHITE2048 = 6 (* freq = N/2048 low pitch, more coarse hiss *);
  4178. S_WHITEVOICE = 7 (* source is frequency from voice channel (3) *);
  4179. S_SERDVNA = -1 (* device not available *);
  4180. S_SEROFM = -2 (* out of memory *);
  4181. S_SERMACT = -3 (* music active *);
  4182. S_SERQFUL = -4 (* queue full *);
  4183. S_SERBDNT = -5 (* invalid note *);
  4184. S_SERDLN = -6 (* invalid note length *);
  4185. S_SERDCC = -7 (* invalid note count *);
  4186. S_SERDTP = -8 (* invalid tempo *);
  4187. S_SERDVL = -9 (* invalid volume *);
  4188. S_SERDMD = -10 (* invalid mode *);
  4189. S_SERDSH = -11 (* invalid shape *);
  4190. S_SERDPT = -12 (* invalid pitch *);
  4191. S_SERDFQ = -13 (* invalid frequency *);
  4192. S_SERDDR = -14 (* invalid duration *);
  4193. S_SERDSR = -15 (* invalid source *);
  4194. S_SERDST = -16 (* invalid state *);
  4195. (*************************************************************************
  4196. **
  4197. ** dcb field definitions.
  4198. **
  4199. *************************************************************************)
  4200. NOPARITY = 0;
  4201. ODDPARITY = 1;
  4202. EVENPARITY = 2;
  4203. MARKPARITY = 3;
  4204. SPACEPARITY = 4;
  4205. ONESTOPBIT = 0;
  4206. ONE5STOPBITS = 1;
  4207. TWOSTOPBITS = 2;
  4208. IGNORE = 0 (* Ignore signal *);
  4209. INFINITE = #ffff (* Infinite timeout *);
  4210. (*************************************************************************
  4211. **
  4212. ** Comm Device Driver Error Bits.
  4213. **
  4214. *************************************************************************)
  4215. CE_RXOVER = #0001 (* Receive Queue overflow *);
  4216. CE_OVERRUN = #0002 (* Receive Overrun Error *);
  4217. CE_RXPARITY = #0004 (* Receive Parity Error *);
  4218. CE_FRAME = #0008 (* Receive Framing error *);
  4219. CE_BREAK = #0010 (* Break Detected *);
  4220. CE_CTSTO = #0020 (* CTS Timeout *);
  4221. CE_DSRTO = #0040 (* DSR Timeout *);
  4222. CE_RLSDTO = #0080 (* RLSD Timeout *);
  4223. CE_TXFULL = #0100 (* TX QUEUE IS FULL *);
  4224. CE_PTO = #0200 (* LPTx Timeout *);
  4225. CE_IOE = #0400 (* LPTx I/O Error *);
  4226. CE_DNS = #0800 (* LPTx Device not selected *);
  4227. CE_OOP = #1000 (* LPTx Out-Of-Paper *);
  4228. CE_MODE = #8000 (* Requested mode unsupported *);
  4229. (*************************************************************************
  4230. **
  4231. ** Initialization Error Codes
  4232. **
  4233. *************************************************************************)
  4234. IE_BADID = -1 (* Invalid or unsupported id *);
  4235. IE_OPEN = -2 (* Device Already Open *);
  4236. IE_NOPEN = -3 (* Device Not Open *);
  4237. IE_MEMORY = -4 (* Unable to allocate queues *);
  4238. IE_DEFAULT = -5 (* Error in default parameters *);
  4239. IE_HARDWARE = -10 (* Hardware Not Present *);
  4240. IE_BYTESIZE = -11 (* Illegal Byte Size *);
  4241. IE_BAUDRATE = -12 (* Unsupported BaudRate *);
  4242. (*************************************************************************
  4243. **
  4244. ** Event Definitions
  4245. **
  4246. *************************************************************************)
  4247. EV_RXCHAR = #0001 (* Any Character received *);
  4248. EV_RXFLAG = #0002 (* Received certain INTEGER1acter *);
  4249. EV_TXEMPTY = #0004 (* Transmitt Queue Empty *);
  4250. EV_CTS = #0008 (* CTS changed state *);
  4251. EV_DSR = #0010 (* DSR changed state *);
  4252. EV_RLSD = #0020 (* RLSD changed state *);
  4253. EV_BREAK = #0040 (* BREAK received *);
  4254. EV_ERR = #0080 (* Line status error occurred *);
  4255. EV_RING = #0100 (* Ring signal detected *);
  4256. EV_PERR = #0200 (* Printer error occured *);
  4257. (*************************************************************************
  4258. **
  4259. ** Escape Functions
  4260. **
  4261. *************************************************************************)
  4262. SETXOFF = 1 (* Simulate XOFF received *);
  4263. SETXON = 2 (* Simulate XON received *);
  4264. SETRTS = 3 (* Set RTS high *);
  4265. CLRRTS = 4 (* Set RTS low *);
  4266. SETDTR = 5 (* Set DTR high *);
  4267. CLRDTR = 6 (* Set DTR low *);
  4268. RESETDEV = 7 (* Reset device if possible *);
  4269. (*************************************************************************
  4270. **
  4271. ** Device Descriptor Block Definition
  4272. **
  4273. *************************************************************************)
  4274. LPTx = #80 (* Set if ID is for LPT device *);
  4275. (* Bitfield locators for 'bitField1' in DCB record type *)
  4276. fBinary = 1;
  4277. fRtsDisable = 2;
  4278. fParity = 4;
  4279. fOutxCtsFlow = 8;
  4280. fOutxDsrFlow = 16;
  4281. fDtrDisable = 128;
  4282. (* Bitfield locators for 'bitField2' in DCB record type *)
  4283. fOutX = 1;
  4284. fInX = 2;
  4285. fPeChar = 4;
  4286. fNull = 8;
  4287. fChEvt = 16;
  4288. fDtrflow = 32;
  4289. fRtsflow = 64;
  4290. TYPE
  4291. DCB = RECORD
  4292. Id : BYTE; (* Internal Device ID *)
  4293. BaudRate : WORD; (* Baudrate at which runing *)
  4294. ByteSize : BYTE; (* Number of bits/byte, 4-8 *)
  4295. Parity : BYTE; (* 0-4=None,Odd,Even,Mark,Space *)
  4296. StopBits : BYTE; (* 0,1,2 = 1, 1.5, 2 *)
  4297. RlsTimeout : WORD; (* Timeout for RLSD to be set *)
  4298. CtsTimeout : WORD; (* Timeout for CTS to be set *)
  4299. DsrTimeout : WORD; (* Timeout for DSR to be set *)
  4300. bitField1 : BYTE;
  4301. (* Packed bits. Access with constants defined above.
  4302. * BYTE fBinary: 1; - Binary Mode (skip EOF check)
  4303. * BYTE fRtsDisable:1; - Don't assert RTS at init time
  4304. * BYTE fParity: 1; - Enable parity checking
  4305. * BYTE fOutxCtsFlow:1; - CTS handshaking on output
  4306. * BYTE fOutxDsrFlow:1; - DSR handshaking on output
  4307. * BYTE fDummy: 2; - Reserved
  4308. * BYTE fDtrDisable:1; - Don't assert DTR at init time
  4309. *)
  4310. bitField2 : BYTE;
  4311. (* Packed bits. Access with constants defined above.
  4312. * BYTE fOutX: 1; - Enable output X-ON/X-OFF
  4313. * BYTE fInX: 1; - Enable input X-ON/X-OFF
  4314. * BYTE fPeChar: 1; - Enable Parity Err Replacement
  4315. * BYTE fNull: 1; - Enable Null stripping
  4316. * BYTE fChEvt: 1; - Enable Rx INTEGER1acter event.
  4317. * BYTE fDtrflow: 1; - DTR handshake on input
  4318. * BYTE fRtsflow: 1; - RTS handshake on input
  4319. * BYTE fDummy2: 1; }
  4320. *)
  4321. XonChar : INTEGER1; (* Tx and Rx X-ON INTEGER1acter *)
  4322. XoffChar : INTEGER1; (* Tx and Rx X-OFF INTEGER1acter *)
  4323. XonLim : WORD; (* Transmit X-ON threshold *)
  4324. XoffLim : WORD; (* Transmit X-OFF threshold *)
  4325. PeChar : INTEGER1; (* Parity error replacement INTEGER1*)
  4326. EofChar : INTEGER1; (* End of Input INTEGER1acter *)
  4327. EvtChar : INTEGER1; (* Recieved Event INTEGER1acter *)
  4328. TxDelay : WORD; (* Amount of time between INTEGER1s *)
  4329. END;
  4330. LPDCB = ADS OF DCB;
  4331. (*************************************************************************
  4332. **
  4333. ** Status record returned by GetCommError
  4334. **
  4335. *************************************************************************)
  4336. CONST
  4337. fCtsHold = 1;
  4338. fDsrHold = 2;
  4339. fRlsdHold = 4;
  4340. fXoffHold = 8;
  4341. fXoffSent = 16;
  4342. fEof = 32;
  4343. fTxim = 64;
  4344. TYPE
  4345. COMSTAT = RECORD
  4346. bitField : BYTE;
  4347. (* Packed bits. Access with constants defined above.
  4348. * BYTE fCtsHold: 1; - Transmit is on CTS hold
  4349. * BYTE fDsrHold: 1; - Transmit is on DSR hold
  4350. * BYTE fRlsdHold: 1; - Transmit is on RLSD hold
  4351. * BYTE fXoffHold: 1; - Received handshake
  4352. * BYTE fXoffSent: 1; - Issued handshake
  4353. * BYTE fEof: 1; - End of file INTEGER1acter found
  4354. * BYTE fTxim: 1; - Character being transmitted
  4355. *)
  4356. cbInQue : WORD; (* count of characters in Rx Que*)
  4357. cbOutQue : WORD; (* count of characters in Tx Que*)
  4358. END;
  4359. LPCOMSTAT = ADS OF COMSTAT;
  4360. { $IFDECL OpenComm $THEN BEGIN }
  4361. FUNCTION OpenComm (
  4362. l_ : LPSTR;
  4363. w_,x_ : WORD
  4364. ) : short;
  4365. { $END }
  4366. { $IFDECL SetCommState $THEN BEGIN }
  4367. FUNCTION SetCommState (
  4368. d_ : LPDCB
  4369. ) : short;
  4370. { $END }
  4371. { $IFDECL GetCommState $THEN BEGIN }
  4372. FUNCTION GetCommState (
  4373. s_ : short;
  4374. d_ : LPDCB
  4375. ) : short;
  4376. { $END }
  4377. { $IFDECL ReadComm $THEN BEGIN }
  4378. FUNCTION ReadComm (
  4379. s_ : short;
  4380. l_ : LPSTR;
  4381. i_ : int
  4382. ) : short;
  4383. { $END }
  4384. { $IFDECL UngetCommChar $THEN BEGIN }
  4385. FUNCTION UngetCommChar (
  4386. s_ : short;
  4387. i_ : INTEGER1
  4388. ) : short;
  4389. { $END }
  4390. { $IFDECL WriteComm $THEN BEGIN }
  4391. FUNCTION WriteComm (
  4392. s_ : short;
  4393. l_ : LPSTR;
  4394. i_ : int
  4395. ) : short;
  4396. { $END }
  4397. { $IFDECL CloseComm $THEN BEGIN }
  4398. FUNCTION CloseComm (
  4399. s_ : short
  4400. ) : short;
  4401. { $END }
  4402. { $IFDECL GetCommError $THEN BEGIN }
  4403. FUNCTION GetCommError (
  4404. s_ : short;
  4405. c_ : LPCOMSTAT
  4406. ) : short;
  4407. { $END }
  4408. { $IFDECL BuildCommDCB $THEN BEGIN }
  4409. FUNCTION BuildCommDCB (
  4410. l_ : LPSTR;
  4411. d_ : LPDCB
  4412. ) : short;
  4413. { $END }
  4414. { $IFDECL TransmitCommChar $THEN BEGIN }
  4415. FUNCTION TransmitCommChar (
  4416. s_ : short;
  4417. i_ : INTEGER1
  4418. ) : short;
  4419. { $END }
  4420. { $IFDECL SetCommEventMask $THEN BEGIN }
  4421. FUNCTION SetCommEventMask (
  4422. s_ : short;
  4423. w_ : WORD
  4424. ) : LPWORD;
  4425. { $END }
  4426. { $IFDECL GetCommEventMask $THEN BEGIN }
  4427. FUNCTION GetCommEventMask (
  4428. s_ : short;
  4429. i_ : int
  4430. ) : WORD;
  4431. { $END }
  4432. { $IFDECL SetCommBreak $THEN BEGIN }
  4433. FUNCTION SetCommBreak (
  4434. s_ : short
  4435. ) : short;
  4436. { $END }
  4437. { $IFDECL ClearCommBreak $THEN BEGIN }
  4438. FUNCTION ClearCommBreak (
  4439. s_ : short
  4440. ) : short;
  4441. { $END }
  4442. { $IFDECL FlushComm $THEN BEGIN }
  4443. FUNCTION FlushComm (
  4444. s_ : short;
  4445. i_ : int
  4446. ) : short;
  4447. { $END }
  4448. { $IFDECL EscapeCommFunction $THEN BEGIN }
  4449. FUNCTION EscapeCommFunction (
  4450. s_ : short;
  4451. i_ : int
  4452. ) : short;
  4453. { $END }
  4454. END;