|
|
1.1 root 1: '--------------------------------------------------------------------------
2: '
3: ' MSTEST.INC Version 2.00
4: ' API Declarations for TEST Tools
5: '
6: ' NOTE: All API are ALIAS'd to themselves to support NT
7: ' API Not yet supported under NT are IFDEF'd out using the
8: ' predefine symbol of NT.
9: '
10: ' To include the various portions of this file, any combination of the
11: ' following $DEFINE's must be used in your script prior to $INCLUDEing
12: ' MSTEST.INC:
13: '
14: ' i.e. IN YOUR SCRIPT add a line such as the following to DEFINE one of
15: ' the SYMBOLS below, so you only include what you need.
16: '
17: ' REM$ DEFINE MSTest - to get everything in this include file
18: ' REM$ DEFINE TestCtrl - to get ALL the TESTCTRL declarations etc.
19: ' REM$ DEFINE TestScrn - to get ALL the TESTSCRN declarations etc.
20: ' REM$ DEFINE TestDlgs - to get ALL the TESTDLGS declarations etc.
21: ' REM$ DEFINE TestEvnt - to get ALL the TESTEVNT declarations etc.
22: ' REM$ DEFINE TestUI - to get ALL the TESTUI declarations etc.
23: '
24: ' OR USE ANY OF THE FOLLOWING SYMBOLS TO GET PARTIAL
25: '
26: ' MSTEST: includes all of MSTEST.INC
27: '
28: ' TESTCTRL: includes all of TESTCTRL
29: ' W_MISC TESTCTRL Miscellaneous routines
30: ' W_WINDOW TESTCTRL Window routines
31: ' W_MENU TESTCTRL Menu routines
32: ' W_ERROR: TESTCTRL error routines
33: ' W_CONTROL: includes all of the control declares & routines
34: ' W_BUTTON: includes all of the BUTTON declares etc.
35: ' W_CHECK: " CHECKBOX
36: ' W_OPTION " OPTION BUTTON
37: ' W_EDIT " EDIT CONTROL
38: ' W_LIST " LIST BOX
39: ' W_COMBO " COMBO BOX
40: '
41: ' TESTSCRN: includes all of TESTSCRN, Declares & Error codes
42: ' TESTSCRN_DECL: includes all SCR Declares
43: ' TESTSCRN_ERRS: includes all SCR Error codes
44: '
45: ' TESTDLGS: includes all of TESTDLGS, Declares & Error codes
46: ' TESTDLGS_DECL: includes all DLGS Declares
47: ' TESTDLGS_ERRS: includes all DLGS Error codes
48: '
49: ' TESTEVNT: includes all TESTEVNT Declares
50: '
51: ' W_ERROR_TRAP: Just like W_ERROR, but includes a generic
52: ' WErrorTrap to display WError and ErrorText
53: ' NOTE: This is not included from any other define.
54: '
55: ' NOTE: Including MSTEST.INC without out using any of the above $DEFINE's
56: ' will include only TESTDRVR.EXE trappable and untrappable error
57: ' codes, and declares for CRLF, TRUE (-1), FALSE(0), Key values for
58: ' DoKeys() from TESTEVNT and few routines from TESTCtrl.
59: '
60: '---------------------------------------------------------------------------
61: '
62: ' Copyright (C) 1991-1992 Microsoft Corporation
63: '
64: ' You have a royalty-free right to use, modify, reproduce and distribute
65: ' this file (and/or any modified version) in any way you find useful,
66: ' provided that you agree that Microsoft has no warranty, obligation or
67: ' liability for its contents. Refer to the Microsoft Windows Programmer's
68: ' Reference for further information.
69: '
70: ' This file is not garanteed by Microsoft to be error free. Every effort
71: ' has been made to ensure proper data-types and declarations etc., but no
72: ' testing has been performed using this include file. Additionally, some
73: ' API's, though listed, may not be compatible with the TESTDrvr language.
74: '
75: '----------------------------------------------------------------------------
76:
77: ' *********************
78: '$IFNDEF MSTEST_INCLUDED
79: '$DEFINE MSTEST_INCLUDED
80: ' *********************
81:
82: '----------------------------------------------------------------------------
83: ' Generic Global Variables
84: '----------------------------------------------------------------------------
85: Global CRLF As String ' UNDONE: Change to Const X = Chr$()
86: CRLF = Chr$(13) + Chr$(10) ' once supported
87:
88: Const TRUE = -1
89: Const FALSE = 0
90:
91:
92: '----------------------------------------------------------------------------
93: ' Unrecoverable TESTDRVR error codes
94: '----------------------------------------------------------------------------
95: Const ERR_STACK_OVERFLOW = 0
96: Const ERR_STACK_UNDERFLOW = 1
97: Const ERR_OUT_OF_STRING_SPACE = 2
98: Const ERR_CANT_LOAD_TESTVIEW_DLL = 3
99: Const ERR_OUT_OF_MEMORY = 4
100:
101:
102: '----------------------------------------------------------------------------
103: ' Recoverable TESTDRVR error codes
104: '----------------------------------------------------------------------------
105: Const ERR_GOSUB_STACK_OVERFLOW = 5
106: Const ERR_RETURN_WITHOUT_GOSUB = 6
107: Const ERR_BAD_FILE_NUMBER = 7
108: Const ERR_FILE_IO = 8
109: Const ERR_RUN_CMD_TOO_LONG = 9
110: Const ERR_SHELL_CMD_TOO_LONG = 10
111: Const ERR_SETFILE = 11
112: Const ERR_FILE_NUMBER_IN_USE = 12
113: Const ERR_CANT_OPEN_FILE = 13
114: Const ERR_ILLEGAL_FUNCTION_CALL = 14
115: Const ERR_INVALID_PATH = 15
116: Const ERR_INVALID_DRIVE = 16
117: Const ERR_NO_CURRENT_WORKING_DIR = 17
118: Const ERR_BAD_RUN_CMD = 18
119: Const ERR_DIVISION_BY_ZERO = 19
120: Const ERR_CANT_LOAD_DLL = 20
121: Const ERR_PROC_NOT_FOUND_IN_DLL = 21
122: Const ERR_CANNOT_RESUME = 22
123: Const ERR_MEM_ALLOC = 23
124: Const ERR_INVALID_POINTER = 24
125: Const ERR_INVALID_ALLOC_SIZE = 25
126: Const ERR_NULL_PIONTER_REF = 26
127: Const ERR_SUBSCRIPT_RANGE = 27
128: Const ERR_INPUT_PAST_EOF = 28
129: Const ERR_FILELIST_PROC = 29
130: Const ERR_INVALID_ATTRIBUTE = 30
131:
132: '$ifdef WINUSER_SHOW_COMMANDS AND NOT NT
133:
134: '----------------------------------------------------------------------------
135: ' RUN statement Show commands: RUN "command"[, [NOWAIT][, ShowCommand]]
136: ' NOTE: These are the same as the SW_ constants in Windows.h
137: '----------------------------------------------------------------------------
138: Const SW_HIDE = 0
139: Const SW_SHOWNORMAL = 1
140: Const SW_NORMAL = 1
141: Const SW_SHOWMINIMIZED = 2
142: Const SW_SHOWMAXIMIZED = 3
143: Const SW_MAXIMIZE = 3
144: Const SW_SHOWNOACTIVATE = 4
145: Const SW_SHOW = 5
146: Const SW_MINIMIZE = 6
147: Const SW_SHOWMINNOACTIVE = 7
148: Const SW_SHOWNA = 8
149: Const SW_RESTORE = 9
150:
151: '$endif WINUSER_SHOW_COMMANDS AND NOT NT
152:
153: '----------------------------------------------------------------------------
154: ' Key contants used with WKey, PlayKeys, & PlayKeyshWnd
155: '----------------------------------------------------------------------------
156: Const K_ENTER = "{ENTER}"
157: Const K_ESC = "{ESC}"
158: Const K_UP = "{UP}"
159: Const K_DOWN = "{DOWN}"
160: Const K_LEFT = "{LEFT}"
161: Const K_RIGHT = "{RIGHT}"
162: Const K_END = "{END}"
163: Const K_PGUP = "{PGUP}"
164: Const K_PGDN = "{PGDN}"
165: Const K_INSERT = "{INSERT}"
166: Const K_INS = "{INSERT}"
167: Const K_DELETE = "{DELETE}"
168: Const K_DEL = "{DELETE}"
169: Const K_HOME = "{HOME}"
170: Const K_TAB = "{TAB}"
171: Const K_BS = "{BS}"
172: Const K_F1 = "{F1}"
173: Const K_F2 = "{F2}"
174: Const K_F3 = "{F3}"
175: Const K_F4 = "{F4}"
176: Const K_F5 = "{F5}"
177: Const K_F6 = "{F6}"
178: Const K_F7 = "{F7}"
179: Const K_F8 = "{F8}"
180: Const K_F9 = "{F9}"
181: Const K_F10 = "{F10}"
182: Const K_F11 = "{F11}"
183: Const K_F12 = "{F12}"
184: Const K_F13 = "{F13}"
185: Const K_F14 = "{F14}"
186: Const K_F15 = "{F15}"
187: Const K_F16 = "{F16}"
188: Const K_SHIFT = "+"
189: Const K_CTRL = "^"
190: Const K_ALT = "%"
191:
192: ' TESTCtrl API & Constants that are always declared.
193: '
194: ' WGetFocus() simply preforms the exact function as the windows
195: ' GetFocus() API. Is contained in TESTCtrl since it is such a
196: ' commonly used API in scripts, and it makes it much easier to
197: ' use since it is defined simply by including MSTEST.INC. It is
198: ' renamed to prevent duplicate definitions due to scripts that
199: ' do define GetFocus() and include MSTEST.INC.
200: '---------------------------------------------------------------
201: Declare Function WGetFocus Lib "TESTCtrl.dll" Alias "WGetFocus" () As Integer
202: Declare Sub WSetActWnd Lib "TESTCtrl.dll" Alias "WSetActWnd" (hWnd%)
203: Declare Function WGetActWnd Lib "TESTCtrl.dll" Alias "WGetActWnd" (hWnd%) As Integer
204: Declare Function WFndWnd Lib "TESTCtrl.dll" Alias "WFndWnd" (lpszCaption$, wFlags%) As Integer
205: Declare Function WFndWndC Lib "TESTCtrl.dll" Alias "WFndWndC" (lpszText$, lpszClass$, wFlags%) As Integer
206: Declare Function WFndWndWait Lib "TESTCtrl.dll" Alias "WFndWndWait" (lpszCaption$, wFlags%, wSeconds%) As Integer
207: Declare Function WFndWndWaitC Lib "TESTCtrl.dll" Alias "WFndWndWaitC" (lpszText$, lpszClass$, wFlags%, wSeconds%) As Integer
208:
209: Const FW_DEFAULT = &h0000 'Default
210: Const FW_RESTOREICON = &h0081 '&h0080 Or FW_FOCUS
211: Const FW_NOEXIST = &h0040
212: Const FW_EXIST = &h0000 'Default
213: Const FW_CHILDNOTOK = &h0020
214: Const FW_CHILDOK = &h0000 'Default
215: Const FW_HIDDENOK = &h0010
216: Const FW_HIDDENNOTOK = &h0000 'Default
217: Const FW_ACTIVE = &h0008
218: Const FW_ALL = &h0000 'Default
219: Const FW_CASE = &h0004
220: Const FW_NOCASE = &h0000 'Default
221: Const FW_PART = &h0002
222: Const FW_FULL = &h0000 'Default
223: Const FW_FOCUS = &h0001
224: Const FW_NOFOCUS = &h0000 'Default
225:
226: ' TESTEvnt API that are always defined.
227: '--------------------------------------
228: Declare Sub DoKeys Lib "TESTEvnt.Dll" Alias "DoKeys" (lpStr$)
229: Declare Sub DoKeysHwnd Lib "TESTEvnt.Dll" Alias "DoKeyshWnd" (hWnd%, lpStr$)
230:
231: ' Useful function when working with the Windows API,
232: ' to extract the HI/LO wordt from a Long Integer.
233: '---------------------------------------------------
234: Declare Function HIWORD(LongVar&) As Integer
235: Function HIWORD (LongVar&) Static As Integer
236: HIWORD = LongVar& / 65536
237: End Function
238:
239: Declare Function LOWORD(LongVar&) As Integer
240: Function LOWORD (LongVar&) Static As Integer
241: LOWORD = LongVar& And &H0000FFFF
242: End Function
243:
244: ' Useful function when working with the Windows API,
245: ' to extract the HI/LO byte from am Integer.
246: '---------------------------------------------------
247: Declare Function HIBYTE(IntVar%) As Integer
248: Function HIBYTE (IntVar%) Static As Integer
249: HIBYTE = IntVar% / 256
250: End Function
251:
252: Declare Function LOBYTE(IntVar%) As Integer
253: Function LOBYTE (IntVar%) Static As Integer
254: LOBYTE = IntVar% And &H00FF
255: End Function
256:
257: ' *********************
258: '$ENDIF MSTEST_INCLUDED
259: ' *********************
260:
261: '----------------------------------------------------------------------------
262: ' DEFINE's that control the inclusion of the remainder of MSTEST.INC
263: '----------------------------------------------------------------------------
264: '$IFDEF MSTEST
265: '$DEFINE TESTCTRL
266: '$DEFINE TESTSCRN
267: '$DEFINE TESTDLGS
268: '$DEFINE TESTEVNT
269: '$DEFINE TESTUI
270: '$ENDIF
271:
272: '$IFDEF TESTCTRL
273: '$DEFINE W_MISC
274: '$DEFINE W_WINDOW
275: '$DEFINE W_MENU
276: '$DEFINE W_ERROR
277: '$DEFINE W_CONTROL
278: '$ENDIF
279:
280: '$IFDEF W_ERROR_TRAP
281: '$DEFINE W_ERROR
282: '$ENDIF
283:
284: '$IFDEF W_CONTROL
285: '$DEFINE W_BUTTON
286: '$DEFINE W_CHECK
287: '$DEFINE W_OPTION
288: '$DEFINE W_EDIT
289: '$DEFINE W_LIST
290: '$DEFINE W_COMBO
291: '$ENDIF
292:
293: '$IFDEF TESTSCRN
294: '$DEFINE TESTSCRN_DECL
295: '$DEFINE TESTSCRN_ERRS
296: '$ENDIF
297:
298: '$IFDEF TESTDLGS
299: '$DEFINE TESTDLGS_DECL
300: '$DEFINE TESTDLGS_ERRS
301: '$ENDIF
302:
303: '$IFDEF W_BUTTON OR W_CHECK OR W_OPTION OR W_EDIT OR W_LIST OR W_COMBO
304: '$DEFINE W_A_CONTROL
305: '$ENDIF
306:
307: ' *********************
308: '$IFDEF TESTUI AND NOT TESTUI_INCLUDED AND NOT NT
309: ' *********************
310: '----------------------------------------------------------------------------
311: ' TESTUI.dll:
312: ' Function declarations for use with TESTUI
313: '----------------------------------------------------------------------------
314: Declare Function DlgBox Lib "TESTUI.dll" Alias "DlgBox" (DlgId%, hwndOwner%, proc As CallBack, ResFile$) As Integer
315: Declare Function DlgBox3D Lib "TESTUI.dll" Alias "DlgBox3D" (DlgId%, hwndOwner%, proc As CallBack, ResFile$) As Integer
316: Declare Function SetScriptMenu Lib "TESTUI.dll" Alias "SetScriptMenu" (MenuId%, hwnd%, ResFile$) As Integer
317: Declare Function SetIconBar Lib "TESTUI.dll" Alias "SetIconBar" (IconBarId%, proc As Callback, AppName$, ResFile$, fAlwaysOnTop%) As Integer
318: Declare Function SetSysMenu Lib "TESTUI.dll" Alias "SetSysMenu" (MenuId%, proc As Callback, AppName$, ResFile$) As Integer
319: Declare Function SetSysMenu3D Lib "TESTUI.dll" Alias "SetSysMenu3D" (MenuId%, proc As Callback, AppName$, ResFile$) As Integer
320: Declare Function MSTLoadIcon Lib "TESTUI.dll" Alias "MSTLoadIcon" (IconId%, ResFile$) As Integer
321: Declare Sub MSTDestroyIcon Lib "TESTUI.dll" Alias "MSTDestroyIcon" (hIcon%)
322:
323: ' *********************
324: '$DEFINE TESTUI_INCLUDED
325: '$ENDIF
326: '$IFDEF W_MISC AND NOT W_MISC_INCLUDED
327: ' *********************
328:
329:
330: '----------------------------------------------------------------------------
331: ' W_MISC: Miscellanious Routines, types and Constants.
332: '----------------------------------------------------------------------------
333: Const MAX_CAPTION = 128
334:
335: Type INFO
336: hWnd As Integer
337: hWndParent As Integer
338: szClass As String * MAX_CAPTION
339: szCaption As String * MAX_CAPTION
340: szParentClass As String * MAX_CAPTION
341: szParentCaption As String * MAX_CAPTION
342: szModuleName As String * MAX_CAPTION
343: lStyle As Long
344: fChild As Integer
345: wID As Integer
346: wLeft As Integer
347: wTop As Integer
348: wRight As Integer
349: wBottom As Integer
350: wWidth As Integer
351: wHeight As Integer
352: End Type
353:
354: ' The 4 WMessage[W|L] API are slight variations on the windows
355: ' SendMessage() API. Two things are provided:
356: '
357: ' Validation of hWnd%: - If invalid an error value that
358: ' is trappable by WErrorTrap is
359: ' - If hWnd is NULL, the message goes
360: ' to the ActiveWindow.
361: ' Only need paramaters: Pass in only the paramaters that are needed:
362: ' WMessage: Wp and Lp are set to zero
363: ' WMessageW: Lp is set to zero
364: ' WMessageL: Wp is set to zero
365: ' WMessageWL: just like SendMessage() but with hWnd validation
366: '---------------------------------------------------------------------
367: Declare Function WMessage Lib "TESTCtrl.dll" Alias "WMessage" (hWnd%, wMsg%)
368: Declare Function WMessageW Lib "TESTCtrl.dll" Alias "WMessageW" (hWnd%, wMsg%, wp%)
369: Declare Function WMessageL Lib "TESTCtrl.dll" Alias "WMessageL" (hWnd%, wMsg%, lp As Any)
370: Declare Function WMessageWL Lib "TESTCtrl.dll" Alias "WMessageWL" (hWnd%, wMsg%, wp%, lp As Any)
371: Declare Function WIsVisible Lib "TESTCtrl.dll" Alias "WIsVisible" (hWnd%) As Integer
372: Declare Function WTextLen Lib "TESTCtrl.dll" Alias "WTextLen" (hWnd%) As Long
373: Declare Sub WGetText Lib "TESTCtrl.dll" Alias "WGetText" (hWnd%, lpszBuffer$)
374: Declare Sub WSetText Lib "TESTCtrl.dll" Alias "WSetText" (hWnd%, lpszText$)
375: Declare Function WNumAltKeys Lib "TESTCtrl.dll" Alias "WNumAltKeys" () As Integer
376: Declare Sub WGetAltKeys Lib "TESTCtrl.dll" Alias "WGetAltKeys" (lpszBuff$)
377: Declare Function WNumDupAltKeys Lib "TESTCtrl.dll" Alias "WNumDupAltKeys" () As Integer
378: Declare Sub WGetDupAltKeys Lib "TESTCtrl.dll" Alias "WGetDupAltKeys" (lpszBuff$)
379: Declare Sub WDisplayInfo Lib "TESTCtrl.dll" Alias "WDisplayInfo" (hWnd%, wDisplay%)
380: Declare Sub WGetInfo Lib "TESTCtrl.dll" Alias "WGetInfo" (hWnd%, lpInfo As INFO)
381:
382: ' Layered routines to simulate string functions for the coresponding
383: ' TESTCtrl API
384: '----------------------------------------------------------------------------
385: Declare Function GetText (hWnd%) As String
386: Declare Function GetAltKeys () As String
387: Declare Function GetDupAltKeys () As String
388:
389: Const DI_DIALOG = 1
390: Const DI_DEBUG = 2
391: Const DI_BOTH = 3
392:
393: '----------------------------------------------------------------------------
394: ' GetText: Layered routine for WGetText()
395: '----------------------------------------------------------------------------
396: Function GetText(hWnd%) Static As String
397: Dim lpszBuffer As String
398: Dim textLength As Long
399: GetText = ""
400: textLength = WTextLen(hWnd%)
401: If textLength > 0 Then
402: lpszBuffer = String$(textLength+1, " ")
403: WGetText hWnd%, lpszBuffer
404: GetText = lpszBuffer
405: End If
406: lpszBuffer = ""
407: End Function
408:
409: '----------------------------------------------------------------------------
410: ' GetAltKeys: Layered routine for WGetAltKeys()
411: '----------------------------------------------------------------------------
412: Function GetAltKeys() Static As String
413: Dim lpszBuffer As String
414: lpszBuffer = String$(WNumAltKeys()+1, " ")
415: WGetAltKeys lpszBuffer
416: GetAltKeys = lpszBuffer
417: lpszBuffer = ""
418: End Function
419:
420: '----------------------------------------------------------------------------
421: ' GetDupAltKeys: Layered routine for WGetDupAltKeys()
422: '----------------------------------------------------------------------------
423: Function GetDupAltKeys() Static As String
424: Dim lpszBuffer As String
425: lpszBuffer = String$(WNumDupAltKeys()+1, " ")
426: WGetDupAltKeys lpszBuffer
427: GetDupAltKeys = lpszBuffer
428: lpszBuffer = ""
429: End Function
430:
431: ' *********************
432: '$DEFINE W_MISC_INCLUDED
433: '$ENDIF
434: '$IFDEF TESTEVNT AND NOT TESTEVNT_INCLUDED
435: ' *********************
436:
437: '----------------------------------------------------------------------------
438: ' TESTEvnt.Dll:
439: ' Function declarations for use with TESTEvnt
440: '----------------------------------------------------------------------------
441: '$IFNDEF NT
442:
443: TYPE MEMORYINFO
444: LargestAvail AS LONG ' Largest available free block in bytes
445: MaxPagesUnlock AS LONG ' Maximum unlocked page allocation in pages
446: MaxPagesLocked AS LONG ' Maximum locked page allocation in pages
447: TotalLinBytes AS LONG ' Linear address space size in bytes
448: TotalUnlockBytes AS LONG ' Total number of unlocked bytes
449: TotalFreePhysBytes AS LONG ' Total number of free physical bytes
450: TotalPhysBytes AS LONG ' Total number of physical bytes
451: FreeLinBytes AS LONG ' Free linear address space in bytes
452: SwapFileSize AS LONG ' Size of paging file/partition in bytes
453: Reserved1 AS LONG ' reserved for future expansion, all bits set
454: Reserved2 AS LONG ' reserved for future expansion, all bits set
455: Reserved3 AS LONG ' reserved for future expansion, all bits set
456: Reserved4 AS LONG ' reserved for future expansion, all bits set
457: NumSelectors AS INTEGER ' Total number of selectors on current LDT
458: NumFreeSelectors AS INTEGER ' Number of free selectors on current LDT
459: GlobalHeapFree AS LONG ' Number of free Global bytes
460: USERHeapFree AS LONG ' Number of free bytes in USER.EXE's heap
461: GDIHeapFree AS LONG ' Number of free bytes in GDI.EXE's heap
462: SysResFree AS INTEGER ' *PERCENTAGE* of free system resources
463: END TYPE
464:
465: Declare Sub WaitUntilIdle Lib "TESTEVNT.DLL" Alias "WaitUntilIdle" ()
466: Declare Function GetMemoryInfo Lib "TESTEvnt.Dll" Alias "GetMemoryInfo" (lpMemInfo As MEMORYINFO) As Integer
467: Declare Function VMGetScreenCols Lib "TESTEvnt.Dll" Alias "VMGetScreenCols" (HWND%) As Integer
468: Declare Function VMGetCursPos Lib "TESTEvnt.Dll" Alias "VMGetCursPos" (HWND%) As Integer
469: Declare Function VMGetScreen Lib "TESTEvnt.Dll" Alias "VMGetScreen" (HWND%, UINT%, UINT%, UINT%, UINT%, LPSTR$) As Integer
470: Declare Function VMGetScreenClip Lib "TESTEvnt.Dll" Alias "VMGetScreenClip" (HWND%, UINT%, UINT%, UINT%, UINT%) As Integer
471: Declare Sub VMSetBackground Lib "TESTEvnt.Dll" Alias "VMSetBackground" (HWND%, BOOL%)
472: Declare Function VMPipeOpen Lib "TESTEvnt.Dll" Alias "VMPipeOpen" (HWND%, SCRIPTSUB As Callback ) As Integer
473: Declare Function VMPipeClose Lib "TESTEvnt.Dll" Alias "VMPipeClose" (HWND%) As Integer
474: Declare Function VMPipeGetText Lib "TESTEvnt.Dll" Alias "VMPipeGetText" (HWND%, LPSTR$ ) As Integer
475:
476: CONST PIPESTRINGSIZE = 129 ' 128 chars + NULL
477:
478: ' ** VMPipeGetText() Return values... **
479: '----------------------------------------
480: CONST PGT_FAILED = &H0000
481: CONST PGT_COMPLETE = &H0001
482: CONST PGT_MOREREADY = &H0002
483:
484: '$ENDIF NT 'for TESTEvnt VM Stuff
485:
486: Declare Sub QueKeys Lib "TESTEvnt.Dll" Alias "QueKeys" (lpStr$)
487: Declare Sub QueKeyDn Lib "TESTEvnt.Dll" Alias "QueKeyDn" (lpStr$)
488: Declare Sub QueKeyUp Lib "TESTEvnt.Dll" Alias "QueKeyUp" (lpStr$)
489: Declare Sub QueSetSpeed Lib "TESTEvnt.Dll" Alias "QueSetSpeed" (ms%)
490: Declare Sub QuePause Lib "TESTEvnt.Dll" Alias "QuePause" (ms&)
491: Declare Sub QueFlush Lib "TESTEvnt.Dll" Alias "QueFlush" (fRestoreKeyState%)
492: Declare Sub QueEmpty Lib "TESTEvnt.Dll" Alias "QueEmpty" ()
493: Declare Sub QueMouseMove Lib "TESTEvnt.Dll" Alias "QueMouseMove" (x%, y%)
494: Declare Sub QueMouseDn Lib "TESTEvnt.Dll" Alias "QueMouseDn" (iBtn%, x%, y%)
495: Declare Sub QueMouseUp Lib "TESTEvnt.Dll" Alias "QueMouseUp" (iBtn%, x%, y%)
496: Declare Sub QueMouseClick Lib "TESTEvnt.Dll" Alias "QueMouseClick" (iBtn%, x%, y%)
497: Declare Sub QueMouseDblClk Lib "TESTEvnt.Dll" Alias "QueMouseDblClk" (iBtn%, x%, y%)
498: Declare Sub QueMouseDblDn Lib "TESTEvnt.Dll" Alias "QueMouseDblDn" (iBtn%, x%, y%)
499: Declare Sub QueSetFocus Lib "TESTEvnt.Dll" Alias "QueSetFocus" (hwnd%)
500: Declare Sub QueSetRelativeWindow Lib "TESTEvnt.Dll" Alias "QueSetRelativeWindow" (hwnd%)
501:
502: '$ifndef VK_WINAPI
503: Const VK_LBUTTON = 1
504: Const VK_RBUTTON = 2
505: Const VK_MBUTTON = 4
506: '$define VK_WINAPI
507: '$endif
508:
509: ' *********************
510: '$DEFINE TESTEVNT_INCLUDED
511: '$ENDIF
512: '$IFDEF TESTSCRN_DECL AND NOT TESTSCRN_DECL_INCLUDED
513: ' *********************
514:
515:
516: '----------------------------------------------------------------------------
517: ' TESTScrn.DLL:
518: ' Type, Const, and Function declarations for use with TESTScrn
519: '----------------------------------------------------------------------------
520: Type wRect
521: x1 As Integer
522: y1 As Integer
523: x2 As Integer
524: y2 As Integer
525: End Type
526:
527: Const SCRNAPPEND = 0
528: Const SCRNREPLACE = 1
529: Const SCRNINSERT = 2
530:
531: '*** TESTSCRN.DLL Routines
532: '
533: Declare Function fCompFiles Lib "TESTScrn.DLL" Alias "fCompFiles" (lpszFileName1$, Scr1%, lpszFileName2$, Scr2%, CompareType%) As Integer
534: Declare Function fCompScreenActivate Lib "TESTScrn.DLL" Alias "fCompScreenActivate" (lpszFileName$, OpenKeys$, CloseKeys$, lpRect As wRect, Scr1%, Hide%, Flag%) As Integer
535: Declare Function fCompScreen Lib "TESTScrn.DLL" Alias "fCompScreen" (lpszFileName$, lpRect As wRect, Scr1%, Hide%, Flag%) As Integer
536: Declare Function fCompWindowActivate Lib "TESTScrn.DLL" Alias "fCompWindowActivate" (lpszFileName$, OpenKeys$, CloseKeys$, Scr1%, Hide%, Flag%) As Integer
537: Declare Function fCompWindow Lib "TESTScrn.DLL" Alias "fCompWindow" (lpszFileName$, hWnd%, Scr1%, Hide%, Flag%) As Integer
538: Declare Function fDelScreen Lib "TESTScrn.DLL" Alias "fDelScreen" (lpszFileName$, Scr%) As Integer
539: Declare Function fDumpFileToClip Lib "TESTScrn.DLL" Alias "fDumpFileToClip" (lpszFileName$, Scr%) As Integer
540: Declare Function fDumpScreenActivate Lib "TESTScrn.DLL" Alias "fDumpScreenActivate" (lpszFileName$, OpenKeys$, CloseKeys$, lpRect As wRect, Action%, Scr1%, Flag%) As Integer
541: Declare Function fDumpScreen Lib "TESTScrn.DLL" Alias "fDumpScreen" (lpszFileName$, lpRect As wRect, Action%, Scr1%, Flag%) As Integer
542: Declare Function fDumpSrnToClipActivate Lib "TESTScrn.DLL" Alias "fDumpSrnToClipActivate" (OpenKeys$, CloseKeys$, lpRect As wRect, Hide%) As Integer
543: Declare Function fDumpSrnToClip Lib "TESTScrn.DLL" Alias "fDumpSrnToClip" (lpRect As wRect, Hide%) As Integer
544: Declare Function fDumpWindowActivate Lib "TESTScrn.DLL" Alias "fDumpWindowActivate" (lpszFileName$, OpenKeys$, CloseKeys$, Action%, Scr1%, Flag%) As Integer
545: Declare Function fDumpWindow Lib "TESTScrn.DLL" Alias "fDumpWindow" (lpszFileName$, wHnd%, Action%, Scr1%, Flag%) As Integer
546: Declare Function fDumpWndToClipActivate Lib "TESTScrn.DLL" Alias "fDumpWndToClipActivate" (OpenKeys$, CloseKeys$, Hide%) As Integer
547: Declare Function fDumpWndToClip Lib "TESTScrn.DLL" Alias "fDumpWndToClip" (hWnd%, Hide%) As Integer
548: Declare Function fFileInfo Lib "TESTScrn.DLL" Alias "fFileInfo" (lpszName$, lpRect AS wRect, VideoMode AS POINTER TO INTEGER, Count AS POINTER TO INTEGER) As Integer
549: Declare Function fGetDLLVersion Lib "TESTScrn.DLL" Alias "fGetDLLVersion" (lpszFileName$) As Integer
550: Declare Function fGetMaxScreen Lib "TESTScrn.DLL" Alias "fGetMaxScreen" (lpszFileName$) As Integer
551: Declare Function fGetOS Lib "TESTScrn.DLL" Alias "fGetOS" (lpszFileName$) As Integer
552: Declare Function fSaveFileToDIB Lib "TESTScrn.DLL" Alias "fSaveFileToDIB" (lpszFileName1$, Scr%, lpszFileName2$) As Integer
553: Declare Function fSaveSrnToDIBActivate Lib "TESTScrn.DLL" Alias "fSaveSrnToDIBActivate" (lpszFileName$, OpenKeys$, CloseKeys$, lpRect As wRect, Hide%) As Integer
554: Declare Function fSaveSrnToDIB Lib "TESTScrn.DLL" Alias "fSaveSrnToDIB" (lpszFileName$, lpRect As wRect, Hide%) As Integer
555: Declare Function fSaveWndToDIBActivate Lib "TESTScrn.DLL" Alias "fSaveWndToDIBActivate" (lpszFileName$, OpenKeys$, CloseKeys$, Hide%) As Integer
556: Declare Function fSaveWndToDIB Lib "TESTScrn.DLL" Alias "fSaveWndToDIB" (lpszFileName$, hWnd%, Hide%) As Integer
557: Declare Function fViewScreen Lib "TESTScrn.DLL" Alias "fViewScreen" (lpszFileName$, hWnd%, Scr1%, Action%) As Integer
558:
559:
560: ' *********************
561: '$DEFINE TESTSCRN_DECL_INCLUDED
562: '$ENDIF
563: '$IFDEF TESTSCRN_ERRS AND NOT TESTSCRN_ERRS_INCLUDED
564: ' *********************
565:
566:
567: '*** TESTScrn.DLL Error Codes
568: '
569: Const ERR_SCR_NOERROR = 0
570: Const ERR_SCR_FILEACCESS = 301
571: Const ERR_SCR_INVALIDFIL = 302
572: Const ERR_SCR_INVALSRNID = 303
573: Const ERR_SCR_INVALSRNMD = 304
574: Const ERR_SCR_OUTOMEMORY = 305
575: Const ERR_SCR_READSRNFIL = 306
576: Const ERR_SCR_RELMEMORY = 307
577: Const ERR_SCR_CREATEDDB = 308
578: Const ERR_SCR_RWSRNTABLE = 309
579: Const ERR_SCR_RWCOLTABLE = 310
580: Const ERR_SCR_WSRNIMAGE = 311
581: Const ERR_SCR_WFILEHEAD = 312
582: Const ERR_SCR_CREATEDIB = 313
583: Const ERR_SCR_SCREENSIZE = 314
584: Const ERR_SCR_DISPSCREEN = 315
585: Const ERR_SCR_INVALIDACT = 316
586: Const ERR_SCR_IMAGEDIFF = 317
587: Const ERR_SCR_SRNSIZEDIF = 318
588: Const ERR_SCR_FILEEXIST = 319
589: Const ERR_SCR_CTEMPFILE = 320
590: Const ERR_SCR_HIDEWIN = 321
591: Const ERR_SCR_INVALWHAND = 322
592: Const ERR_SCR_OFILEFORM = 323
593: Const ERR_SCR_SRNFILEFUL = 324
594: Const ERR_SCR_INVALSCALE = 325
595: Const ERR_SCR_OPENCB = 326
596: Const ERR_SCR_EMPTYCB = 327
597: Const ERR_SCR_COPYTOCB = 328
598: Const ERR_SCR_CLOSECB = 329
599: Const ERR_SCR_CREATEPAL = 330
600: Const ERR_SCR_LIBLOADERR = 331
601:
602:
603: ' *********************
604: '$DEFINE TESTSCRN_ERRS_INCLUDED
605: '$ENDIF
606: '$IFNDEF NT
607: '$IFDEF TESTDLGS_DECL AND NOT TESTDLGS_DECL_INCLUDED
608: ' *********************
609:
610:
611: '----------------------------------------------------------------------------
612: ' TESTDlgs.DLL:
613: ' Type, Const, and Function declarations for use with TESTDlgs
614: '----------------------------------------------------------------------------
615: Const cchCLASSMAC = 32
616: Const cchTEXTMAC = 256
617: Const wVEREB = 1
618:
619: Type DCR
620: xLeft As Integer
621: yMin As Integer
622: xRight As Integer
623: yLast As Integer
624: End Type
625:
626: Declare Function AwaitSaveCompletion Lib "TESTDlgs.DLL" Alias "AwaitSaveCompletion" () As Integer
627: Declare Function ComparisonResults Lib "TESTDlgs.DLL" Alias "ComparisonResults" () As Integer
628: Declare Function CmpWindow Lib "TESTDlgs.DLL" Alias "CmpWindow" (hWnd%, nDialog%, fIncludeParent%) As Integer
629: Declare Function CmpWindowActivate Lib "TESTDlgs.DLL" Alias "CmpWindowActivate" (lpszOpenKeys$, lpszCloseKey$, nDialog%, fIncludeParent%) As Integer
630: Declare Function CmpWindowCaption Lib "TESTDlgs.DLL" Alias "CmpWindowCaption" (lpszCap$, nDialog%, fIncludeParent%) As Integer
631: Declare Function CmpWindowDelayed Lib "TESTDlgs.DLL" Alias "CmpWindowDelayed" (nDelay%, nDialog%, fIncludeParent%, lpszCloseKeys$) As Integer
632: Declare Function FindWindowCaption Lib "TESTDlgs.DLL" Alias "FindWindowCaption" (lpszCap$, hWndStart%) As Integer
633: Declare Function SaveMenu Lib "TESTDlgs.DLL" Alias "SaveMenu" (hWnd%, nDialog%, lpszDesc$, fReplace%) As Integer
634: Declare Function SaveMenuActivate Lib "TESTDlgs.DLL" Alias "SaveMenuActivate" (lpszOpenKeys$, lpszCloseKeys$, nDialog%, lpszDesc$, fReplace%) As Integer
635: Declare Function SaveMenuCaption Lib "TESTDlgs.DLL" Alias "SaveMenuCaption" (lpszCap$, nDialog%, lpszDesc$, fReplace%) As Integer
636: Declare Function SaveMenuDelayed Lib "TESTDlgs.DLL" Alias "SaveMenuDelayed" (nDelay%, nDialog%, lpszDesc$, fReplace%, CloseKeys$) As Integer
637: Declare Function SaveWindow Lib "TESTDlgs.DLL" Alias "SaveWindow" (hWnd%, nDialog%, lpszDesc$, fReplace%, fIncludeParent%) As Integer
638: Declare Function SaveWindowActivate Lib "TESTDlgs.DLL" Alias "SaveWindowActivate" (lpszOpenKeys$, lpszCloseKeys$, nDialog%, lpszDesc$, fReplace%, fIncludeParent%) As Integer
639: Declare Function SaveWindowCaption Lib "TESTDlgs.DLL" Alias "SaveWindowCaption" (lpszCap$, nDialog%, lpszDesc$, fReplace%, fIncludeParent%) As Integer
640: Declare Function SaveWindowDelayed Lib "TESTDlgs.DLL" Alias "SaveWindowDelayed" (nDelay%, nDialog%, lpszDesc$, fReplace%, fIncludeParent%, lpszCloseKeys$) As Integer
641: Declare Function SetDialogFile Lib "TESTDlgs.DLL" Alias "SetDialogFile" (lpszDialogName$) As Integer
642: Declare Function SetLogFile Lib "TESTDlgs.DLL" Alias "SetLogFile" (lpszLogName$) As Integer
643:
644:
645: ' *********************
646: '$DEFINE TESTDLGS_DECL_INCLUDED
647: '$ENDIF
648: '$IFDEF TESTDLGS_ERRS AND NOT TESTDLGS_ERRS_INCLUDED
649: ' *********************
650:
651:
652: '*** Function return codes
653: '
654: Const ERR_DLGS_NOERR = 0
655: Const ERR_DLGS_FUZZY = -1
656: Const ERR_DLGS_EXCESS = -2
657: Const ERR_DLGS_CTLNOTFOUND = -3
658: Const ERR_DLGS_NODLGFILE = -10
659: Const ERR_DLGS_FILENOTFOUND = -11
660: Const ERR_DLGS_BADWDLFILE = -12
661: Const ERR_DLGS_LIBLOADERR = -13
662: Const ERR_DLGS_SAVEERR = -14
663: Const ERR_DLGS_DLGFILEERR = -15
664: Const ERR_DLGS_TMPFILEERR = -16
665: Const ERR_DLGS_VERSIONERR = -17
666: Const ERR_DLGS_DLGFILEFULL = -18
667: Const ERR_DLGS_OUTOFMEMORY = -20
668: Const ERR_DLGS_BUFFERERR = -21
669: Const ERR_DLGS_NOTIMER = -22
670: Const ERR_DLGS_NODYNDIALOG = -30
671: Const ERR_DLGS_INVALIDHWND = -31
672: Const ERR_DLGS_BADCAPTION = -32
673: Const ERR_DLGS_BADDLGNUM = -33
674: Const ERR_DLGS_BADCTLINDEX = -34
675: Const ERR_DLGS_BADCTLTYPE = -35
676: Const ERR_DLGS_BADSAVEACTION = -36
677: Const ERR_DLGS_APPSPECIFIC = -37
678:
679:
680: ' *********************
681: '$DEFINE TESTDLGS_ERRS_INCLUDED
682: '$ENDIF
683: '$ENDIF NT for TESTDLGS
684: '$IFDEF W_WINDOW AND NOT W_WINDOW_INCLUDED
685: ' *********************
686:
687:
688: '----------------------------------------------------------------------------
689: ' TESTCtrl.dll routines, types, & constants
690: '----------------------------------------------------------------------------
691:
692: '*** Window size and position types
693: '
694: Type WNDPOS
695: wLeft As Integer
696: wTop As Integer
697: End Type
698:
699: Type WNDSIZ
700: wWidth As Integer
701: wHeight As Integer
702: End Type
703:
704: Type WNDPOSSIZ
705: wLeft As Integer
706: wTop As Integer
707: wWidth As Integer
708: wHeight As Integer
709: End Type
710:
711: '*** Window Positioning and Sizing routines & contants
712: '
713: Declare Sub WMinWnd Lib "TESTCtrl.dll" Alias "WMinWnd" (hWnd%)
714: Declare Sub WMaxWnd Lib "TESTCtrl.dll" Alias "WMaxWnd" (hWnd%)
715: Declare Sub WResWnd Lib "TESTCtrl.dll" Alias "WResWnd" (hWnd%)
716: Declare Sub WSetWndPos Lib "TESTCtrl.dll" Alias "WSetWndPos" (hWnd%, wLeft%, wTop%)
717: Declare Sub WSetWndSiz Lib "TESTCtrl.dll" Alias "WSetWndSiz" (hWnd%, wWidth%, wHeight%)
718: Declare Sub WSetWndPosSiz Lib "TESTCtrl.dll" Alias "WSetWndPosSiz" (hWnd%, wLeft%, wTop%, wWidth%, wHeight%)
719: Declare Sub WAdjWndPos Lib "TESTCtrl.dll" Alias "WAdjWndPos" (hWnd%, deltaLeft%, deltaTop%)
720: Declare Sub WAdjWndSiz Lib "TESTCtrl.dll" Alias "WAdjWndSiz" (hWnd%, deltaWidth%, deltaHeight%)
721: Declare Sub WAdjWndPosSiz Lib "TESTCtrl.dll" Alias "WAdjWndPosSiz" (hWnd%, deltaLeft%, deltaTop%, deltaWidth%, deltaHeight%)
722: Declare Sub WGetWndPos Lib "TESTCtrl.dll" Alias "WGetWndPos" (hWnd%, lpWndPos As WNDPOS, fRelative%)
723: Declare Sub WGetWndSiz Lib "TESTCtrl.dll" Alias "WGetWndSiz" (hWnd%, lpWndSiz As WNDSIZ)
724: Declare Sub WGetWndPosSiz Lib "TESTCtrl.dll" Alias "WGetWndPosSiz" (hWnd%, lpWndPosSiz As WNDPOSSIZ, fRelative%)
725: Declare Function WIsMaximized Lib "TESTCtrl.dll" Alias "WIsMaximized" (hWnd%) As Integer
726: Declare Function WIsMinimized Lib "TESTCtrl.dll" Alias "WIsMinimized" (hWnd%) As Integer
727:
728:
729: Const W_RELATIVE = TRUE
730: Const W_ABSOLUTE = FALSE
731:
732:
733: ' *********************
734: '$DEFINE W_WINDOW_INCLUDED
735: '$ENDIF
736: '$IFDEF W_MENU AND NOT W_MENU_INCLUDED
737: ' *********************
738:
739:
740: '*** Menu routines & constants
741: '
742: Declare Sub WSysMenu Lib "TESTCtrl.dll" Alias "WSysMenu" (hWnd%)
743: Declare Function WSysMenuExists Lib "TESTCtrl.dll" Alias "WSysMenuExists" (hWnd%) As Integer
744: Declare Sub WMenu Lib "TESTCtrl.dll" Alias "WMenu" (lpszName$)
745: Declare Sub WMenuEx CDECL Lib "TESTCtrl.dll" Alias "WMenuEx" (lpszName$, ...)
746: Declare Function WMenuExists Lib "TESTCtrl.dll" Alias "WMenuExists" (lpszName$) As Integer
747: Declare Function WMenuGrayed Lib "TESTCtrl.dll" Alias "WMenuGrayed" (lpszName$) As Integer
748: Declare Function WMenuChecked Lib "TESTCtrl.dll" Alias "WMenuChecked" (lpszName$) As Integer
749: Declare Function WMenuEnabled Lib "TESTCtrl.dll" Alias "WMenuEnabled" (lpszName$) As Integer
750: Declare Function WMenuCount Lib "TESTCtrl.dll" Alias "WMenuCount" () As Integer
751: Declare Sub WMenuText Lib "TESTCtrl.dll" Alias "WMenuText" (lpszName$, lpszBuffer$)
752: Declare Function WMenuLen Lib "TESTCtrl.dll" Alias "WMenuLen" (lpszName$) As Integer
753: Declare Sub WMenuFullText Lib "TESTCtrl.dll" Alias "WMenuFullText" (lpszName$, lpszBuffer$)
754: Declare Function WMenuFullLen Lib "TESTCtrl.dll" Alias "WMenuFullLen" (lpszName$) As Integer
755: Declare Sub WMenuEnd Lib "TESTCtrl.dll" Alias "WMenuEnd" ()
756: Declare Function WMenuNumAltKeys Lib "TESTCtrl.dll" Alias "WMenuNumAltKeys" () As Integer
757: Declare Sub WMenuGetAltKeys Lib "TESTCtrl.dll" Alias "WMenuGetAltKeys" (lpszBuff$)
758: Declare Function WMenuNumDupAltKeys Lib "TESTCtrl.dll" Alias "WMenuNumDupAltKeys" () As Integer
759: Declare Sub WMenuGetDupAltKeys Lib "TESTCtrl.dll" Alias "WMenuGetDupAltKeys" (lpszBuff$)
760:
761: ' Layered routines to simulate string functions for the coresponding
762: ' TESTCtrl API
763: '----------------------------------------------------------------------------
764: Declare Function MenuText (lpszName$) As String
765: Declare Function MenuFullText (lpszName$) As String
766: Declare Function MenuGetAltKeys () As String
767: Declare Function MenuGetDupAltKeys () As String
768:
769: ' Unlike the rest of the menu routines, WMenuSeparator() does not ignore
770: ' menu separators when specifing indexes. The first menu item is item #1
771: ' the second #2, and so on including all separators.
772: '------------------------------------------------------------------------
773: Declare Function WMenuSeparator Lib "TESTCtrl.dll" Alias "WMenuSeparator" (sIndex%) As Integer
774:
775: ' Obsolete Menu API
776: '------------------
777: Declare Sub WMenuX Lib "TESTCtrl.dll" Alias "WMenuX" (iIndex%)
778: Declare Function WMenuGrayedX Lib "TESTCtrl.dll" Alias "WMenuGrayedX" (iIndex%) As Integer
779: Declare Function WMenuCheckedX Lib "TESTCtrl.dll" Alias "WMenuCheckedX" (iIndex%) As Integer
780: Declare Function WMenuEnabledX Lib "TESTCtrl.dll" Alias "WMenuEnabledX" (iIndex%) As Integer
781:
782:
783: '----------------------------------------------------------------------------
784: ' MenuText: Layered routine for WMenuText()
785: '----------------------------------------------------------------------------
786: Function MenuText(lpszName$) Static As String
787: Dim lpszBuffer As String
788: Dim menuLength As Integer
789: MenuText = ""
790: menuLength = WMenuLen(lpszName$)
791: If menuLength >= 0 Then
792: lpszBuffer = String$(menuLength+1, " ")
793: WMenuText lpszName$, lpszBuffer
794: MenuText = lpszBuffer
795: End if
796: lpszBuffer = ""
797: End Function
798:
799: '----------------------------------------------------------------------------
800: ' MenuFullText: Layered routine for WMenuFullText()
801: '----------------------------------------------------------------------------
802: Function MenuFullText(lpszName$) Static As String
803: Dim lpszBuffer As String
804: Dim menuLength As Integer
805: MenuFullText = ""
806: menuLength = WMenuFullLen(lpszName$)
807: If menuLength >= 0 Then
808: lpszBuffer = String$(menuLength+1, " ")
809: WMenuFullText lpszName$, lpszBuffer
810: MenuFullText = lpszBuffer
811: End If
812: lpszBuffer = ""
813: End Function
814:
815: '----------------------------------------------------------------------------
816: ' MenuGetAltKeys: Layered routine for WMenuGetAltKeys()
817: '----------------------------------------------------------------------------
818: Function MenuGetAltKeys() Static As String
819: Dim lpszBuffer As String
820: lpszBuffer = String$(WMenuNumAltKeys()+1, " ")
821: WMenuGetAltKeys lpszBuffer
822: MenuGetAltKeys = lpszBuffer
823: lpszBuffer = ""
824: End Function
825:
826: '----------------------------------------------------------------------------
827: ' MenuGetDupAltKeys: Layered routine for WMenuGetDupAltKeys()
828: '----------------------------------------------------------------------------
829: Function MenuGetDupAltKeys() Static As String
830: Dim lpszBuffer As String
831: lpszBuffer = String$(WMenuNumDupAltKeys()+1, " ")
832: WMenuGetDupAltKeys lpszBuffer
833: MenuGetDupAltKeys = lpszBuffer
834: lpszBuffer = ""
835: End Function
836:
837: ' *********************
838: '$DEFINE W_MENU_INCLUDED
839: '$ENDIF
840: '$IFDEF W_A_CONTROL AND NOT W_A_CONTROL_INCLUDED
841: ' *********************
842:
843:
844: '*** Global routine & constants used by all controls
845: '
846: Declare Sub WStaticSetClass Lib "TESTCtrl.dll" Alias "WStaticSetClass" (lpszClassName$)
847: Declare Sub WResetClasses Lib "TESTCtrl.dll" Alias "WResetClasses" ()
848:
849:
850: ' *********************
851: '$DEFINE W_A_CONTROL_INCLUDED
852: '$ENDIF
853: '$IFDEF W_BUTTON AND NOT W_BUTTON_INCLUDED
854: ' *********************
855:
856:
857: '*** Button routines
858: '
859: Declare Sub WButtonSetClass Lib "TESTCtrl.dll" Alias "WButtonSetClass" (lpszClassName$)
860: Declare Function WButtonExists Lib "TESTCtrl.dll" Alias "WButtonExists" (lpszName$) As Integer
861: Declare Function WButtonEnabled Lib "TESTCtrl.dll" Alias "WButtonEnabled" (lpszName$) As Integer
862: Declare Function WButtonFocus Lib "TESTCtrl.dll" Alias "WButtonFocus" (lpszName$) As Integer
863: Declare Sub WButtonClick Lib "TESTCtrl.dll" Alias "WButtonClick" (lpszName$)
864: Declare Sub WButtonHide Lib "TESTCtrl.dll" Alias "WButtonHide" (lpszName$)
865: Declare Sub WButtonShow Lib "TESTCtrl.dll" Alias "WButtonShow" (lpszName$)
866: Declare Sub WButtonEnable Lib "TESTCtrl.dll" Alias "WButtonEnable" (lpszName$)
867: Declare Sub WButtonDisable Lib "TESTCtrl.dll" Alias "WButtonDisable" (lpszName$)
868: Declare Function WButtonDefault Lib "TESTCtrl.dll" Alias "WButtonDefault" (lpszName$) As Integer
869: Declare Function WButtonDefaults Lib "TESTCtrl.dll" Alias "WButtonDefaults" () As Integer
870: Declare Sub WButtonSetFocus Lib "TESTCtrl.dll" Alias "WButtonSetFocus" (lpszName$)
871:
872: ' *********************
873: '$DEFINE W_BUTTON_INCLUDED
874: '$ENDIF
875: '$IFDEF W_CHECK AND NOT W_CHECK_INCLUDED
876: ' *********************
877:
878:
879: ' CheckBox routines
880: '
881: Declare Sub WCheckSetClass Lib "TESTCtrl.dll" Alias "WCheckSetClass" (lpszClassName$)
882: Declare Function WCheckExists Lib "TESTCtrl.dll" Alias "WCheckExists" (lpszName$) As Integer
883: Declare Function WCheckEnabled Lib "TESTCtrl.dll" Alias "WCheckEnabled" (lpszName$) As Integer
884: Declare Function WCheckFocus Lib "TESTCtrl.dll" Alias "WCheckFocus" (lpszName$) As Integer
885: Declare Function WCheckState Lib "TESTCtrl.dll" Alias "WCheckState" (lpszName$) As Integer
886: Declare Sub WCheckClick Lib "TESTCtrl.dll" Alias "WCheckClick" (lpszName$)
887: Declare Sub WCheckHide Lib "TESTCtrl.dll" Alias "WCheckHide" (lpszName$)
888: Declare Sub WCheckShow Lib "TESTCtrl.dll" Alias "WCheckShow" (lpszName$)
889: Declare Sub WCheckEnable Lib "TESTCtrl.dll" Alias "WCheckEnable" (lpszName$)
890: Declare Sub WCheckDisable Lib "TESTCtrl.dll" Alias "WCheckDisable" (lpszName$)
891: Declare Sub WCheckCheck Lib "TESTCtrl.dll" Alias "WCheckCheck" (lpszName$)
892: Declare Sub WCheckUnCheck Lib "TESTCtrl.dll" Alias "WCheckUnCheck" (lpszName$)
893: Declare Sub WCheckSetFocus Lib "TESTCtrl.dll" Alias "WCheckSetFocus" (lpszName$)
894:
895: Const UNCHECKED = 0
896: Const CHECKED = 1
897: Const GRAYED = 2
898:
899:
900: ' *********************
901: '$DEFINE W_CHECK_INCLUDED
902: '$ENDIF
903: '$IFDEF W_OPTION AND NOT W_OPTION_INCLUDED
904: ' *********************
905:
906:
907: '*** Option Button routines
908: '
909: Declare Sub WOptionSetClass Lib "TESTCtrl.dll" Alias "WOptionSetClass" (lpszClassName$)
910: Declare Function WOptionExists Lib "TESTCtrl.dll" Alias "WOptionExists" (lpszName$) As Integer
911: Declare Function WOptionEnabled Lib "TESTCtrl.dll" Alias "WOptionEnabled" (lpszName$) As Integer
912: Declare Function WOptionFocus Lib "TESTCtrl.dll" Alias "WOptionFocus" (lpszName$) As Integer
913: Declare Function WOptionState Lib "TESTCtrl.dll" Alias "WOptionState" (lpszName$) As Integer
914: Declare Sub WOptionClick Lib "TESTCtrl.dll" Alias "WOptionClick" (lpszName$)
915: Declare Sub WOptionHide Lib "TESTCtrl.dll" Alias "WOptionHide" (lpszName$)
916: Declare Sub WOptionShow Lib "TESTCtrl.dll" Alias "WOptionShow" (lpszName$)
917: Declare Sub WOptionEnable Lib "TESTCtrl.dll" Alias "WOptionEnable" (lpszName$)
918: Declare Sub WOptionDisable Lib "TESTCtrl.dll" Alias "WOptionDisable" (lpszName$)
919: Declare Sub WOptionSelect Lib "TESTCtrl.dll" Alias "WOptionSelect" (lpszName$)
920: Declare Sub WOptionSetFocus Lib "TESTCtrl.dll" Alias "WOptionSetFocus" (lpszName$)
921:
922: ' *********************
923: '$DEFINE W_OPTION_INCLUDED
924: '$ENDIF
925: '$IFDEF W_LIST AND NOT W_LIST_INCLUDED
926: ' *********************
927:
928:
929: '*** Listbox routines
930: '
931: Declare Sub WListSetClass Lib "TESTCtrl.dll" Alias "WListSetClass" (lpszClass$)
932: Declare Function WListExists Lib "TESTCtrl.dll" Alias "WListExists" (lpszName$) As Integer
933: Declare Function WListCount Lib "TESTCtrl.dll" Alias "WListCount" (lpszName$) As Integer
934: Declare Sub WListText Lib "TESTCtrl.dll" Alias "WListText" (lpszName$, lpszBuffer$)
935: Declare Function WListLen Lib "TESTCtrl.dll" Alias "WListLen" (lpszName$) As Integer
936: Declare Function WListIndex Lib "TESTCtrl.dll" Alias "WListIndex" (lpszName$) As Integer
937: Declare Function WListTopIndex Lib "TESTCtrl.dll" Alias "WListTopIndex" (lpszName$) As Integer
938: Declare Sub WListItemText Lib "TESTCtrl.dll" Alias "WListItemText" (lpszName$, iItem%, lpszBuffer$)
939: Declare Function WListItemLen Lib "TESTCtrl.dll" Alias "WListItemLen" (lpszName$, iItem%) As Integer
940: Declare Function WListItemExists Lib "TESTCtrl.dll" Alias "WListItemExists" (lpszName$, lpszItem$) As Integer
941: Declare Sub WListItemClk Lib "TESTCtrl.dll" Alias "WListItemClk" (lpszName$, iItem%)
942: Declare Sub WListItemCtrlClk Lib "TESTCtrl.dll" Alias "WListItemCtrlClk" (lpszName$, iItem%)
943: Declare Sub WListItemShftClk Lib "TESTCtrl.dll" Alias "WListItemShftClk" (lpszName$, iItem%)
944: Declare Sub WListItemDblClk Lib "TESTCtrl.dll" Alias "WListItemDblClk" (lpszName$, iItem%)
945: Declare Sub WListItemClkT Lib "TESTCtrl.dll" Alias "WListItemClkT" (lpszName$, lpszItem$)
946: Declare Sub WListItemCtrlClkT Lib "TESTCtrl.dll" Alias "WListItemCtrlClkT" (lpszName$, lpszItem$)
947: Declare Sub WListItemShftClkT Lib "TESTCtrl.dll" Alias "WListItemShftClkT" (lpszName$, lpszItem$)
948: Declare Sub WListItemDblClkT Lib "TESTCtrl.dll" Alias "WListItemDblClkT" (lpszName$, lpszItem$)
949: Declare Function WListSelCount Lib "TESTCtrl.dll" Alias "WListSelCount" (lpszName$) As Integer
950: Declare Sub WListSelItems Lib "TESTCtrl.dll" Alias "WListSelItems" (lpszName$, lpIntArray As Pointer To Integer)
951: Declare Sub WListClear Lib "TESTCtrl.dll" Alias "WListClear" (lpszName$)
952: Declare Sub WListAddItem Lib "TESTCtrl.dll" Alias "WListAddItem" (lpszName$, lpszItem$)
953: Declare Sub WListDelItem Lib "TESTCtrl.dll" Alias "WListDelItem" (lpszName$, iItem%)
954: Declare Sub WListDelItemT Lib "TESTCtrl.dll" Alias "WListDelItemT" (lpszName$, lpszItem$)
955: Declare Function WListEnabled Lib "TESTCtrl.dll" Alias "WListEnabled" (lpszName$) As Integer
956: Declare Sub WListSetFocus Lib "TESTCtrl.dll" Alias "WListSetFocus" (lpszName$)
957:
958: ' Layered routines to simulate string functions for the coresponding
959: ' TESTCtrl API
960: '----------------------------------------------------------------------------
961: Declare Function ListText (lpszName$) As String
962: Declare Function ListItemText (lpszName$, iItem%) As String
963:
964: '----------------------------------------------------------------------------
965: ' ListText: Layered routine for WListText()
966: '----------------------------------------------------------------------------
967: Function ListText(lpszName$) Static As String
968: Dim lpszBuffer As String
969: Dim itemLength As Integer
970: ListText = ""
971: itemLength = WListLen(lpszName)
972: If itemLength >= 0 Then
973: lpszBuffer = String$(itemLength+1, " ")
974: WListText lpszName, lpszBuffer
975: ListText = lpszBuffer
976: End If
977: lpszBuffer = ""
978: End Function
979:
980: '----------------------------------------------------------------------------
981: ' ListItemText: Layered routine for WListItemText()
982: '----------------------------------------------------------------------------
983: Function ListItemText(lpszName$, sItem%) Static As String
984: Dim lpszBuffer As String
985: Dim itemLength As Integer
986: ListItemText = ""
987: itemLength = WListItemLen(lpszName, sItem)
988: If itemLength >= 0 Then
989: lpszBuffer = String$(itemLength+1, " ")
990: WListItemText lpszName, sItem, lpszBuffer
991: ListItemText = lpszBuffer
992: End If
993: lpszBuffer = ""
994: End Function
995:
996:
997: ' *********************
998: '$DEFINE W_LIST_INCLUDED
999: '$ENDIF
1000: '$IFDEF W_COMBO AND NOT W_COMBO_INCLUDED
1001: ' *********************
1002:
1003:
1004: '*** Combobox routines
1005: '
1006: Declare Sub WComboSetClass Lib "TESTCtrl.dll" Alias "WComboSetClass" (lpszClass$)
1007: Declare Sub WComboSetLBClass Lib "TESTCtrl.dll" Alias "WComboSetLBClass" (lpszClass$)
1008: Declare Function WComboExists Lib "TESTCtrl.dll" Alias "WComboExists" (lpszName$) As Integer
1009: Declare Function WComboCount Lib "TESTCtrl.dll" Alias "WComboCount" (lpszName$) As Integer
1010: Declare Sub WComboSetText Lib "TESTCtrl.dll" Alias "WComboSetText" (lpszName$, lpszText$)
1011: Declare Sub WComboText Lib "TESTCtrl.dll" Alias "WComboText" (lpszName$, lpszBuffer$)
1012: Declare Function WComboLen Lib "TESTCtrl.dll" Alias "WComboLen" (lpszName$) As Integer
1013: Declare Sub WComboSelText Lib "TESTCtrl.dll" Alias "WComboSelText" (lpszName$, lpszBuffer$)
1014: Declare Function WComboSelLen Lib "TESTCtrl.dll" Alias "WComboSelLen" (lpszName$) As Integer
1015: Declare Function WComboIndex Lib "TESTCtrl.dll" Alias "WComboIndex" (lpszName$) As Integer
1016: Declare Sub WComboItemText Lib "TESTCtrl.dll" Alias "WComboItemText" (lpszName$, iItem%, lpszBuffer$)
1017: Declare Function WComboItemLen Lib "TESTCtrl.dll" Alias "WComboItemLen" (lpszName$, iItem%) As Integer
1018: Declare Function WComboItemExists Lib "TESTCtrl.dll" Alias "WComboItemExists" (lpszName$, lpszItem$) As Integer
1019: Declare Sub WComboItemClk Lib "TESTCtrl.dll" Alias "WComboItemClk" (lpszName$, iItem%)
1020: Declare Sub WComboItemDblClk Lib "TESTCtrl.dll" Alias "WComboItemDblClk" (lpszName$, iItem%)
1021: Declare Sub WComboItemClkT Lib "TESTCtrl.dll" Alias "WComboItemClkT" (lpszName$, lpszItem$)
1022: Declare Sub WComboItemDblClkT Lib "TESTCtrl.dll" Alias "WComboItemDblClkT" (lpszName$, lpszItem$)
1023: Declare Sub WComboClear Lib "TESTCtrl.dll" Alias "WComboClear" (lpszName$)
1024: Declare Sub WComboAddItem Lib "TESTCtrl.dll" Alias "WComboAddItem" (lpszName$, lpszItem$)
1025: Declare Sub WComboDelItem Lib "TESTCtrl.dll" Alias "WComboDelItem" (lpszName$, iItem%)
1026: Declare Sub WComboDelItemT Lib "TESTCtrl.dll" Alias "WComboDelItemT" (lpszName$, lpszItem$)
1027: Declare Function WComboEnabled Lib "TESTCtrl.dll" Alias "WComboEnabled" (lpszName$) As Integer
1028: Declare Sub WComboSetFocus Lib "TESTCtrl.dll" Alias "WComboSetFocus" (lpszName$)
1029:
1030: ' Layered routines to simulate string functions for the coresponding
1031: ' TESTCtrl API
1032: '----------------------------------------------------------------------------
1033: Declare Function ComboText (lpszName$) As String
1034: Declare Function ComboSelText (lpszName$) As String
1035: Declare Function ComboItemText (lpszName$, iItem%) As String
1036:
1037: '----------------------------------------------------------------------------
1038: ' ComboText: Layered routine for WComboText()
1039: '----------------------------------------------------------------------------
1040: Function ComboText(lpszName$) Static As String
1041: Dim lpszBuffer As String
1042: Dim itemLength As Integer
1043: ComboText = ""
1044: itemLength = WComboLen(lpszName$)
1045: If itemLength >= 0 Then
1046: lpszBuffer = String$(itemLength+1, " ")
1047: WComboText lpszName, lpszBuffer
1048: ComboText = lpszBuffer
1049: End If
1050: lpszBuffer = ""
1051: End Function
1052:
1053: '----------------------------------------------------------------------------
1054: ' ComboSelText: Layered routine for WComboSelText()
1055: '----------------------------------------------------------------------------
1056: Function ComboSelText(lpszName$) Static As String
1057: Dim lpszBuffer As String
1058: Dim itemLength As Integer
1059: ComboSelText = ""
1060: itemLength = WComboSelLen(lpszName$)
1061: If itemLength >= 0 Then
1062: lpszBuffer = String$(itemLength+1, " ")
1063: WComboSelText lpszName, lpszBuffer
1064: ComboSelText = lpszBuffer
1065: End If
1066: lpszBuffer = ""
1067: End Function
1068:
1069: '----------------------------------------------------------------------------
1070: ' ComboItemText: Layered routine for WComboItemText()
1071: '----------------------------------------------------------------------------
1072: Function ComboItemText(lpszName$, sItem%) Static As String
1073: Dim lpszBuffer As String
1074: Dim itemLength As Integer
1075: ComboItemText = ""
1076: itemLength = WComboItemLen(lpszName, sItem)
1077: If itemLength >= 0 Then
1078: lpszBuffer = String$(itemLength+1, " ")
1079: WComboItemText lpszName, sItem, lpszBuffer
1080: ComboItemText = lpszBuffer
1081: End If
1082: lpszBuffer = ""
1083: End Function
1084:
1085:
1086: ' *********************
1087: '$DEFINE W_COMBO_INCLUDED
1088: '$ENDIF
1089: '$IFDEF W_EDIT AND NOT W_EDIT_INCLUDED
1090: ' *********************
1091:
1092:
1093: '*** Edit box routines
1094: '
1095: Declare Sub WEditSetClass Lib "TESTCtrl.dll" Alias "WEditSetClass" (lpszClass$)
1096: Declare Function WEditExists Lib "TESTCtrl.dll" Alias "WEditExists" (lpszName$) As Integer
1097: Declare Function WEditLen Lib "TESTCtrl.dll" Alias "WEditLen" (lpszName$) As Long
1098: Declare Sub WEditText Lib "TESTCtrl.dll" Alias "WEditText" (lpszName$, lpszBuffer$)
1099: Declare Sub WEditSetText Lib "TESTCtrl.dll" Alias "WEditSetText" (lpszName$, lpszBuffer$)
1100: Declare Sub WEditSelText Lib "TESTCtrl.dll" Alias "WEditSelText" (lpszName$, lpszBuffer$)
1101: Declare Function WEditSelLen Lib "TESTCtrl.dll" Alias "WEditSelLen" (lpszName$) As Long
1102: Declare Sub WEditLineText Lib "TESTCtrl.dll" Alias "WEditLineText" (lpszName$, lIndex&, lpszBuffer$)
1103: Declare Function WEditLineLen Lib "TESTCtrl.dll" Alias "WEditLineLen" (lpszName$, lIndex&) As Long
1104: Declare Function WEditPos Lib "TESTCtrl.dll" Alias "WEditPos" (lpszName$) As Long
1105: Declare Function WEditLine Lib "TESTCtrl.dll" Alias "WEditLine" (lpszName$) As Long
1106: Declare Function WEditChar Lib "TESTCtrl.dll" Alias "WEditChar" (lpszName$) As Long
1107: Declare Function WEditFirst Lib "TESTCtrl.dll" Alias "WEditFirst" (lpszName$) As Long
1108: Declare Function WEditLines Lib "TESTCtrl.dll" Alias "WEditLines" (lpszName$) As Long
1109: Declare Sub WEditClick Lib "TESTCtrl.dll" Alias "WEditClick" (lpszName$)
1110: Declare Function WEditEnabled Lib "TESTCtrl.dll" Alias "WEditEnabled" (lpszName$) As Integer
1111: Declare Sub WEditSetFocus Lib "TESTCtrl.dll" Alias "WEditSetFocus" (lpszName$)
1112:
1113: ' Layered routines to simulate string functions for the coresponding
1114: ' TESTCtrl API
1115: '----------------------------------------------------------------------------
1116: Declare Function EditText (lpszName$) As String
1117: Declare Function EditSelText (lpszName$) As String
1118: Declare Function EditLineText (lpszName$, lIndex&) As String
1119:
1120: '----------------------------------------------------------------------------
1121: ' EditText: Layered routine for WEditText()
1122: '----------------------------------------------------------------------------
1123: Function EditText(lpszName$) Static As String
1124: Dim textLength As Long
1125: Dim lpszBuffer As String
1126: EditText = ""
1127: textLength = WEditLen(lpszName)
1128: If textLength >= 0 Then
1129: lpszBuffer = String$(textLength+1, " ")
1130: WEditText lpszName, lpszBuffer
1131: EditText = lpszBuffer
1132: End If
1133: lpszBuffer = ""
1134: End Function
1135:
1136: '----------------------------------------------------------------------------
1137: ' EditSelText: Layered routine for WEditSelText()
1138: '----------------------------------------------------------------------------
1139: Function EditSelText(lpszName$) Static As String
1140: Dim selLength As Long
1141: Dim lpszBuffer As String
1142: EditSelText = ""
1143: selLength = WEditSelLen(lpszName)
1144: If selLength >= 0 Then
1145: lpszBuffer = String$(selLength+1, " ")
1146: WEditSelText lpszName, lpszBuffer
1147: EditSelText = lpszBuffer
1148: End If
1149: lpszBuffer = ""
1150: End Function
1151:
1152: '----------------------------------------------------------------------------
1153: ' EditLineText: Layered routine for WEditLineText()
1154: '----------------------------------------------------------------------------
1155: Function EditLineText(lpszName$, lIndex&) Static As String
1156: Dim lineLength As Long
1157: Dim lpszBuffer As String
1158: EditLineText = ""
1159: lineLength = WEditLineLen(lpszName, lIndex)
1160: If lineLength >= 0 Then
1161: lpszBuffer = String$(lineLength+1, " ")
1162: WEditLineText lpszName, lIndex&, lpszBuffer
1163: EditLineText = lpszBuffer
1164: End if
1165: lpszBuffer = ""
1166: End Function
1167:
1168:
1169: ' *********************
1170: '$DEFINE W_EDIT_INCLUDED
1171: '$ENDIF
1172: '$IFDEF W_ERROR AND NOT W_ERROR_INCLUDED
1173: ' *********************
1174:
1175:
1176: Declare Function WError Lib "TESTCtrl.dll" Alias "WError" () As Integer
1177: Declare Sub WErrorSet Lib "TESTCtrl.dll" Alias "WErrorSet" (iErrorNum%)
1178: Declare Sub WErrorText Lib "TESTCtrl.dll" Alias "WErrorText" (lpszBuffer$)
1179: Declare Function WErrorLen Lib "TESTCtrl.dll" Alias "WErrorLen" () As Integer
1180:
1181: ' Layered routines to simulate string functions for the coresponding
1182: ' TESTCtrl API
1183: '----------------------------------------------------------------------------
1184: Declare Function ErrorText () As String
1185:
1186: Const NO_ERROR = 0
1187: Const ERR_MENU_NOT_FOUND = 1
1188: Const ERR_MENU_ITEM_NOT_FOUND = 2
1189: Const ERR_NOT_A_LISTBOX = 3
1190: Const ERR_LISTBOX_NOT_FOUND = 4
1191: Const ERR_ITEM_NOT_IN_LISTBOX = 5
1192: Const ERR_INVALID_LISTBOX_INDEX = 6
1193: Const ERR_LISTBOX_HAS_NO_STRINGS = 7
1194: Const ERR_LISTBOX_IS_NOT_MULTISELECT = 8
1195: Const ERR_NOT_A_COMBOBOX = 9
1196: Const ERR_COMBOBOX_NOT_FOUND = 10
1197: Const ERR_ITEM_NOT_IN_COMBOBOX = 11
1198: Const ERR_INVALID_COMBOBOX_INDEX = 12
1199: Const ERR_COMBOBOX_HAS_NO_EDITBOX = 13
1200: Const ERR_COMBOBOX_HAS_NO_STRINGS = 14
1201: Const ERR_NOT_AN_EDITBOX = 15
1202: Const ERR_EDITBOX_NOT_FOUND = 16
1203: Const ERR_BUTTON_NOT_FOUND = 17
1204: Const ERR_OPTION_BUTTON_NOT_FOUND = 18
1205: Const ERR_CHECKBOX_NOT_FOUND = 19
1206: Const ERR_INVALID_WINDOW_HANDLE = 20
1207: Const ERR_NO_SYSTEM_MENU = 21
1208: Const ERR_INVALID_MENU_INDEX = 22
1209: Const MAX_ERROR = 23
1210:
1211: '----------------------------------------------------------------------------
1212: ' ErrorText: Layered routine for WErrorText() of TESTCtrl.DLL.
1213: ' Simulates a DLL String Function.
1214: '----------------------------------------------------------------------------
1215: Function ErrorText() Static As String
1216: Dim lpszBuffer As String
1217: Dim errorLength As Integer
1218: errorLength= WErrorLen()
1219: lpszBuffer = String$(errorLength+1, " ")
1220: WErrorText lpszBuffer
1221: ErrorText = lpszBuffer
1222: lpszBuffer = ""
1223: End Function
1224:
1225:
1226: ' *********************
1227: '$DEFINE W_ERROR_INCLUDED
1228: '$ENDIF
1229: '$IFDEF W_ERROR_TRAP AND NOT W_ERROR_TRAP_INCLUDED
1230: ' *********************
1231:
1232:
1233: '----------------------------------------------------------------------------
1234: ' WErrorTrap: This trap is in TESTCTRL.DLL.
1235: '
1236: ' This trap is here in MSTEST.INC just so it is easy to quickly add a
1237: ' trap that will display any TESTCTRL error messages. It is only included if
1238: ' W_ERROR_TRAP is defined, so if WErrorTrap() is to be used for more than
1239: ' just to display the TESTCTRL error messages, W_ERROR_TRAP should no be
1240: ' defined. and a custom WErrorTrap() should be added to your script.
1241: '----------------------------------------------------------------------------
1242: Trap WErrorTrap From "TESTCTRL.DLL"
1243: Print WError;" ";ErrorText
1244: End Trap
1245:
1246:
1247: ' *********************
1248: '$DEFINE W_ERROR_TRAP_INCLUDED
1249: '$ENDIF
1250: ' *********************
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.