Attribute VB_Name = "GLOBALS" '**************************************************************************************** ' ' File: GLOBALS.BAS ' ' Author: Roberto Raso ' Date: 11th February 1994 ' '**************************************************************************************** ' ' Purpose: Declaration of global constants. ' '**************************************************************************************** '**************************************************************************************** ' ' Constant/Global declarations. ' '**************************************************************************************** '*** General Return Codes *** Const GEN_OK = 0 'Returned by procedure if all is OK. Const GEN_SNG_ERR = -1 'Returned by procedure if all is not OK. ' Multiple errors use multiples of GEN_SNG_ERR. Global Const GEN_ERROR = -1 Global Const WM_USER = &H140 Global Const CB_ERR = (-1) Global Const CB_GETCOUNT = (WM_USER + 6) Global Const CB_GETLBTEXT = (WM_USER + 8) Global Const CB_FINDSTRING = (WM_USER + 12) Global Const CB_SELECTSTRING = (WM_USER + 13) Global Const CB_SETCURSEL = (WM_USER + 14) Global Const CB_GETITEMDATA = (WM_USER + 16) Global Const CBN_SELCHANGE = 1 Global Const LB_ERR = (-1) Global Const LB_SETSEL = (WM_USER + 69) Global Const LB_SETCURSEL = (WM_USER + 70) Global Const LB_GETTEXT = (WM_USER + 73) Global Const LB_GETTEXTLEN = (WM_USER + 74) Global Const LB_GETCOUNT = (WM_USER + 75) Global Const LB_SELECTSTRING = (WM_USER + 76) Global Const LB_FINDSTRING = (WM_USER + 79) Global Const LB_GETITEMDATA = (WM_USER + 89) Global Const MF_BYPOSITION = &H400 Global Const MF_BYCOMMAND = &H0 Global Const MF_CHECKED = &H8 Global Const MF_UNCHECKED = &H0 Global Const MF_ENABLED = &H0 Global Const MF_GRAYED = &H1 Global Const MF_DISABLED = &H2 Global Const WM_ACTIVATE = &H6 Global Const WM_ACTIVATEAPP = &H1C Global Const WM_COMMAND = &H111 Global Const WM_CLOSE = &H10 Global Const WM_SETTEXT = &HC Global Const WM_GETTEXT = &HD Global Const WM_SYSCOMMAND = &H112 Global Const WM_SIZE = &H5 Global Const WM_MDIGETACTIVE = &H229 Global Const WM_LBUTTONDOWN = &H201 Global Const GMEM_SHARE = &H2000 Global Const GMEM_FIXED = &H0 Global Const GMEM_ZEROINIT = &H40 Global Const GW_HWNDFIRST = 0 Global Const GW_HWNDLAST = 1 Global Const GW_HWNDNEXT = 2 Global Const GW_HWNDPREV = 3 Global Const GW_OWNER = 4 Global Const GW_CHILD = 5 Global Const IDOK = 1 Global Const IDCANCEL = 2 Global Const IDYES = 6 Global Const IDNO = 7 Global Const SC_MINIMIZE = &HF020 Global Const SC_MAXIMIZE = &HF030 Global Const SC_RESTORE = &HF120 Global Const BM_GETSTATE = &HF2 Global Const SIZENORMAL = 0 Global Const FILENAME_MAX = 260 Global Const FILENAME_MAX_PLUS_ONE = (FILENAME_MAX + 1) Global Const MAX_STRING = 256 '**************************************************************************************** ' ' Data type declarations. ' '**************************************************************************************** '*** '*** POINTAPI *** '*** Type POINTAPI x As Integer y As Integer End Type '*** '*** MSG *** '*** Type MSG hWnd As Long message As Integer wParam As Integer lParam As Long time As Long pt As POINTAPI End Type '**************************************************************************************** ' ' Function declarations. ' '**************************************************************************************** 'Find window with supplied name. Returns window handle for success. 'Declare Function FindWindow Lib "User" (ByVal Sname As Any, ByVal Wname As String) As Integer 'Fills VGFILE data type, information from MASSLYNX.INI. Returns 1 for success. 'Declare Function GetGlobalFile Lib "\MassLynx\Util.DLL" (ByVal szParagraph As String, ByVal szKey As String, sDefault As VGFILE, szResult As VGFILE) As Integer '**************************************************************************************** ' ' Process: GenOK ' ' Author: Roberto Raso ' Date: 17th Decemeber 1994 ' ' Purpose: Gives the value of GEN_OK constant. ' This is a general error code, usually zero. ' ' Parameters: None. ' ' Return: GEN_OK. ' '**************************************************************************************** Function GenOK() As Integer GenOK = GEN_OK End Function '**************************************************************************************** ' ' Process: GenSngErr ' ' Author: Roberto Raso ' Date: 17th Decemeber 1994 ' ' Purpose: Gives the value of GEN_SNG_ERR constant. ' This is a general error code, usually -1. ' ' Parameters: None. ' ' Return: GEN_SNG_ERR. ' '**************************************************************************************** Function GenSngErr() As Integer GenSngErr = GEN_SNG_ERR End Function