PreviousNext
Macrovision

PlaceWindow

InstallShield 2008 ยป InstallScript Language Reference

The PlaceWindow function changes the position of user interface objects, including billboards. Specify the distance between the sides of the object and the edges of the screen in nDx and nDy.

When using this function be aware that a setup program runs on a variety of screen resolutions. You may want to determine the extents of the screen before you position the objects. The distance is measured in pixels and is between the edge of the object and the edge of the corner of the screen specified.

Restrictions

This function cannot be used to position message boxes or custom dialogs.

Syntax

PlaceWindow ( nObject, nDx, nDy, nCorner );

Parameters

PlaceWindow Parameters 

Parameter

Description

nObject

Specifies the object whose position is to be changed. Pass one of the following predefined constants in this parameter:

  • ASKOPTIONS—Moves the AskOptions dialog.
  • ASKPATH—Moves the AskPath dialog.
  • ASKTEXT—Moves the AskText dialog.
  • BACKGROUND—Moves the background window.
  • BILLBOARD—Sets the location of billboards used during the file transfer process.
  • ENTERDISK—Moves the EnterDisk dialog.
  • MEDIA_AVI—Sets the window position for the next AVI file to be played. By default, the AVI file will be played in a window in the left hand corner of the InstallShield client screen, 10 pixels from the left and 10 pixels from the top.
  • STATUS—Moves the progress indicator.
  • STATUSDLG—Moves the dialog style progress indicator.
  • STATUSEX—Moves the Setup Status dialog.
  • STATUSOLD—Moves the old style progress indicator.
Tip

When you call PlaceWindow to move the progress indicator or status dialog, be sure to pass the correct constant for the feedback object you have enabled in your setup. For example, if you called Enable (STATUSOLD), you must pass STATUSOLD to PlaceWindow.

nDx

Specifies the distance in pixels between the appropriate edge of the object and the edge of the screen on the horizontal axis.

nDy

Specifies the distance in pixels between the appropriate edge of the object and the edge of the screen on the vertical axis.

nCorner

Specifies from which corner to measure the distances expressed in nDx and nDy. Pass one of the following predefined constants in this parameter:

  • LOWER_LEFT—Measures nDx from the left and nDy from the bottom of the main InstallShield window.
  • LOWER_RIGHT—Measures the nDx from the right and nDy from the bottom of the main InstallShield window.
  • UPPER_LEFT—Measures the nDx from the left and nDy from the top of the main InstallShield window.
  • UPPER_RIGHT—Measures the nDx from the right and nDy from the top of the main InstallShield window.
  • CENTERED—Centers the user interface object within the window.
Note

CENTERED can also be placed in nDx or nDy to center an object only horizontally or only vertically.

Return Values

PlaceWindow Return Values 

Return Value

Description

0

Indicates that the function successfully changed the position of the object.

< 0

Indicates that the function was unable to change the position of the object.

See Also




Copyright Information | Contact Macrovision