'** $Header:   F:/newproj/install3/vcs/approach.inv   1.1   02 Dec 1992 16:39:50   JLevine  $
'*********************************************************************
'**    Approach Installation APIs and additional Windows APIs
'*********************************************************************
'**
'** Modifications:
'** $Log:   F:/newproj/install3/vcs/approach.inv  $
'** 
'**    Rev 1.1   02 Dec 1992 16:39:50   JLevine
'** OurLoadString, localizable strings
'** 
'**    Rev 1.0   16 Oct 1992 16:14:40   JLevine
'** Initial revision.
'**

CONST SW_HIDE		    		= 0
CONST SW_SHOWNORMAL	    	= 1
CONST SW_NORMAL	    		= 1
CONST SW_SHOWMINIMIZED    	= 2
CONST SW_SHOWMAXIMIZED    	= 3
CONST SW_MAXIMIZE	    		= 3
CONST SW_SHOWNOACTIVATE   	= 4
CONST SW_SHOW		    		= 5
CONST SW_MINIMIZE	    		= 6
CONST SW_SHOWMINNOACTIVE  	= 7
CONST SW_SHOWNA	    		= 8
CONST SW_RESTORE          	= 9

CONST MB_YESNO					= 4
CONST IDYES						= 6

' String Constants -- Must match dialogs.h
CONST STANDARD_CAPTION		= 1
CONST APPROACH_NAME		= 2
CONST APPROACH_README	= 3
CONST KB_STRING			= 16
CONST ERROR_INUSE			= 160
CONST ERROR_RESTART		= 161
CONST ERROR_GENERAL		= 162

DECLARE FUNCTION ShowWindow LIB "user" (hwnd%, nIndex%) AS INTEGER

DECLARE FUNCTION OurLoadString LIB "mscuistf.dll" (idResource%, buffer$, nBufSize%) AS INTEGER
DECLARE FUNCTION IsShareInstalled LIB "mscuistf.dll" AS INTEGER

DECLARE FUNCTION GetString (idResource%) AS STRING

FUNCTION GetString (idResource%) STATIC AS STRING
	szBuf$ = string$(256, 32)
	cbBuf% = OurLoadString(idResource%, szBuf$, 256)

   IF cbBuf% = 0 THEN
'$ifdef DEBUG
   	StfApiErr saeFail, "GetString", ""
'$endif ''DEBUG
      ERROR STFERR
   ELSE
      IF cbBuf% > 255 THEN
      	res% = DoMsgBox("Buffer Overflow", GetString(STANDARD_CAPTION), MB_ICONHAND+MB_OK)
         ERROR STFERR
      END IF
      szBuf$ = RTRIM$(szBuf$)
      GetString = szBuf$
	END IF

	szBuf$ = ""
END FUNCTION
