InstallShield internal library function complete works (Chinese version)

zhaozj2021-02-11  188

1 library function review

InstallShield contains more than 300 internal library functions, and users can call them in the installation script to create program groups, manipulate folders, process directory, monitor installation status, create dialogs, operation files, and more work. Because the INSTALLSHIELD script compiler has identified these library functions, users do not need to explain before using them.

In order to successfully call an internal library function, the user must know the library function name and use format. The INSTALLSHIELD library function Refer to Appendix D Lank Function Index. In the next few sections, we will introduce some of the main library functions. The configuration of the library function is described in just simply describing the user.

Such as: askYesno is a library function that displays an inquiry in the dialog, then wait for the end user to respond by clicking, Yes or No. The Askyesno format is as follows: askYesNO (SzquesNo (SzquesNo, NDEFAULT). This format shows the correct function name, and the parameter list of the function is displayed in parentheses. In the detailed description of the function, each parameter is represented by the Hungarian marker method, indicating the type of value that can be accepted at each parameter. Askyesno requires two parameters: The first is the character type, the second is a numeric.

Like the C language, installshield is case sensitive, so the user must strictly pay attention to uppercase letters in the library function name.

Use any library function in the user's script, the number of passed parameters must be correct, and to ensure that each parameter value passed is in line with the type specified in this position. If the user passes the number of incorrect parameters or transmits the numerical type that does not match in any one or several parameter, the script cannot be compiled.

note:

. The string delivered as a parameter must be included in single quotes or double quotes.

Such as: "please wait while files are transferred", or 'this is a string' or "c: //myfolder/myfile.txt"

. InstallShield does not allow an assignment statement as a parameter. In addition, the user cannot use && or || operators in a function variable.

. The variable length string variable passed to a function is not possible in the called function. If the function attempts to assign a value, the length of the value exceeds the existing length of the parameter, 401 run error occurs. To avoid this error, you must specify a specific length for a string when calling a string to a function.

2 user interface functions

The user interface function allows the user to customize a specific error message and the error frame title. However, some internal error messages encountered in the installation development cannot be modified by the user interface function. This part mainly describes the grammar, description, parameters of the user interface function.

2.1 Disable function

Syntax: disable (nconstant)

Description: The disable function is invalid by the user interface object or installation characteristics specified by the parameter nConstant.

parameter:

NConstant

Specifies that the user interface object or the operative characteristic makes it invalid, one of the following predefined constants in this parameter location:

BackButton: The Back button displayed in some internal dialogs is invalid (even if it is ash ash display), the Back button default is valid.

Background: Invuse and hide the installation master background window. Note: This parameter does not work when the installation is in full screen.

Billboard: Cancel the display of the player during the installation process.

DialogCache: The conversation buffer is invalid. For a detailed description of the dialog buffer, see Enable.

Hourglass: Make the cursor from a "busy" cursor (default to the hourglass cursor) to a standard cursor (default is a pointer).

IndvFileStatus: Do not display the path and file names in the schedule indicator (Status). Logging: Do not record the uninstallation information, so that the information is not recorded in the uninstall log file. Note: The recording function is automatically set by the function deinstallStart to be valid. The record unloading information is invalid before calling DeinstallStart, because when DeinstallStart is called, the recording function will be automatically activated, and the user must handle the record before the uninstall operation should not be recorded.

NextButton: Make the NEXT button of some internal dialogs (make it ash ash). The next button is set to be valid.

SelfregisterBatch: The batch method of registering from the registration file is invalid. See ENABLE for details.

SATAUS: Enables standard progress indicators (state bar) to be invalid and hidden.

Statusdlg: The progress indicator (status bar) in the form of the dialog is invalid and hidden.

STATUSEX: Disables replace the progress indicator (Status) in the Display Installation Status dialog box.

Statusold: The progress indicator (status section) that makes the original style is invalid and hidden.

return value:

0: Description function successfully prohibits the user interface object or installation characteristics specified by the parameter nConstant.

<0: Description function failed to disable the user interface object or installation characteristics specified by the parameter nConstant.

annotation:

• If the disable function is called in the user's script to disable the next or the Back button, the button is disabled in all dialogs after the function is called, and the user needs to call Enable with the corresponding constant to activate the NEXT or BACK button.

· DialogCache does not work in a dialog box without a Next or Back button.

2.2 enable function

Syntax: enable (nconstant);

Description: Enable function activates the user interface object or installation characteristic specified by the parameter nConstant.

parameter:

NConstant

Specify the user interface object or operational feature you want to activate. One of the following predefined constants in this parameter location:

BackButton: Activate the Back button in some internal dialogs. The BACK button is activated by the default, but it can be disabled by calling the Disable function.

Background: When the installation is in the window mode, the installation master background window is displayed. This constant does not work when the installation is the default full-screen mode. To activate the window mode, you must call Enable in a constant DEFWINDOWMODE or FULLWINDOWMODE.

DefWindowMode: Configure the main background window as a standard window with title bar. If the background window is activated, its appearance will change immediately. If the background window is disabled, the screen will not be modified until the ENABle is called by the ordinary background.

DialogCache: Activate dialog buffer mechanism, which eliminates the screen blinking between the display dialog box. This screen flashes in the title bar running in the window mode. Note The dialog buffer mechanism is only working on the dialog box with the back and Next. The default dialog buffer is disabled.

FullWindowMode: Sets the master background window to a maximum window with a title bar. If the background window is activated, its appearance will change immediately. If the background window is disabled, the screen will not be modified until the ENABLE is called with the ordinary background.

Hourglass: Make the cursor to "Busy" cursor, default is a hug gauge.

IndvFileStatus: When the COMPONENTTRANSFERDATA, COPYFILE, or XCopyFile and the progress indicator are activated, the full-qualified name (displayed in the second row of the progress indicator) is activated. Note that in a installer running an event-based script, ComponentTransferData is automatically called. Logging: Activation deposits the uninstall record function. When the storage feature is activated, the operation result of the unloading record stored in InstallShield will be recorded in the uninstall log file and will be reversed during the uninstall. Automatically call the DeinstallStart activation storage; therefore, you don't need to manually activate the deposit. Unless you have previously disabled it with a disable function.

NextButton: Activates the next NEXT button in some internal dialogs. Next is activated by twisting province.

SelfregisterBatch: Activate the batch method for registering from registered files. This method uses to avoid dependencies associated with the registration file. By default, standard (non-batch) is registered.

More information about batch methods is as follows:

· In the file group pane, highlight your file group folder for your self-registration file. Its property sheet is open on the right.

· Double-click the Self-Registered domain, open from the registration page.

· Select "Yes, all the files in this file group all the self-registering" single button.

· Open your installation script (find setup.rul in the Scripts pane).

`Call the Enable function with the selfregisterbatch option before you transfer the file. All self-registration files are placed in an internal queue, that is, they will be registered immediately when they are installed. (In an event script, the OnBegin handler is called before being called, the enable (SelfregisterBatch) will be called automatically.)

After transferring the file, call the DO function with the SelfregistrationProcess option. When you call DO (SelfregistrationProcess), InstallShield registers all self-registration files. If the DO is called, the system variable Batch_install is equal to TRUE (indicating that a reboot is required to complete the installation), then the registration file is delayed to the restart.

After you call DO (SelfRegistrationProcess), you can check if you have successful success. If DO is fails due to any reason, it will return -1. The names of those self-registration failures are saved in the system variable errorfilename, separated by a semicolon.

For example, the following code registers all from the registration file in the file media library.

// Enable Batch Method to Queue Self-Registering Files.

Enable (SelfregisterBatch);

// install files.

NResult = ComponentTransferData (Media);

// register the files, check for errors.

IF DO (SelfregistrationProcess) <0 THEN

SZMSG = "File (s) failed to self-register: / n" ErrorFileName;

MessageBox (Szmsg, Warning);

Endif;

STATUS: Activate the display standard progress indicator (status bar).

Statusdlg: Activate the progress indicator of the display dialog style (status bar). Statusex: Activate the Display Installation Status dialog to replace the progress indicator (status bar).

Statusold: Activate the old style progress indicator (status bar), it doesn't have a Cancel button.

return value:

0: Indicates that the function successfully activates the user interface object or installation characteristics specified by the parameter nConstant.

<0: Indicates that the function fails to activate the user interface object or installation characteristics specified by the parameter nConstant.

annotation:

· When the default, the installation is running in full screen; the main background window is displayed as a full screen window without the title bar. In this way, the main mounting window cannot be adjusted and there is no visible title bar. To activate the window mode, you must call Enable in a constant DEFWINDOWMODE or FULLWINDOWMODE.

• If you call the disable function in your script to disable the Next or Back button, this button is disabled in all dialogs after the function is called, to activate the Next or Back button, you need to call Enable with the corresponding constant.

· DialogCache does not work in a dialog box without a Next or Back button.

2.3 FindWindow

Syntax: FindWindow (SzclassName, Szwinname);

Note: The FindWindow function provides a method of getting a window handle by specifying a window class and window name and window name to a Senior Developer. If you know an application's window class and window name, you can get its handle. Then you can send information directly to the window through this handle.

parameter:

SzclassName

Specifies the name of the class belonging to the window. If you specify as "any class", an empty string is passed at this parameter.

Szwinname

Specify window headings. To return the handle of the top-level window in the specified class, a null string ("") is transmitted at this parameter.

return value:

XXXX: Handle of the window.

NULL (0): FindWindow cannot find the window according to the specified window name and class name.

annotation:

· To find a class and name of a window, run the Microsoft Spy.exe program.

2.4 PlaceBitmap

Grammar: PlaceBitmap (SZNAME, NID_BITMAP, NDX, NDY, NDRAWOP);

Description: The PlaceBitmap function is inserted into an image in the installation window. The image source is specified by szname, which can be a bitmap file (.bmp), a meta file (.WMF), or a dynamic link library (.dll). InstallShield supports 2 colors, 16 colors, 256 colors and true color bitmaps (Bitmap). 2 colors, 16 colors, 256 color bitmaps may have a transparent portion.

The transparent bitmap is useful when displaying an image that can be displayed in combination with the background window. The pixels matching the specified transparent color matching in the bitmap are not displayed; the background pixels in this position are maintained visible. In installation, a technically design often uses a transparent bitmap containing the company name and logo as a title of the installation window.

To specify a transparent bitmap, you must pass a constant Bitmapicon to the parameter ndrawop location. You must also consider what color in a bitmap is placed transparent. The default transparent color is PURPLE (RGB (255, 0, 255)). To specify a different transparency, you can specify using the parameters szname described below.

Because the metafile is drawn, instead of placement, they are inherently transparent. If Bitmapicon is specified as a primitive file, the parameter is ignored.

Many special display effects of non-transparent bitmaps can be displayed by using the SetDisPlayeffect function. This function also provides a limited display effect for the primitive. The location of the middle map can be specified in two ways:

· Pass the position constant by parameter ndrawop.

• Transfer vertical and horizontal displacement from the edge of the installation window by parameter NDX and NDY.

You can usually remove any bitmap files and chart files that are no longer needed by calling the PlaceBitMap (set the parameter nDRAWOP to REMOVE). It is recommended to delete a unwanted bitmap, even if the bitmap can be completely covered by other bitmaps, because the palette entry of the first bitmap is only released after the bitmap is deleted.

A true color bitmap is displayed on a system running in a 16-color or 256 color mode, only uses those valid in the palette; do not assign additional colors to the bitmap, even if the additional palette entry is Effective. If you want to have a 24-bit map, you can run in a 16-color or 256 color system, which requires a version of 16 colors or 256 colors of the bitmap. Then you call getSystemInfo to determine the current color mode before selecting the parameter colors to be displayed.

parameter:

Szname

Specifies the list of bitmap files to be displayed, the fully qualified name or dynamic link of the element file. InstallShield identifies bitmap files and chamfer files by extension. The bitmap file must have an extension .bmp, the chamber file must have an extension .WMF. Dynamic link must have an extension .dll. If a file name is specified as no extension, InstallShield will assume that its extension is .dll.

To specify a candidate transparent color, place a semicolon (;) after the file name (;), followed by a set of RGB color values ​​(RGB colors are specified by three values, separated by commas). This color is used as a transparent color of the bitmap specified by SZNAME. Note that it does not work for the bitmap that has been displayed, nor does it become the default transparent color of the bitmap displayed by the PlaceBitmap.

The following parameters specify white to transparent color:

Supportdir ^ "Bitmap.BMP; 255, 255, 255"

This parameter is ignored when NDRAWOptions is set to REMOVE.

NID_BITMAP

Specifies the resource ID of the bitmap resides in one .dll. If the source point of the bitmap is a primitive file or bitmap file, specify a value that is not used in the currently displayed image; all the images displayed simultaneously must have its unique ID number. When NDRAWOptions is set to REMOVE, this parameter must contain the ID of the image displayed.

NDX

When NDRAWOP is set to Lower_LEFT, LOWER_RIGHT, UPPER_LEFT, or UPPER_RIGHT, specify the horizontal distance between the installation window edge and the image edge; otherwise the parameter is ignored.

NDY

When NDRAWOP is set to Lower_LEFT, LOWER_RIGHT, UPPER_LEFT, or UPPER_RIGHT, specify a vertical distance between the installation window edge and the edge of the image; otherwise the parameter is ignored.

NDRAWOP

It is pointed out of the location of the location, set the placement option, or delete the previously placed bitmap. Pass the parameter to pass the following predefined constants:

Bitmapicon: Indicates that the bitmap has a transparent part. The user can combine this constant and other constants (except Tiled, Fullscreen, or FullScreensize) with a bitwise or operator (|). When Bitmapicon and one of those constants, the standing or operation is ignored, but only Bitmapicon is used.

TILED: The bitmap is in the main installation window. This constant is usually used to create a installation background. When the constant is specified, even if the location option is ignored, the special effect has been activated by SetDisplayTeffect, and the bitmap is still displayed.

Fullscreen: Drag image makes it fills the entire installation window. The image is not adjusted by the image. If a bitmap image is smaller than the InstallShield main window, it is set in the window, the background is filled by the current background color. The default is dark blue (Teal); can be changed by using the setColor function. When this constant is specified, the location option is ignored, even if a special effect has been activated by SetDisPlayeffect, the bitmap is still displayed normally. Fullscreensize: Drag and stretch image make it filled with the entire installation window. When this constant is specified, the location option is ignored, even if a special effect has been activated by SetDisPlayeffect, the bitmap is still displayed normally.

CENTERED: Place the bitmap in the center of the InstallShield installation window.

Lower_Left: Place the bitmap in the lower left corner of the InstallShield installation window.

Lower_right: Place the bitmap in the lower right corner of the InstallShield installation window.

Upper_left: Place the bitmap at the top left of the InstallShield installation window.

Upper_right: Place the bitmap in the upper right corner of the InstallShield installation window.

REMOVE: Delete a previously placed bitmap or element. Any special effects activated by SetDisPlayeffect are ignored.

return value:

0: Indicates that the function successfully found and place the image.

<0: Indicates that the function cannot be found or placed.

annotation:

· Call setDisplayeffect to set special effects for non-tile, full screen, transparent bitmap; users can also use it to set limited special effects for primitives.

· InstallShield does not support 24-bit transparent bitmaps. If the user contains transparent colors in a 24-bit position, the Bitmapicon constant is specified, which will be normally displayed.

• When you place a 256-color bitmap in the system running 256 color mode, InstallShield will try to assign the palette to the system palette of the bitmap. If multiple 256 color bitmaps are placed, INSTALLSHIELD will attempt to merge the palettes of all visual bitmaps into the system palette, priority to the most recently placed bitmap. This behavior may result in a color of the previously placed bitmap when other bitmaps are displayed.

• In a 256-color pattern of 256-color jitter, a bitmap containing many colors may result in some palette inlets used in the background being reassigned; this can cause a gradient effect in the background. . If the installation contains a bitmap using multiple colors, do not use 256 color jitter background when they run in the 256 color system.

• The system palette only exists in a system running in a 256-color mode. There is no system palette in the system running in Windows 95 and after high color or true color mode and running in 65525 (16-bit) color mode. These systems do not need to consider the palette handle problem. Colors use the RGB value to display directly.

· Because the element file is colored, they do not include a custom palette. When a chamber is displayed in a 256-color system, no palette processing occurs; the element file is drawn in use with the color used in the current palette. Thus, to run in a 256 color system, the user should not use the display color different from the standard 16 color in the installer.

2.5 PlaceWindow

Syntax: PlaceWindow (NOBJECT, NDX, NDY, NCORNER);

Description: The PlaceWindow function changes the location of the user interface object, including the billboard. Specify the edge of the object with the edge of the screen with NDX and NDY.

parameter:

NOBJECT

Specifies the object to be changed. One of the following predefined constants in this parameter location:

Background: Moving background window.

Billboard: Sets the location of the billboard used in the file transfer process. MMEDIA_AVI: Sets the window position of the next AVI file you want to play. When the default, the AVI file will play in the left position window of the InstallShield customer window, from the left, 10 pixel points from above.

STATUS: Move progress indicator.

Statusdlg: Mobile dialog style progress indicator.

STATUSEX: Move the Install Status dialog.

STATUSOLD: The progress indicator of the old style.

When you call PlaceWindow to move the progress indicator or status dialog, it is sure that the correct constant is passed for the feedback object you activated in the installation. For example, if you call Enable (Statusold), you must pass Statusold to PlaceWindow.

NDX

The horizontal distance between the edge and the edge of the object is specified by pixel points.

NDY

The vertical distance between the side of the object is specified by the pixel point and the edge of the screen.

NCORNER

Specifies which angular amount from the distance indicated by NDX and NDY. One of the following predefined constants in this parameter location:

Lower_Left: NDX from the left side of the InstallShield main window, quantify NDY from the bottom end.

Lower_right: From the right weight of the InstallShield main window, NDY is quantified from the bottom end.

Upper_left: NDX from the left side of the InstallShield main window, quantity from the top end.

Upper_right: NDX from the right side of the InstallShield main window, quantity from the top end.

return value:

0: Indicates that the function successfully changes the location of the object.

<0: Indicates that the function failed to change the location of the object.

annotation:

· When using this function, you should realize that a installer is running under different screen resolutions. You may want to determine the screen range before placing the object. The distance is the distance between the edges of the target edge and the designated screen corner.

· The user cannot locate the message box in this function because the message box is created by the Windows / PM API of this unit. The location of a message box is determined by Windows / PM, not under InstallShield control. In addition, users cannot locate a custom dialog with this function.

2.6 Playmmedia

Grammar: Playmmedia (NTYPE, SZFILENAME, NOPERATION, NRESERVED);

Description: Playmmedia function plays a sound or AVI file. MIDI or WAVE type sound files and AVI (video) files can be played in asynchronously in synchronous mode. This function can also be used to play a file continuously. In order to achieve this, a flag can be bitten or to indicate that the file is played in a continuous manner.

Since the AVI file is compressed, it is often more than 1.4MB floppy disk, and therefore, the video display is recommended to the disc installation.

parameter:

NTYPE

Specify the file type. One of the following predefined constants in this parameter location:

MMEDIA_WAVE: The file is WAVE sound format.

MMEDIA_MIDI: The file is the MIDI sound format.

MMEDIA_AVI: The file is an AVI file.

SZFileName

Specifies the full qualification of the sound / avi file to be played.

NOPERATION

Specify playback mode. Transfer the following predefined constants in this parameter location:

MMEDIA_PLAYSYNCH: Synchronous play.

MMEDIA_PLAYASYNCH: Asynchronous play. This constant can be used in combination with MMEDIA_PLAYCONTINUOUS with or operators (|).

MMEDIA_PLAYCONTINUOUS: Continuous loop play. This value cannot be used when playing a sound / AVI file synchronously. It is only used to play files in asynchronously. Use or operators (|) to use it with MMEDIA_PLAYASYNCH. MMEDIA_STOP: Stop playback.

NRESERVED

Transfer 0 values ​​to this parameter and other values ​​are not allowed.

return value:

0: Indicates that the function is successfully played.

<0: Indicates that the function cannot play files.

2.7 RGB

Syntax: RGB (constred, constgreen, constblue);

Description: The RGB function creates a custom color value that can be used by SetColor and SetTitle.

parameter:

Constred

Specify a numeric constant, the value domain is 0..255, indicating the number of red in custom colors.

CONSTGREEN

Specify a numeric constant, the value domain is 0..255, indicating the number of greens in custom colors.

Constblue

Specify a numeric constant, the value domain is 0..255, indicating the number of blue in custom colors.

return value:

This function returns a value of custom colors that can be used when calling SetColor and SetTitle.

2.8 SetColor

Syntax: SetColor (NOBJECT, NCOLOR);

Description: The setColor function sets the background color of the main installation window.

parameter:

NOBJECT

Specifies the user interface object to be changed. Transfer the following predefined constants in this parameter location:

BACKGROUND

Indicates the background of the installation window. The default color is a pure dark cyan: RGB (0, 128, 128).

Ncolor

Specify a color for the background.

For a transition background color, one of the following constants can be passed:

BK_BLUE, BK_GREEN, BK_MAGENTA, BK_ORANGE

BK_PINK, BK_RED, BK_YELLOW

For a pure background color, one of the following constants can be passed:

BK_SOLIDBLACK, BK_SOLIDBLUE, BK_SOLIDGREEN, BK_SOLIDMAGENTA

BK_SOLIDORANGE, BK_SOLIDPINK, BK_SOLIDRED, BK_SOLIDWHITE

BK_SOLIDYELLOW

For a custom color, the RGB function can be passed in this parameter location.

To get a smooth effect (transition) when using a custom color drawing background, the color can be brought to a predefined constant BK_SMOOTH or. Note that the smooth effect will be better when 256 color is valid.

return value:

0: Indicates that the function successfully sets the color of the object.

<0: Indicates that the function cannot set the color of the user interface object.

annotation:

• When using an RGB value, you can apply the same ways described in Microsoft Windows Programming Guide.

You can specify the mix of RED, Green, Blue color to "mix" color. Use one of the numbers from 0 to 255 to represent the number of colors. The parameters in the RGB macro must use a literal value. You can use a long integer that represents the RGB color instead of the RGB statement.

2.9 setDialogtitle

Syntax: setDialogtitle (nDialogid, sztitle);

Description: The setDialogtitle function change is displayed in some public internal dialog headings. Use the parameter nDialogID to specify the dialog box. If you don't use SetDialogtitle, InstallShield displays the default headline. Once you set the title for a particular dialog, unless you use SetDialogtitle to change the title again, InstallShield uses this title in the instance of each of this type dialog. parameter:

NDialogid

Identify the internal dialog that is to be changed. One of the following predefined constants in this parameter location:

DLG_ASK_OPTIONS: Change the AskOptions dialog header.

DLG_ASK_PATH: Change the AskPath dialog header.

DLG_ASK_TEXT: Change the AskText dialog header.

DLG_ASK_YESNO: Change the Askyesno dialog header.

DLG_ENTER_DISK: Change the ENTERDisk dialog header.

DLG_MSG_INFORMATION: Change the title of the message box of the information style.

DLG_MSG_SEVERE: Change the title of a serious warning style message box.

DLG_STATUS: Change the title of the dialog style progress indicator. After calling setDialogtitle with the DLG_STATUS option, in order to make the title modification, you must reactivate the dialog style progress indicator by calling enable (statusdlg).

DLG_MSG_WARNING: Change the title of the message box of the warning style.

DLG_USER_CAPTION: Change the title of the message box when you define the user-defined message box style.

Sztitle

Specify a new title.

return value:

0: Indicates that the function has successfully modified the dialog title.

<0: Indicates that the function failed to modify the dialog title.

annotation:

· You must call SetDialogtitle, respectively, call each of the dialogs you want to modify its title.

· InstallShield creates a message box using the standard Windows message box function. Windows determines OK and Cancel to call the text for these message boxes. InstallShield cannot control the call to tweeter in the Windows message box.

2.10 setDisplayEffect

Grammar: setDisplayEffect (Neffect);

Description: The setDisplayEffect function specifies the display effect used when using the PlaceBitMap function to display bitmap files or chair files. Once the display is set, all subsequent bitmap files displayed by PlaceBitMap will always display until another to set a new display effect on another pair of setDisplayeffect.

parameter:

Neffect

Specify a display effect. One of the predefined constants in this parameter location is passed. Note that these constants have muddoms; they cannot use all positions or in each other. Moreover, this parameter is specified when a bitmap file is displayed with a bitmap file with a bitmap, and the parameter is invalid: TILED:

EFF_FADE: Bitmap or Brand Active fade out.

EFF_REVEAL: Bitmap or bulletin boards are gradually populated from the central to four weeks.

EFF_HORZREVEAL: Bitmap or bunker scroll from its center gradually horizontally.

EFF_HORZSTRIPE: A portion of the bitmap or bunker is filled from the outer and walk, and the remaining portion is filled out from the central portion.

EFF_VERTSTRIPE: Part of the bitmap or bunker is filled vertically from the proximity, and the remaining portion is fill from the central portion.

EFF_BOXSTRIPE: A portion of the bitmap or bunker is filled in four weeks, and the remainder is filled around.

EFF_NONE: This option is the default setting. Use it to clear the display effect after calling any other option. Only EFF_REVEAL and EFF_HORZREVEAL can be used for chair files.

return value:

0: Indicates that the function successfully sets the display effect.

<0: Indicates that the function failed to set the display effect.

annotation:

• When the bitmap is displayed by the PlaceBitmap tape option Bitmapicon, Fullscreen, FullScreensize or Tiled, the bitmap does not display the display effect, but normal display. More information can be found in PlaceBitmap.

• The display effect only occurs when the bitmap is placed, and the display effect cannot be used when deleting a bitmap.

• Only the display (EFF_REVEAL) and horizontal show (EFF_HORZREVEAL) can be used for the primitive file.

2.11 setErrorMSG

Grammar: setErrorMSG (Nerrorid, Sztext);

Description: SETERRORMSG function custom INSTALLSHIELD default error message. You can use this function to specify the title text of the message box that displays these error messages.

parameter:

Nerrorid

Specifies the error message to be replaced. One of the following predefined constants in this parameter location:

Err_box_badpath: Displays the information when Enterdisk detects an error path input by the user.

Err_box_badtagfile: Displays the information when Enterdisk detects that the specified tag file does not exist on the disk.

ERR_BOX_DISKID: Displays the information when Enterdisk detects that the drive specified by the user does not exist.

ERR_BOX_DRIVEOPEN: Displays the information when Enterdisk detects that the disk drive is not closed.

Sztext

Specifies the error message to be displayed in the message box.

return value:

0: Indicates that the function successfully changes the error message.

<0:

Indicates that the function failed to change the error message.

2.12 setErrorTitle

Syntax: SETERRORTITE (NERRORID, SZTEXT);

Description: The serrrorTitle function specifies custom text for custom text in the INSTALLSHIELD internal error message box title bar. You can use this function from defining an error message text.

parameter:

Nerrorid

Specifies the error message box to be replaced with the title. One of the following predefined constants in this parameter location:

Err_box_badpath: Displays the message when Enterdisk detects an error path.

Err_box_badtagfile: Displays the message when Enterdisk detects that the specified tag file does not exist on the disk.

ERR_BOX_DISKID: Displays the message when Enterdisk detects the specified drive does not exist.

ERR_BOX_DRIVEOPEN: Displays the message when Enterdisk detects that the disk drive is not closed.

Sztext

Specifies the title shown in the Error Message box.

return value:

0: Indicates that the function successfully modified the text of the title bar.

<0: Indicates that the function fails to modify the text of the title bar.

2.13 setFont

Syntax: SetFont (Nitemid, NFontStyle, SzfontName);

Description: The setFont function sets the fonts and styles of the stylist displayed. You can use standard Windows in this function

Font.

parameter:

NITEMID

Specify the items to be set by their fonts and font styles. Transfer the following predefined constants in this parameter location:

Font_title: Specifies the main title of the installation process, which is displayed in the upper left corner of the installation window.

NFontStyle

Specify font styles. The following predefined one or more constants are passed in this parameter location. All constants other than Style_Normal can be used to specify a variety of styles: Style_NORMAL: No bold, tilt or shadow (cannot be bitten or).

Style_bold: The font is bold.

Style_ITAlic: The font is tilted.

Style_shadow: The font has a shadow shading.

STYLE_UNDERLINE: Acrossline.

SZFontName

Specifies the name of a valid Windows font. The effective font names include Courier, Helv, Helvetica, Modern, Roman, Script, Terminal, Times, and TMSRMN. If the specified font does not find the specified style, use Arial.

return value:

0: Indicates that the function is successfully set.

<0: Indicates that the function failed to set the font.

2.14 SetStatusWindow

Syntax: setStatusWindow (NPERCENT, SZSTRING);

Description: The setStatusWindows function is a progress indicator (Status section) Set the initial value or current value of the percentage of the indicator and specifies the current message displayed at the progress indicator (status bar).

The installation of the file must be called to call SetStatusWindows before the file transfer is started, which is the highest row to set the percentage percentage of the indicator and clear the indicator. No need to call SetStatusWindows. When the file of each component is loaded, the 'status text' character of the component is automatically displayed at the highest line of the status bar.

The installer that uses the Copyefile or XcopyFile function is loaded with the file between the CopyFile or XcopyFile, which may need to call SetStatusWindows multiple times to change the information of the most high line of indicators.

Your installer should also call the STATUSUPDATE function to activate the automatic update of the percentage completion indicator during the file transfer process. In order to make the name and path of the installed file in the second row of the status bar, you need to call the Enable function before transferring the file before transferring the file. After these calls, the percentage completion indicator is smoothed in the file transfer process, and the file name of each file will be displayed when transmitted.

parameter:

NPERCENT

Specifies a value between 0 and 100 to indicate the percentage of the percentage to complete the indicator. To change the information displayed in the most high line of state strips, the parameter is specified to -1.

Szstring

Specifies the string that is displayed in the state strip. Note If a 'DisplayText' parameter has been assigned to the component (in IDE), the string will automatically overwrite the text specified by any of the parameters when CoMPONENTTRANSFERDATA is called.

Return Value: This function does not return a value.

2.15 setTitle

Syntax: Settitle (Sztitle, NpointSize, ncolor);

Description: The SetTitle function displays a title in the main window title bar according to NColor or in the main window.

parameter:

Sztitle

Specifies a title displayed in the main window title bar or main window. If the title is displayed in the title bar of the window, you must specify a predefined constant backgroundCaption in the third parameter location. If the title of a title column does not match the available space, it will be tail from the right and terminate it in order to omit. The default title bar title is "Installation".

When a color value is transmitted to the third parameter, the title is displayed on the top of the main window. The title relative to the main window will be displayed from the right truncation. In order to create a topic that occupies multi-line, you can embed the wrap in the interoperability you want. Npointsize

Take a point to specify the font size of the title displayed in the main window. It is recommended to have 24 points. Note that the parameter is ignored when the third parameter is BackgroundCaption.

Ncolor

Specify a color or predefined constant backgroundcapion. To indicate that the sztitle value should be displayed in the main window title bar, the predefined constant backgroundcaption is passed in this parameter location. When the user specifies the BackgroundCaption, NpointSize is ignored; the color and font size of the title bar title will be determined by the system settings of the end user. Note that this option is invalid in the installer that is not running on the window mode; see the following annotations.

To indicate that the sztitle value should be displayed in the main window, specify the color of the title by passing one of the following predefined constants: Black, Blue, Green, Magenta, Red, Yellow, or White. Users can also pass the RGB function in this parameter location to specify a custom color, as shown in the following example:

Settitle ("FantasticApp", 24, RGB (78, 125, 161);

return value:

0: Indicates that the function is successfully set the title.

<0: Indicates that the function is not set to set the title.

annotation:

· Not running in the installation in window mode, the third parameter is set to the backgroundCaption to call Settitle invalid. To run the installer in a standard window, you must first call Enable in parameter defWindowMode or FullWindowMode, then call Enable to display the window with parameter background.

· Use setColor to set up the background color of your installed.

· Use setFont to set the fonts and font styles of the title displayed in the background window.

2.16 SizeWindow

Syntax: SizeWindow (NOBJECT, NDX, NDY);

Note: Use the SizeWindow function to change the size of a particular user interface element. Specify new in pixel points

size.

parameter:

NOBJECT

Specifies the object to be adjusted. One of the following predefined constants in this parameter location:

Background: Identifies the main background window.

Metafile: Identify a bunker used in the file transfer process. SizeWindow does not support bitmap file (.bmp). This parameter does not have any effect on the element file displayed with the SDBITMAP function. SDBitmap automatically adjusts the size of the displayed element file.

MMEDIA_AVI: Sets the size of the window to play the next AVI file. All AVI video is displayed in a default size. Changing the size may change the effective resolution and brightness of the video.

NDX

Specify the horizontal size of the object with pixel points.

NDY

Specify the vertical size of the object in pixel points.

return value:

0: Indicates that the function is successfully adjusted window size.

<0: Indicates that the function has not been adjusted to adjust the window size.

annotation:

· The installer may run at a plurality of different screen resolutions. Therefore, you need to use the getExtents function to determine the full screen size of the screen, then use the ratio in your SizeWindows function call to specify the size of the user interface object.

· This function is recommended to senior developers.

2.17 statusupdate

Syntax: statusupdate (blink, nFinalPercent);

Description: The StatusUpdate function is activated or disables the connection between file transfer operations and status strips. When Blink is ON, the connection is activated and the NFinalPercent indicates a last percentage displayed at the end of the next file transfer. During the file transfer, the status bar is smoothed from its current value to the value specified by NFinalPercent. When BLINK is OFF, the connection is disabled and the progress indicator of the status bar will not be updated automatically in subsequent file transfer. If the status bar in the file transfer is activated, StatusUpdate is called before each call CopyFile or XcopyFile. Before calling the ComponentTransferData transfer file, the belt parameter is called on and 100; this will make the status bar smoothly to 100% in the installed file transfer phase. Note that in a run based on an event script, ComponentTransferData is automatically called.

parameter:

Blink

Specifies whether to activate or disable the connection between file transfer operations and status strips. One of the following predefined constants in this parameter location:

ON: The schedule of the specified state strip must be connected to the file transfer operation.

Off: Specifies the connection between the progress indicator of the disable status bar and the file transfer operation. The connection is kept until it is re-established by a repartial call to the StatusUpdate with parameter Blink is ON.

The status strip can be manually updated by calling SetStatusWindow.

NFinalPercent

Specifies that when BLINK is ON, the progress indicator of the status bar must be achieved at the end of the next file transfer operation. If the value passed to the NFinalPercent is less than the current value of the progress indicator of the status bar, the progress indicator will not change. When Blink is OFF, the parameter is ignored.

return value:

0: Indicates that the function is successful.

<0: Indicates that the function is unsuccessful.

annotation:

· This function operates by calculating the total number of bytes transmitted by any file transfer function. It then calculates the maximum value from the current position of the progress indicator to NFinalPercent, and needs to increase the progress indicator every time.

• The StatusUpdate function cannot work with VerupdateFile, VersearchandUpdatefile. When you call those functions, you must disable the status bar or manually update it.

• Call SetStatusWindow for setting statusUpdate for setting status rows to an initial percentage.

转载请注明原文地址:https://www.9cbs.com/read-5392.html

New Post(0)