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.

88 lines
3.7 KiB

  1. ' ------------------------------------------------------------------------
  2. ' WNAPIDEC.INC -- Windows 3.0 API Declarations for 32-bit FastTest
  3. '
  4. ' Copyright (C) 1991-1992 Microsoft Corporation
  5. '
  6. ' The following are provided for sample purposes only. You should only
  7. ' copy the ones you use into your code in order to save code space and
  8. ' parse time.
  9. '
  10. ' You have a royalty-free right to use, modify, reproduce and distribute
  11. ' this file (and/or any modified version) in any way you find useful,
  12. ' provided that you agree Microsoft has no warranty, obligation or
  13. ' liability for its contents. Refer to the Microsoft Windows Programmer's
  14. ' Reference for further information.
  15. '
  16. ' ------------------------------------------------------------------------
  17. '$define _WNAPIDEC ' Define this so other includes don't redefine
  18. ' stuff defined in this include file
  19. '$ifndef _WINUSER
  20. ' Definitions stolen from WINUSER.INC
  21. '-----------------------------------------------------------------------------
  22. Type RECT
  23. wleft As Integer
  24. top As Integer
  25. wright As Integer
  26. bottom As Integer
  27. End Type
  28. Type POINT
  29. x As Integer
  30. y As Integer
  31. End Type
  32. Declare Function FindWindow Lib "User32" ALIAS "FindWindowA" (lpClassName As Any, lpWindowName As Any) As Integer
  33. Declare Function GetActiveWindow Lib "User32" ALIAS "GetActiveWindow" () As Integer
  34. Declare Sub GetClientRect Lib "User32" ALIAS "GetClientRect" (hWnd%, lpRect As RECT)
  35. Declare Function GetDesktopWindow Lib "User32" ALIAS "GetDesktopWindow" () As Integer
  36. Declare Function GetFocus Lib "User32" ALIAS "GetFocus" () As Integer
  37. Declare Function GetForegroundWindow Lib "User32" ALIAS "GetForegroundWindow" () As Integer
  38. Declare Function GetSystemMetrics Lib "User32" ALIAS "GetSystemMetrics" (nIndex%) As Integer
  39. Declare Function GetWindowLong Lib "User32" ALIAS "GetWindowLongA" (hWnd%, nIndex%) As Long
  40. Declare Sub GetWindowRect Lib "User32" ALIAS "GetWindowRect" (hWnd%, lpRect As RECT)
  41. Declare Function GetWindowText Lib "User32" ALIAS "GetWindowTextA" (hWnd%, lpString$, nMaxCount%) As Integer
  42. Declare Function IsZoomed Lib "User32" ALIAS "IsZoomed" (hWnd%) As Integer
  43. Declare Function MessageBox Lib "User32" ALIAS "MessageBoxA" (hWndParent%, lpText$, lpCaption$, wType%) As Integer
  44. Declare Function SendMessage Lib "User32" ALIAS "SendMessageA" (hWnd%, wMsg%, wParam%, lParam As Any) As Long
  45. Declare Function SetActiveWindow Lib "User32" ALIAS "SetActiveWindow" (hWnd%) As Integer
  46. Declare Function SetFocus Lib "User32" ALIAS "SetFocus" (hWnd%) As Integer
  47. Declare Function SetForegroundWindow Lib "User32" ALIAS "SetForegroundWindow" (hWnd%) As Integer
  48. Declare Function SetWindowPos Lib "User32" ALIAS "SetWindowPos" (h%, ha%, x%, y%, cx%, cy%, f%) As Integer
  49. Declare Function ShowWindow Lib "User32" ALIAS "ShowWindow" (hWnd%, nCmdShow%) As Integer
  50. ' ShowWindow() Commands
  51. Const SW_HIDE = 0
  52. Const SW_SHOWNORMAL = 1
  53. Const SW_NORMAL = 1
  54. Const SW_SHOWMINIMIZED = 2
  55. Const SW_SHOWMAXIMIZED = 3
  56. Const SW_MAXIMIZE = 3
  57. Const SW_SHOWNOACTIVATE = 4
  58. Const SW_SHOW = 5
  59. Const SW_MINIMIZE = 6
  60. Const SW_SHOWMINNOACTIVE = 7
  61. Const SW_SHOWNA = 8
  62. Const SW_RESTORE = 9
  63. ' Window Styles
  64. Const WS_MINIMIZE = &H20000000
  65. Const WS_MAXIMIZE = &H1000000
  66. ' Window field offsets for GetWindowLong()
  67. Const GWL_WNDPROC = (-4)
  68. Const GWL_STYLE = (-16)
  69. Const GWL_EXSTYLE = (-20)
  70. '$endif
  71. '$ifndef _WINKERN
  72. ' Definitions stolen from WINKERN.INC
  73. '-----------------------------------------------------------------------------
  74. Declare Function WinExec Lib "Kernel32" ALIAS "WinExec" (lpCmdLine$, nCmdShow%) As Integer
  75. '$endif