Win32.User32.Mod 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. (* Copyright (c) 1994 - 2000 Emil J. Zeller *)
  2. MODULE User32; (** non-portable / source: Win32.User32.Mod *) (* ejz *)
  3. IMPORT SYSTEM, Kernel32;
  4. (** This module defines all the Win32 User32 APIs used by Oberon.
  5. Note this module is part of the Oberon inner-core and must be linked with PELinker. *)
  6. TYPE
  7. DWORD = Kernel32.DWORD;
  8. CONST
  9. (** window messages *)
  10. WMCreate* = 01H; WMDestroy* = 02H; WMMove* = 03H; WMSize* = 05H; WMActivate* = 06H; WMSetFocus* = 07H;
  11. WMKillFocus* = 08H; WMPaint* = 0FH; WMClose* = 010H; WMQuit* = 012H; WMSetCursor* = 020H;
  12. WMMouseActivate* = 021H; WMGetMinMaxInfo* = 024H; WMWindowPosChanging* = 046H;
  13. WMGetIcon* = 07FH; WMSetIcon* = 080H; WMNCHitTest* = 084H;
  14. WMKeyFirst* = 0100H;
  15. WMKeyDown* = 0100H; WMKeyUp* = 0101H; WMChar* = 0102H; WMDeadChar* = 0103H;
  16. WMSysKeyDown* = 0104H; WMSysKeyUp* = 0105H; WMSysChar* = 0106H; WMSysDeadChar* = 107H;
  17. WMKeyLast* = 0108H;
  18. WMCommand* = 0111H;
  19. WMMouseFirst* = 0200H; WMMouseMove* = 0200H; WMMouseLast* = 020DH;
  20. WMLButtonDown* = 0201H; WMLButtonUp* = 0202H;
  21. WMRButtonDown* = 0204H; WMRButtonUp* = 0205H;
  22. WMMButtonDown* = 0207H; WMMButtonUp* = 0208H;
  23. WMMouseWheel* = 020AH;
  24. WMXButtonDown* = 020BH; WMXButtonUp* = 020CH;
  25. WMDropFiles* = 0233H;
  26. WMCut* = 0300H; WMCopy* = 0301H; WMPaste* = 0302;
  27. WMClear* = 0303H; WMUndo* = 0304H;
  28. WMUser* = 0400H;
  29. (** WndClass style values *)
  30. CSVRedraw* = 0; CSHRedraw* = 1; CSOwnDC* = 5; CSSaveBits* = 11; CSGlobalClass* = 14;
  31. (** CreateWindow dwStyle values *)
  32. WSMaximizeBox* = 16; WSMinimizeBox* = 17; WSThickFrame* = 18; WSSysMenu* = 19; WSBorder* = 23;
  33. WSMaximize* = 24; WSVisible* = 28; WSMinimize* = 29; WSChild* = 30;
  34. (** CreateWindow default value for x, y, nWidth, nHeight *)
  35. CWUseDefault* = LONGINT(080000000H);
  36. (** WMSize wParam values *)
  37. SizeRestored* = 0; SizeMinimized* = 1; SizeMaximized* = 2; SizeMaxshow* = 3; SizeMaxhide* = 4;
  38. (** WMActivate LoWord(wParam) values *)
  39. WAInactive* = 0; WAActive* = 1; WAClickActive* = 2;
  40. (** WMmouseActivate return codes *)
  41. MAActivate* = 1; MANoActivate* = 3;
  42. (** GetSystemMetrics nIndex values *)
  43. SMCXScreen* = 0; SMCYScreen* = 1; SMCYCaption* = 4;
  44. SMCXDlgFrame* = 7; SMCYDlgFrame* = 8;
  45. SMCXFixedFrame* = SMCXDlgFrame; SMCYFixedFrame* = SMCYDlgFrame;
  46. SMCYMenu* = 15; SMCXFrame* = 32; SMCYFrame* = 33;
  47. SMCMouseButtons* = 43;
  48. (** Predefined HWND values *)
  49. HWNDDesktop* = 0; HWNDBroadcast* = 0FFFFH;
  50. (** virtual key codes *)
  51. VKCancel* = 03H; VKBack* = 08H; VKTab * = 09H; VKClear* = 0CH; VKReturn* = 0DH;
  52. VKShift* = 010H; VKControl* = 011H; VKMenu* = 012H;
  53. VKPause* = 013H; VKCapital* = 014H; VKEscape* = 01BH;
  54. VKPrior* = 021H; VKNext* = 022H; VKEnd* = 023H; VKHome* = 024H;
  55. VKLeft* = 025H; VKUp* = 026H; VKRight* = 027H; VKDown* = 028H;
  56. VKSelect* = 029H; VKPrint* = 02AH; VKExecute* = 02BH; VKSnapshot* = 02CH;
  57. VKInsert* = 02DH; VKDelete* = 02EH; VKHelp* = 02FH;
  58. VKLWin* = 05BH; VKRWin* = 05CH; VKApps* = 05DH;
  59. VKF1* = 070H; VKF2* = 071H; VKF3* = 072H; VKF4* = 073H;
  60. VKF5* = 074H; VKF6* = 075H; VKF7* = 076H; VKF8* = 077H;
  61. VKF9* = 078H; VKF10* = 079H; VKF11* = 07AH; VKF12* = 07BH;
  62. (** WMMouse... wParam values *)
  63. MKLButton* = 0; MKRButton* = 1; MKShift* = 2; MKControl* = 3; MKMButton* = 4;
  64. (** predefined cursors/icons fo LoadCursor/LoadIcon *)
  65. IDCArrow* = 32512; IDCWait* = 32514;
  66. (** WMNCHitTest return values *)
  67. HTClient* = 1;
  68. (** ShowWindow nCmdShow values *)
  69. SWHide* = 0; SWShow* = 5;
  70. SWNormal* = 1; SWShowNormal* = 1;
  71. SWMinimize* = 6; SWShowMinimized* = 2;
  72. SWMaximize* = 3; SWShowMaximized* = 3;
  73. SWRestore* = 9;
  74. SWShowDefault* = 10;
  75. (** SetWindowPos uFlags values *)
  76. SWPNoSize* = 0; SWPNoMove* = 1; SWPNoZOrder* = 2; SWPNoRedraw* = 3; SWPNoActivate* = 4;
  77. SWPFrameChanged* = 5; SWPShowWindow* = 6; SWPHideWindow* = 7;
  78. (** clipboard formats *)
  79. CFText* = 1; CFBitmap* = 2; CFMetafilePict* = 3; CFDIB* = 8; CFEnhMetafile* = 14; CFHDrop* = 15;
  80. (** InsertMenu uFlags values *)
  81. MFByCommand* = {}; MFByPosition* = 10;
  82. MFPopup* = 4; MFSeparator* = 11;
  83. MFEnabled* = {}; MFGrayed * = 0; MFDisabled* = 1;
  84. MFUnchecked* = {}; MFChecked* = 3;
  85. MFString* = {};
  86. (** MenuItemInfo fMask values *)
  87. MIIMID* = 1; MIIMType* = 4;
  88. (** WMSetIcon wPaam values *)
  89. IconSmall* = 0; IconBig* = 1;
  90. (** GetWindowLong/SetWindowLong nIndex values *)
  91. GWLWndProc* = -4; GWLStyle* = - 16; GWLExStyle* = -20;
  92. (** MessageBox uType values *)
  93. MBOk* = {}; MBOkCancel* = {0}; MBAbortRetryIgnore* = {1};
  94. MBYesNoCancel* = {0, 1}; MBYesNo* = {2}; MBRetryCancel* = {0, 2};
  95. MBIconHand* = {4}; MBIconQuestion* = {5}; MBIconExclamation* = {4, 5}; MBIconAsterisk* = {6};
  96. MBIconWarning* = MBIconExclamation; MBIconError* = MBIconHand;
  97. MBIconInformation* = MBIconAsterisk; MBIconStop* = MBIconHand;
  98. (** TrackPopupMenu uFlags values *)
  99. TPMLeftButton* = {}; TPMRightButton* = 1;
  100. TPMLeftAlign* = {}; TPMCenterAlign* = 2; TPMRightAlign* = 3;
  101. TPMTopAlign* = {}; TPMVCenterAlign* = 4; TPMBottomAlign* = 5;
  102. TPMHorizontal* = {}; TPMVertical* = 6;
  103. TPMNoNotify* = 7; TPMReturnCmd* = 8;
  104. (** SetWindowsHookEx idHook values *)
  105. WHKeyboard* = 2;
  106. (** GetSysColor *)
  107. ColorWindow* = 5;
  108. ColorWindowText* = 8;
  109. ColorBtnFace* = 15;
  110. ColorBtnShadow* = 16;
  111. Color3DLight* = 22;
  112. Color3DFace* = ColorBtnFace;
  113. Color3DShadow* = ColorBtnShadow;
  114. TYPE
  115. (** handle types for different win and gdi objects *)
  116. HWND* = Kernel32.HANDLE;
  117. HDC* = Kernel32.HANDLE;
  118. HGDIObj* = Kernel32.HANDLE;
  119. HFont* = HGDIObj;
  120. HBrush* = HGDIObj;
  121. HRgn* = HGDIObj;
  122. HBitmap* = HGDIObj;
  123. HIcon* = Kernel32.HANDLE;
  124. HCursor* = Kernel32.HANDLE;
  125. HMenu* = Kernel32.HANDLE;
  126. HPalette* = Kernel32.HANDLE;
  127. HAccel* = Kernel32.HANDLE;
  128. HHook* = Kernel32.HANDLE;
  129. (** The COLORREF value is used to specify an RGB color. *)
  130. ColorRef* = LONGINT;
  131. (** The POINT structure defines the x- and y- coordinates of a point. *)
  132. Point* = RECORD
  133. x*, y*: LONGINT
  134. END;
  135. PointL* = Point;
  136. PointF* = RECORD
  137. x*, y*: REAL
  138. END;
  139. (** The RECT structure defines the coordinates of the upper-left and lower-right corners of a rectangle. *)
  140. Rect* = RECORD
  141. left*, top*, right*, bottom*: LONGINT
  142. END;
  143. RectL* = Rect;
  144. (** The SIZE structure specifies the width and height of a rectangle. *)
  145. Size* = RECORD
  146. cx*, cy*: LONGINT
  147. END;
  148. SizeL* = Size;
  149. (** The MINMAXINFO structure contains information about a window's maximized size and position and its minimum
  150. and maximum tracking size. *)
  151. MinMaxInfo* = RECORD
  152. ptReserved*, ptMaxSize*, ptMaxPosition*, ptMinTrackSize*, ptMaxTrackSize*: Point
  153. END;
  154. (** The MSG structure contains message information from a thread's message queue. *)
  155. Msg* = RECORD hwnd*: HWND;
  156. message*: LONGINT;
  157. wParam*, lParam*: LONGINT;
  158. time*: LONGINT;
  159. point*: Point
  160. END;
  161. (** A 32-bit value passed as a parameter to a window procedure or callback function. *)
  162. WParam* = SIZE; LParam* = SIZE;
  163. (** A 32-bit value returned from a window procedure or callback function. *)
  164. LResult* = LONGINT;
  165. (** A 32-bit pointer to a window procedure. *)
  166. WndProc* = PROCEDURE {WINAPI} (hwnd: HWND; uMsg: LONGINT; wParam: WParam; lParam: LParam): LResult;
  167. (** The WNDCLASSEX structure contains window class information. It is used with the RegisterClassEx and
  168. GetClassInfoEx functions. *)
  169. WndClassEx* = RECORD
  170. cbSize*: LONGINT;
  171. style*: DWORD;
  172. lpfnWndProc*: WndProc;
  173. cbClsExtra*, cbWndExtra*: LONGINT;
  174. hInstance*: Kernel32.HINSTANCE;
  175. hIcon*: HIcon;
  176. hCursor*: HCursor;
  177. hbrBackground*: HBrush;
  178. lpszMenuName*, lpszClassName*: Kernel32.LPSTR;
  179. hIconSm*: HIcon
  180. END;
  181. (** Application-defined callback function used with the EnumWindows. *)
  182. WndEnumProc* = PROCEDURE {WINAPI} (hwnd: HWND; lParam: LParam): Kernel32.BOOL;
  183. (** The WINDOWPOS structure contains information about the size and position of a window. *)
  184. WindowPos* = RECORD hwnd*, hwndInsertAfter*: HWND;
  185. x*, y*, cx*, cy*: LONGINT;
  186. flags*: DWORD;
  187. END;
  188. (** The WINDOWPLACEMENT structure contains information about the placement of a window on the screen. *)
  189. WindowPlacement* = RECORD
  190. length*: LONGINT;
  191. flags*: DWORD;
  192. showCmd*: LONGINT;
  193. ptMinPosition*, ptMaxPosition*: Point;
  194. rcNormalPosition*: Rect
  195. END;
  196. (** The MENUITEMINFO structure contains information about a menu item. *)
  197. MenuItemInfo* = RECORD cbSize*: LONGINT;
  198. fMask*, fType*, fState*: DWORD;
  199. wID*: LONGINT;
  200. hSubMenu*: HMenu;
  201. hbmpChecked*, hbmpUnchecked*: HBitmap;
  202. dwItemData*: LONGINT;
  203. dwTypeData*: Kernel32.LPSTR;
  204. cch*: LONGINT
  205. END;
  206. (** The ACCEL structure defines an accelerator key used in an accelerator table. *)
  207. Accel* = RECORD fVirt*: CHAR;
  208. key*, cmd*: INTEGER
  209. END;
  210. (** Proctype for SetWindowsHook(Ex) *)
  211. HookProc* = PROCEDURE {WINAPI} (code: LONGINT; wParam: WParam; lParam: LParam): LResult;
  212. PaintStruct* = RECORD
  213. hdc*: HDC;
  214. fErase*: Kernel32.BOOL;
  215. rcPaint*: Rect;
  216. fRestore, fIncUpdate: Kernel32.BOOL;
  217. rgbReserved: ARRAY 32 OF CHAR
  218. END;
  219. VAR
  220. (** The BeginPaint function prepares the specified window for painting and fills a PAINTSTRUCT
  221. structure with information about the painting. *)
  222. BeginPaint-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpPaint: PaintStruct): HDC;
  223. (** The BringWindowToTop function brings the specified window to the top of the Z order. *)
  224. BringWindowToTop-: PROCEDURE {WINAPI} (hWnd: HWND): Kernel32.BOOL;
  225. (** The CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain. *)
  226. CallNextHookEx-: PROCEDURE {WINAPI} (hhk: HHook; nCode: LONGINT; wParam: WParam; lParam: LParam): LResult;
  227. (** The CloseClipboard function closes the clipboard. *)
  228. CloseClipboard-: PROCEDURE {WINAPI} (): Kernel32.BOOL;
  229. (** The CreateAcceleratorTable function creates an accelerator table. *)
  230. CreateAcceleratorTable-: PROCEDURE {WINAPI} (lpaccl: ADDRESS; cEntries: LONGINT): HAccel;
  231. (** The CreateMenu function creates a menu. *)
  232. CreateMenu-: PROCEDURE {WINAPI} (): HMenu;
  233. (** The CreateWindow function creates an overlapped, pop-up, or child window. *)
  234. CreateWindowEx-: PROCEDURE {WINAPI} (dwExStyle: LONGINT; VAR lpClassName, lpWindowName: ARRAY OF CHAR; dwStyle: DWORD; x, y, nWidth, nHeight: LONGINT; hWndParent: HWND; hMenu: HMenu; hInstance: Kernel32.HINSTANCE; lpParam: LParam): HWND;
  235. (** The DefWindowProc function calls the default window procedure to provide default processing for any window
  236. messages that an application does not process. *)
  237. DefWindowProc-: WndProc;
  238. (** The DestroyAcceleratorTable function destroys an accelerator table. *)
  239. DestroyAcceleratorTable-: PROCEDURE {WINAPI} (hAccel: HAccel): Kernel32.BOOL;
  240. (** The DestroyCursor function destroys a cursor and frees any memory the cursor occupied. *)
  241. DestroyCursor-: PROCEDURE {WINAPI} (hCursor: HCursor): Kernel32.BOOL;
  242. (** The DestroyIcon function destroys an icon and frees any memory the icon occupied. *)
  243. DestroyIcon-: PROCEDURE {WINAPI} (hIcon: HIcon): Kernel32.BOOL;
  244. (** The DestroyMenu function destroys the specified menu and frees any memory that the menu occupies. *)
  245. DestroyMenu-: PROCEDURE {WINAPI} (hMenu: HMenu): Kernel32.BOOL;
  246. (** The DestroyWindow function destroys the specified window. *)
  247. DestroyWindow-: PROCEDURE {WINAPI} (hWnd: HWND): Kernel32.BOOL;
  248. (** The DispatchMessage function dispatches a message to a window procedure. *)
  249. DispatchMessage-: PROCEDURE {WINAPI} (VAR lpMsg: Msg): LONGINT;
  250. (** The DrawMenuBar function redraws the menu bar of the specified window. *)
  251. DrawMenuBar-: PROCEDURE {WINAPI} (hWnd: HWND): Kernel32.BOOL;
  252. (** The EmptyClipboard function empties the clipboard and frees handles to data in the clipboard. *)
  253. EmptyClipboard-: PROCEDURE {WINAPI} (): Kernel32.BOOL;
  254. (** The EnableWindow function enables or disables mouse and keyboard input to the specified window or control. *)
  255. EnableWindow-: PROCEDURE {WINAPI} (hWnd: HWND; bEnable: Kernel32.BOOL): Kernel32.BOOL;
  256. (** The EndPaint function marks the end of painting in the specified window. *)
  257. EndPaint-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpPaint: PaintStruct): Kernel32.BOOL;
  258. (** The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each
  259. window, in turn, to an application-defined callback function. *)
  260. EnumWindows-: PROCEDURE {WINAPI} (lpEnumProc: WndEnumProc; lParam: LParam): Kernel32.BOOL;
  261. (** The EqualRect function determines whether the two specified rectangles are equal by comparing the coordinates
  262. of their upper-left and lower-right corners. *)
  263. EqualRect-: PROCEDURE {WINAPI} (lprc1, lprc2: Rect): Kernel32.BOOL;
  264. (** The GetAsyncKeyState function determines whether a key is up or down at the time the function is called, and
  265. whether the key was pressed after a previous call to GetAsyncKeyState. *)
  266. GetAsyncKeyState-: PROCEDURE {WINAPI} (vKey: LONGINT): INTEGER;
  267. (** The GetClientRect function retrieves the coordinates of a window's client area. *)
  268. GetClientRect-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpRect: Rect): Kernel32.BOOL;
  269. (** The GetClipboardData function retrieves data from the clipboard in a specified format. *)
  270. GetClipboardData-: PROCEDURE {WINAPI} (uFormat: LONGINT): Kernel32.HANDLE;
  271. (** The GetClipboardFormatName function retrieves from the clipboard the name of the specified registered format. *)
  272. GetClipboardFormatName-: PROCEDURE {WINAPI} (format: LONGINT; VAR lpszFormatName: ARRAY OF CHAR; cchMaxCount: LONGINT): LONGINT;
  273. (** The GetCursorPos function retrieves the cursor's position, in screen coordinates. *)
  274. GetCursorPos-: PROCEDURE {WINAPI} (VAR lpPoint: Point): Kernel32.BOOL;
  275. (** The GetDC function retrieves a handle to a display device context (DC) for the client area of a specified window
  276. or for the entire screen. *)
  277. GetDC-: PROCEDURE {WINAPI} (hWnd: HWND): HDC;
  278. (** The GetFocus function retrieves the handle to the window that has the keyboard focus, if the window is attached
  279. to the calling thread's message queue. *)
  280. GetFocus-: PROCEDURE {WINAPI} (): HWND;
  281. (** Retrieves a handle to the foreground window (the window with which the user is currently working). The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads. *)
  282. GetForegroundWindow-: PROCEDURE {WINAPI} (): HWND;
  283. (** The GetKeyState function retrieves the status of the specified virtual key. *)
  284. GetKeyState-: PROCEDURE {WINAPI} (vKey: LONGINT): INTEGER;
  285. (** The GetMenu function retrieves a handle to the menu assigned to the specified window. *)
  286. GetMenu-: PROCEDURE {WINAPI} (hWnd: HWND): HMenu;
  287. (** The GetMenuItemInfo function retrieves information about a menu item. *)
  288. GetMenuItemInfo-: PROCEDURE {WINAPI} (hMenu: HMenu; uItem: LONGINT; fyByPosition: Kernel32.BOOL; VAR lpmii: MenuItemInfo): Kernel32.BOOL;
  289. (** The GetMenuString function copies the text string of the specified menu item into the specified buffer. *)
  290. GetMenuString-: PROCEDURE {WINAPI} (hMenu: HMenu; uIDItem: LONGINT; VAR lpString: ARRAY OF CHAR; nMaxCount: LONGINT; uFlag: DWORD): Kernel32.BOOL;
  291. (** The GetMessage function retrieves a message from the calling thread's message queue and places it in the
  292. specified structure. *)
  293. GetMessage-: PROCEDURE {WINAPI} (VAR lpMsg: Msg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax: LONGINT): LONGINT;
  294. (** The GetParent function retrieves a handle to the specified child window's parent window. *)
  295. GetParent-: PROCEDURE {WINAPI} (hWnd: HWND): HWND;
  296. (** The GetProp function retrieves a data handle from the property list of the given window. *)
  297. GetProp-: PROCEDURE {WINAPI} (hWnd: HWND; lpString: LONGINT): LONGINT;
  298. (** The GetSystemMetrics function retrieves various system metrics (widths and heights of display elements) and
  299. system configuration settings. *)
  300. (** The GetSysColor function retrieves the current color of the specified display element. *)
  301. GetSysColor-: PROCEDURE {WINAPI} (nIndex: LONGINT): ColorRef;
  302. (** The GetSystemMetrics function retrieves various system metrics (widths and heights of display elements)
  303. and system configuration settings. *)
  304. GetSystemMetrics-: PROCEDURE {WINAPI} (nIndex: LONGINT): LONGINT;
  305. (** The GetWindowLong function retrieves information about the specified window. *)
  306. GetWindowLong-: PROCEDURE {WINAPI} (hWnd: HWND; nIndex: LONGINT): LONGINT;
  307. (** The GetWindowPlacement function retrieves the show state and the restored, minimized, and maximized
  308. positions of the specified window. *)
  309. GetWindowPlacement-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpwndpl: WindowPlacement): Kernel32.BOOL;
  310. (** The GetWindowRect function retrieves the dimensions of the bounding rectangle of the specified window. *)
  311. GetWindowRect-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpRect: Rect): Kernel32.BOOL;
  312. (** The GetWindowRgn function obtains a copy of the window region of a window. *)
  313. GetWindowRgn-: PROCEDURE {WINAPI} (hWnd: HWND; VAR hRgn: HRgn): LONGINT;
  314. (** The GetWindowText function copies the text of the specified window's title bar (if it has one) into a buffer. *)
  315. GetWindowText-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpString: ARRAY OF CHAR; nMaxCount: LONGINT): LONGINT;
  316. (** The GetUpdateRect function retrieves the coordinates of the smallest rectangle that completely encloses the
  317. update region of the specified window. *)
  318. GetUpdateRect-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpRect: Rect; bErase: Kernel32.BOOL): Kernel32.BOOL;
  319. (** The GetUpdateRgn function retrieves the update region of a window by copying it into the specified
  320. region. *)
  321. GetUpdateRgn-: PROCEDURE {WINAPI} (hWnd: HWND; VAR hRgn: HRgn; bErase: Kernel32.BOOL): LONGINT;
  322. (** The InsertMenu function inserts a new menu item into a menu, moving other items down the menu. *)
  323. InsertMenu-: PROCEDURE {WINAPI} (hMenu: HMenu; uPosition: LONGINT; uFlags: DWORD; uIDNewItem: LONGINT; VAR lpNewItem: ARRAY OF CHAR): Kernel32.BOOL;
  324. (** The IntersectRect function calculates the intersection of two source rectangles and places the coordinates of the
  325. intersection rectangle into the destination rectangle. *)
  326. IntersectRect-: PROCEDURE {WINAPI} (VAR lprcDst: Rect; lprcSrc1, lprcSrc2: Rect): Kernel32.BOOL;
  327. (** The InvalidateRect function adds a rectangle to the specified window's update region. *)
  328. InvalidateRect-: PROCEDURE {WINAPI} (hWnd: HWND; lpRect: Rect; bErase: Kernel32.BOOL): Kernel32.BOOL;
  329. (** The IsChild function tests whether a window is a child window or descendant window of a specified parent window. *)
  330. IsChild-: PROCEDURE {WINAPI} (hWndParent, hWnd: HWND): Kernel32.BOOL;
  331. (** The LoadCursor function loads the specified cursor resource from the executable (.EXE) file associated with
  332. an application instance. *)
  333. LoadCursor-: PROCEDURE {WINAPI} (hInstance: Kernel32.HINSTANCE; VAR lpCursorName: ARRAY OF CHAR): HCursor;
  334. (** The LoadCursorFromFile function creates a cursor based on data contained in a file. *)
  335. LoadCursorFromFile-: PROCEDURE {WINAPI} (VAR lpFileName: ARRAY OF CHAR): HCursor;
  336. (** The LoadIcon function loads the specified icon resource from the executable (.exe) file associated with an
  337. application instance. *)
  338. LoadIcon-: PROCEDURE {WINAPI} (hInstance: Kernel32.HINSTANCE; VAR lpIconName: ARRAY OF CHAR): HIcon;
  339. (** The MessageBeep function plays a waveform sound. *)
  340. MessageBeep-: PROCEDURE {WINAPI} (uType: LONGINT): Kernel32.BOOL;
  341. (** The MessageBox function creates, displays, and operates a message box. *)
  342. MessageBox-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpText, lpCaption: ARRAY OF CHAR; uType: DWORD): LONGINT;
  343. (** The MoveWindow function changes the position and dimensions of the specified window. *)
  344. MoveWindow-: PROCEDURE {WINAPI} (hWnd: HWND; X, Y, nWidth, nHeight: LONGINT; bRepaint: Kernel32.BOOL): Kernel32.BOOL;
  345. (** The OffsetRect function moves the specified rectangle by the specified offsets. *)
  346. OffsetRect-: PROCEDURE {WINAPI} (VAR lprc: Rect; dx, dy: LONGINT): Kernel32.BOOL;
  347. (** The OpenClipboard function opens the clipboard for examination and prevents other applications from modifying
  348. the clipboard content. *)
  349. OpenClipboard-: PROCEDURE {WINAPI} (hWndNewOwner: HWND): Kernel32.BOOL;
  350. (** The PtInRect function determines whether the specified point lies within the specified rectangle. *)
  351. PtInRect-: PROCEDURE {WINAPI} (lprc: Rect; ptx, pty: LONGINT): Kernel32.BOOL;
  352. (** The PostMessage function places (posts) a message in the message queue associated with the thread that created
  353. the specified window and then returns without waiting for the thread to process the message. *)
  354. PostMessage-: PROCEDURE {WINAPI} (hWnd: HWND; Msg: LONGINT; wParam: WParam; lParam: LParam): Kernel32.BOOL;
  355. (** The PostQuitMessage function indicates to the system that a thread has made a request to terminate (quit). *)
  356. PostQuitMessage-: PROCEDURE {WINAPI} (nExitCode: LONGINT);
  357. (** The RegisterClassEx function registers a window class for subsequent use in calls to the CreateWindow or
  358. CreateWindowEx function. *)
  359. RegisterClassEx-: PROCEDURE {WINAPI} (VAR lpwcx: WndClassEx): Kernel32.ATOM;
  360. (** The RegisterClipboardFormat function registers a new clipboard format. *)
  361. RegisterHotKey-: PROCEDURE{WINAPI} (hWnd: HWND; id: LONGINT; fsmodifiers,vk: LONGINT): Kernel32.BOOL;
  362. (*The RegisterHotKey function defines a system-wide hot key *)
  363. RegisterClipboardFormat-: PROCEDURE {WINAPI} (VAR lpszFormat: ARRAY OF CHAR): INTEGER;
  364. (** The RegisterWindowMessage function defines a new window message that is guaranteed to be
  365. unique throughout the system. *)
  366. RegisterWindowMessage-: PROCEDURE {WINAPI} (VAR lpString: ARRAY OF CHAR): LONGINT;
  367. (** The ReleaseCapture function releases the mouse capture from a window in the current thread and restores normal
  368. mouse input processing. *)
  369. ReleaseCapture-: PROCEDURE {WINAPI} (): Kernel32.BOOL;
  370. (** The ReleaseDC function releases a device context (DC), freeing it for use by other applications. *)
  371. ReleaseDC-: PROCEDURE {WINAPI} (hWnd: HWND; hDC: HDC): LONGINT;
  372. (** The RemoveProp function removes an entry from the property list of the specified window. *)
  373. RemoveProp-: PROCEDURE {WINAPI} (hWnd: HWND; lpString: LONGINT): LONGINT;
  374. (** The ScreenToClient function converts the screen coordinates of a specified point on the screen to client coordinates. *)
  375. ScreenToClient-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpPoint: Point): Kernel32.BOOL;
  376. (** The SendMessage function sends the specified message to a window or windows. *)
  377. SendMessage-: PROCEDURE {WINAPI} (hWnd: HWND; Msg: LONGINT; wParam: WParam; lParam: LParam): LResult;
  378. (** The SetCapture function sets the mouse capture to the specified window belonging to the current thread. *)
  379. SetCapture-: PROCEDURE {WINAPI} (hWnd: HWND): HWND;
  380. (** The SetClipboardData function places data on the clipboard in a specified clipboard format. *)
  381. SetClipboardData-: PROCEDURE {WINAPI} (uFormat: LONGINT; hMem: Kernel32.HANDLE): Kernel32.HANDLE;
  382. (** The SetCursor function establishes the cursor shape. *)
  383. SetCursor-: PROCEDURE {WINAPI} (hCursor: HCursor): HCursor;
  384. (** The SetCursorPos function moves the cursor to the specified screen coordinates. *)
  385. SetCursorPos-: PROCEDURE {WINAPI} (X, Y: LONGINT): Kernel32.BOOL;
  386. (** The SetFocus function sets the keyboard focus to the specified window. *)
  387. SetFocus-: PROCEDURE {WINAPI} (hWnd: HWND): HWND;
  388. (** The SetForegroundWindow function puts the thread that created the specified window into the foreground
  389. and activates the window. *)
  390. SetForegroundWindow-: PROCEDURE {WINAPI} (hWnd: HWND): Kernel32.BOOL;
  391. (** The SetMenu function assigns a new menu to the specified window. *)
  392. SetMenu-: PROCEDURE {WINAPI} (hWnd: HWND; hMenu: HMenu): Kernel32.BOOL;
  393. (** The SetMenuItemInfo function changes information about a menu item. *)
  394. SetMenuItemInfo-: PROCEDURE {WINAPI} (hMenu: HMenu; uItem: LONGINT; fyByPosition: Kernel32.BOOL; VAR lpmii: MenuItemInfo): Kernel32.BOOL;
  395. (** The SetProp function adds a new entry or changes an existing entry in the property list of the specified window. *)
  396. SetProp-: PROCEDURE {WINAPI} (hWnd: HWND; lpString, hData: LONGINT): Kernel32.BOOL;
  397. (** The SetWindowsHookEx function installs an application-defined hook procedure into a hook chain. *)
  398. SetWindowsHookEx-: PROCEDURE {WINAPI} (idHook: LONGINT; lpfn: HookProc; hMod: Kernel32.HINSTANCE; dwThreadId: LONGINT): HHook;
  399. (** The SetWindowLong function changes an attribute of the specified window. *)
  400. SetWindowLong-: PROCEDURE {WINAPI} (hWnd: HWND; nIndex, dwNewLong: LONGINT): LONGINT;
  401. (** The SetWindowPos function changes the size, position, and Z order of a child, pop-up, or top-level window. *)
  402. SetWindowPos-: PROCEDURE {WINAPI} (hWnd, hWndInsertAfter: HWND; X, Y, cx, cy: LONGINT; uFlags: DWORD): Kernel32.BOOL;
  403. (** The SetWindowRgn function sets the window region of a window. *)
  404. SetWindowRgn-: PROCEDURE {WINAPI} (hWnd: HWND; hRgn: HRgn; bRedraw: Kernel32.BOOL): LONGINT;
  405. (** The SetWindowText function changes the text of the specified window's title bar (if it has one). *)
  406. SetWindowText-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpString: ARRAY OF CHAR): Kernel32.BOOL;
  407. (** The ShowCursor function displays or hides the cursor. *)
  408. ShowCursor-: PROCEDURE {WINAPI} (bShow: Kernel32.BOOL): LONGINT;
  409. (** The ShowWindow function sets the specified window's show state. *)
  410. ShowWindow-: PROCEDURE {WINAPI} (hWnd: HWND; nCmdShow: LONGINT): Kernel32.BOOL;
  411. (** The ShowWindowAsync function sets the show state of a window created by a different thread. *)
  412. ShowWindowAsync-: PROCEDURE {WINAPI} (hWnd: HWND; nCmdShow: LONGINT): Kernel32.BOOL;
  413. (** The TrackPopupMenu function displays a shortcut menu at the specified location and tracks the selection of
  414. items on the menu. *)
  415. TrackPopupMenu-: PROCEDURE {WINAPI} (hMenu: HMenu; uFlags: DWORD; x, y, nReserved: LONGINT; hWnd: HWND; VAR prcRect: Rect): Kernel32.BOOL;
  416. (** The TranslateAccelerator function processes accelerator keys for menu commands. *)
  417. TranslateAccelerator-: PROCEDURE {WINAPI} (hWnd: HWND; hAccTable: HAccel; VAR lpMsg: Msg): LONGINT;
  418. (** The TranslateMessage function translates virtual-key messages into character messages. *)
  419. TranslateMessage-: PROCEDURE {WINAPI} (VAR lpMsg: Msg): Kernel32.BOOL;
  420. (** The UnhookWindowsHookEx function removes a hook procedure installed in a hook chain by the SetWindowsHookEx
  421. function. *)
  422. UnhookWindowsHookEx-: PROCEDURE {WINAPI} (hhk: HHook): Kernel32.BOOL;
  423. (** The UnregisterClass function removes a window class, freeing the memory required for the class. *)
  424. UnregisterClass-: PROCEDURE {WINAPI} (VAR lpClassName: ARRAY OF CHAR; hInstance: Kernel32.HINSTANCE): Kernel32.BOOL;
  425. (** The UpdateWindow function updates the client area of the specified window by sending a WM_PAINT message
  426. to the window if the window's update region is not empty. *)
  427. UpdateWindow-: PROCEDURE {WINAPI} (hWnd: HWND): Kernel32.BOOL;
  428. (** The ValidateRect function validates the client area within a rectangle by removing the rectangle from the
  429. update region of the specified window. *)
  430. ValidateRect-: PROCEDURE {WINAPI} (hWnd: HWND; VAR lpRect: Rect): Kernel32.BOOL;
  431. GetConsoleWindow-: PROCEDURE{WINAPI} (): LONGINT ;
  432. (** The EqualSize function determines whether the two specified sizes are equal. *)
  433. PROCEDURE {WINAPI} EqualSize*(VAR a, b: Size): BOOLEAN;
  434. BEGIN
  435. RETURN (a.cx = b.cx) & (a.cy = b.cy)
  436. END EqualSize;
  437. PROCEDURE Init;
  438. VAR mod: Kernel32.HMODULE; str: ARRAY 32 OF CHAR;
  439. BEGIN
  440. str := "KERNEL32.DLL";
  441. mod := Kernel32.LoadLibrary(str);
  442. Kernel32.GetProcAddress(mod, "GetConsoleWindow", SYSTEM.VAL(ADDRESS, GetConsoleWindow));
  443. (* the GetConsoleWindow function is not available for version minor Win2000, that's why it is set dynamically here *)
  444. str := "USER32.DLL";
  445. mod := Kernel32.LoadLibrary(str);
  446. Kernel32.GetProcAddress(mod, "BeginPaint", SYSTEM.VAL(ADDRESS,BeginPaint ));
  447. Kernel32.GetProcAddress(mod, "BringWindowToTop", SYSTEM.VAL(ADDRESS,BringWindowToTop ));
  448. Kernel32.GetProcAddress(mod, "CallNextHookEx", SYSTEM.VAL(ADDRESS,CallNextHookEx ));
  449. Kernel32.GetProcAddress(mod, "CloseClipboard", SYSTEM.VAL(ADDRESS,CloseClipboard ));
  450. Kernel32.GetProcAddress(mod, "CreateAcceleratorTableA", SYSTEM.VAL(ADDRESS,CreateAcceleratorTable ));
  451. Kernel32.GetProcAddress(mod, "CreateMenu", SYSTEM.VAL(ADDRESS,CreateMenu ));
  452. Kernel32.GetProcAddress(mod, "CreateWindowExA", SYSTEM.VAL(ADDRESS,CreateWindowEx ));
  453. Kernel32.GetProcAddress(mod, "DefWindowProcA", SYSTEM.VAL(ADDRESS,DefWindowProc ));
  454. Kernel32.GetProcAddress(mod, "DestroyAcceleratorTable", SYSTEM.VAL(ADDRESS,DestroyAcceleratorTable ));
  455. Kernel32.GetProcAddress(mod, "DestroyMenu", SYSTEM.VAL(ADDRESS,DestroyMenu ));
  456. Kernel32.GetProcAddress(mod, "DestroyWindow", SYSTEM.VAL(ADDRESS,DestroyWindow ));
  457. Kernel32.GetProcAddress(mod, "DispatchMessageA", SYSTEM.VAL(ADDRESS,DispatchMessage ));
  458. Kernel32.GetProcAddress(mod, "DrawMenuBar", SYSTEM.VAL(ADDRESS,DrawMenuBar ));
  459. Kernel32.GetProcAddress(mod, "EmptyClipboard", SYSTEM.VAL(ADDRESS,EmptyClipboard ));
  460. Kernel32.GetProcAddress(mod, "EnableWindow", SYSTEM.VAL(ADDRESS,EnableWindow ));
  461. Kernel32.GetProcAddress(mod, "EndPaint", SYSTEM.VAL(ADDRESS,EndPaint ));
  462. Kernel32.GetProcAddress(mod, "EnumWindows", SYSTEM.VAL(ADDRESS,EnumWindows ));
  463. Kernel32.GetProcAddress(mod, "EqualRect", SYSTEM.VAL(ADDRESS,EqualRect ));
  464. Kernel32.GetProcAddress(mod, "GetAsyncKeyState", SYSTEM.VAL(ADDRESS,GetAsyncKeyState ));
  465. Kernel32.GetProcAddress(mod, "GetClientRect", SYSTEM.VAL(ADDRESS,GetClientRect ));
  466. Kernel32.GetProcAddress(mod, "GetClipboardData", SYSTEM.VAL(ADDRESS,GetClipboardData ));
  467. Kernel32.GetProcAddress(mod, "GetClipboardFormatNameA", SYSTEM.VAL(ADDRESS,GetClipboardFormatName));
  468. Kernel32.GetProcAddress(mod, "GetCursorPos", SYSTEM.VAL(ADDRESS,GetCursorPos ));
  469. Kernel32.GetProcAddress(mod, "GetDC", SYSTEM.VAL(ADDRESS,GetDC ));
  470. Kernel32.GetProcAddress(mod, "GetFocus", SYSTEM.VAL(ADDRESS,GetFocus ));
  471. Kernel32.GetProcAddress(mod, "GetForegroundWindow", SYSTEM.VAL(ADDRESS,GetForegroundWindow ));
  472. Kernel32.GetProcAddress(mod, "GetKeyState", SYSTEM.VAL(ADDRESS,GetKeyState ));
  473. Kernel32.GetProcAddress(mod, "GetMenu", SYSTEM.VAL(ADDRESS,GetMenu ));
  474. Kernel32.GetProcAddress(mod, "GetMenuItemInfoA", SYSTEM.VAL(ADDRESS,GetMenuItemInfo ));
  475. Kernel32.GetProcAddress(mod, "GetMenuStringA", SYSTEM.VAL(ADDRESS,GetMenuString ));
  476. Kernel32.GetProcAddress(mod, "GetMessageA", SYSTEM.VAL(ADDRESS,GetMessage ));
  477. Kernel32.GetProcAddress(mod, "GetParent", SYSTEM.VAL(ADDRESS,GetParent ));
  478. Kernel32.GetProcAddress(mod, "GetPropA", SYSTEM.VAL(ADDRESS,GetProp ));
  479. Kernel32.GetProcAddress(mod, "GetSysColor", SYSTEM.VAL(ADDRESS,GetSysColor ));
  480. Kernel32.GetProcAddress(mod, "GetSystemMetrics", SYSTEM.VAL(ADDRESS,GetSystemMetrics ));
  481. Kernel32.GetProcAddress(mod, "GetWindowLongA", SYSTEM.VAL(ADDRESS,GetWindowLong ));
  482. Kernel32.GetProcAddress(mod, "GetWindowPlacement", SYSTEM.VAL(ADDRESS,GetWindowPlacement ));
  483. Kernel32.GetProcAddress(mod, "GetWindowRect", SYSTEM.VAL(ADDRESS,GetWindowRect ));
  484. Kernel32.GetProcAddress(mod, "GetWindowRgn", SYSTEM.VAL(ADDRESS,GetWindowRgn ));
  485. Kernel32.GetProcAddress(mod, "GetWindowTextA", SYSTEM.VAL(ADDRESS,GetWindowText ));
  486. Kernel32.GetProcAddress(mod, "GetUpdateRect", SYSTEM.VAL(ADDRESS,GetUpdateRect ));
  487. Kernel32.GetProcAddress(mod, "GetUpdateRgn", SYSTEM.VAL(ADDRESS,GetUpdateRgn ));
  488. Kernel32.GetProcAddress(mod, "InvalidateRect", SYSTEM.VAL(ADDRESS,InvalidateRect ));
  489. Kernel32.GetProcAddress(mod, "InsertMenuA", SYSTEM.VAL(ADDRESS,InsertMenu ));
  490. Kernel32.GetProcAddress(mod, "IntersectRect", SYSTEM.VAL(ADDRESS,IntersectRect ));
  491. Kernel32.GetProcAddress(mod, "IsChild", SYSTEM.VAL(ADDRESS,IsChild ));
  492. Kernel32.GetProcAddress(mod, "LoadCursorA", SYSTEM.VAL(ADDRESS,LoadCursor ));
  493. Kernel32.GetProcAddress(mod, "LoadCursorFromFileA", SYSTEM.VAL(ADDRESS,LoadCursorFromFile ));
  494. Kernel32.GetProcAddress(mod, "LoadIconA", SYSTEM.VAL(ADDRESS,LoadIcon ));
  495. Kernel32.GetProcAddress(mod, "MessageBeep", SYSTEM.VAL(ADDRESS,MessageBeep ));
  496. Kernel32.GetProcAddress(mod, "MessageBoxA", SYSTEM.VAL(ADDRESS,MessageBox ));
  497. Kernel32.GetProcAddress(mod, "MoveWindow", SYSTEM.VAL(ADDRESS,MoveWindow ));
  498. Kernel32.GetProcAddress(mod, "OffsetRect", SYSTEM.VAL(ADDRESS,OffsetRect ));
  499. Kernel32.GetProcAddress(mod, "OpenClipboard", SYSTEM.VAL(ADDRESS,OpenClipboard ));
  500. Kernel32.GetProcAddress(mod, "PtInRect", SYSTEM.VAL(ADDRESS,PtInRect ));
  501. Kernel32.GetProcAddress(mod, "PostMessageA", SYSTEM.VAL(ADDRESS,PostMessage ));
  502. Kernel32.GetProcAddress(mod, "PostQuitMessage", SYSTEM.VAL(ADDRESS,PostQuitMessage ));
  503. Kernel32.GetProcAddress(mod, "RegisterClassExA", SYSTEM.VAL(ADDRESS,RegisterClassEx ));
  504. Kernel32.GetProcAddress(mod, "RegisterClipboardFormatA", SYSTEM.VAL(ADDRESS,RegisterClipboardFormat ));
  505. Kernel32.GetProcAddress(mod, "RegisterHotKey", SYSTEM.VAL(ADDRESS,RegisterHotKey ));
  506. Kernel32.GetProcAddress(mod, "RegisterWindowMessageA", SYSTEM.VAL(ADDRESS,RegisterWindowMessage ));
  507. Kernel32.GetProcAddress(mod, "ReleaseCapture", SYSTEM.VAL(ADDRESS,ReleaseCapture ));
  508. Kernel32.GetProcAddress(mod, "ReleaseDC", SYSTEM.VAL(ADDRESS,ReleaseDC ));
  509. Kernel32.GetProcAddress(mod, "RemovePropA", SYSTEM.VAL(ADDRESS,RemoveProp ));
  510. Kernel32.GetProcAddress(mod, "ScreenToClient", SYSTEM.VAL(ADDRESS,ScreenToClient ));
  511. Kernel32.GetProcAddress(mod, "SendMessageA", SYSTEM.VAL(ADDRESS,SendMessage ));
  512. Kernel32.GetProcAddress(mod, "SetCapture", SYSTEM.VAL(ADDRESS,SetCapture ));
  513. Kernel32.GetProcAddress(mod, "SetClipboardData", SYSTEM.VAL(ADDRESS,SetClipboardData ));
  514. Kernel32.GetProcAddress(mod, "SetCursor", SYSTEM.VAL(ADDRESS,SetCursor ));
  515. Kernel32.GetProcAddress(mod, "SetCursorPos", SYSTEM.VAL(ADDRESS,SetCursorPos ));
  516. Kernel32.GetProcAddress(mod, "SetFocus", SYSTEM.VAL(ADDRESS,SetFocus ));
  517. Kernel32.GetProcAddress(mod, "SetForegroundWindow", SYSTEM.VAL(ADDRESS,SetForegroundWindow ));
  518. Kernel32.GetProcAddress(mod, "SetMenu", SYSTEM.VAL(ADDRESS,SetMenu ));
  519. Kernel32.GetProcAddress(mod, "SetMenuItemInfoA", SYSTEM.VAL(ADDRESS,SetMenuItemInfo ));
  520. Kernel32.GetProcAddress(mod, "SetPropA", SYSTEM.VAL(ADDRESS,SetProp ));
  521. Kernel32.GetProcAddress(mod, "SetWindowsHookExA", SYSTEM.VAL(ADDRESS,SetWindowsHookEx ));
  522. Kernel32.GetProcAddress(mod, "SetWindowLongA", SYSTEM.VAL(ADDRESS,SetWindowLong ));
  523. Kernel32.GetProcAddress(mod, "SetWindowPos", SYSTEM.VAL(ADDRESS,SetWindowPos ));
  524. Kernel32.GetProcAddress(mod, "SetWindowRgn", SYSTEM.VAL(ADDRESS,SetWindowRgn ));
  525. Kernel32.GetProcAddress(mod, "SetWindowTextA", SYSTEM.VAL(ADDRESS,SetWindowText ));
  526. Kernel32.GetProcAddress(mod, "ShowCursor", SYSTEM.VAL(ADDRESS,ShowCursor ));
  527. Kernel32.GetProcAddress(mod, "ShowWindow", SYSTEM.VAL(ADDRESS,ShowWindow ));
  528. Kernel32.GetProcAddress(mod, "ShowWindowAsync", SYSTEM.VAL(ADDRESS,ShowWindowAsync ));
  529. Kernel32.GetProcAddress(mod, "TrackPopupMenu", SYSTEM.VAL(ADDRESS,TrackPopupMenu ));
  530. Kernel32.GetProcAddress(mod, "TranslateAcceleratorA", SYSTEM.VAL(ADDRESS,TranslateAccelerator ));
  531. Kernel32.GetProcAddress(mod, "TranslateMessage", SYSTEM.VAL(ADDRESS,TranslateMessage ));
  532. Kernel32.GetProcAddress(mod, "UnhookWindowsHookEx", SYSTEM.VAL(ADDRESS,UnhookWindowsHookEx ));
  533. Kernel32.GetProcAddress(mod, "UnregisterClassA", SYSTEM.VAL(ADDRESS,UnregisterClass ));
  534. Kernel32.GetProcAddress(mod, "UpdateWindow", SYSTEM.VAL(ADDRESS,UpdateWindow ));
  535. Kernel32.GetProcAddress(mod, "ValidateRect", SYSTEM.VAL(ADDRESS,ValidateRect ));
  536. END Init;
  537. BEGIN
  538. Init;
  539. END User32.