Configuration Guide


Chapter 3. Windows Initialization File

An application that runs under Microsoft Windows uses an initialization file to set defaults. Initialization file settings control the appearance and behavior of Panther applications run under Windows—for example, specifications for basic color mappings, window display and other behavior.

The initialization file that you supply with a deployed application can provide initial settings; individual users can later change these settings to suit their preferences. Initialization file settings override any duplicate settings in SMVARS or SMSETUP files.

Other Windows attributes such as the color scheme must be set from the Windows control panel. Control panel changes are written to the Windows initialization file. For more information, refer to the Windows documentation.

Note: Several initialization files are associated with Panther. However, this chapter only describes the one that is used to initialize Panther applications—prol5w32.ini or prol5w64.ini.


Initialization File Search

Each application can have its own initialization file. At startup, Panther looks for the initialization file in the following places, listed in descending order of precedence. You can use any of the following methods:

  1. The initialization filename that is supplied as an argument to sm_pi_mw_setup in the file piinit.c for a Panther application executable, and to sm_pi_mw_jxsetup in the file pijxinit.c for a Panther development executable. To set an application's initialization file in this way, edit the appropriate source file, which is in the link directory, then recompile.

    In the default distribution, these functions are supplied an empty string argument.

  2. The initialization file that is supplied as the -ini option used when starting the application. The .ini file extension is optional.
  3. An initialization file whose base name is the same as the Panther executable—for example, LEADS.INI for the executable LEADS.EXE. The initialization file must be in the Windows directory if you do not supply a path.
  4. The initialization file that is supplied with Panther (prol5w32.ini or prol5w64.ini) and installed in the Windows directory.

Initialization File Format

Initialization files are arranged as a list of variables; each variable takes a value in this format:

variable=value

For example, this entry sets the StackedWindowType variable to Dialog.

StackedWindowType=Dialog

Entries are organized into several sections; each section starts with a bracketed title:

Sections and entries within each section can be in any order. Comments are indicated with a semicolon at the start of the line.


General Variable Settings

The initialization file can set a number of general application variables, which are described in Chapter 2, "Application Variables." These settings supersede duplicate settings in the Windows environment, thus allowing unique settings for different applications running in the same Windows environment. You can set these variables:

SMBASE
SMDICNAME
SMFLIBS
SMPATH
SMRBHOST
SMRBPORT
SMTERM
SMTPJIF
SMUSER
SMVARS

In this section, you can also set or override the LM_LICENSE_FILE environment variable setting. This variable can be set to a file or to a license server port—for example, LM_LICENSE_FILE=1700@myhost.

To use the environment settings for any of these variables, set it to an empty value. For example:

SMPATH=

Behavior and Display Settings

The following variables determine the GUI's appearance and behavior. They are set in the [Prolifics Options] section. (d) indicates the default setting.

Note: This section also typically sets a number of general setup variables such as SMBASE and SMVARS.

3D
Set to Yes (the default) or No in order to enable or disable three-dimensional display of various application objects—message boxes, Windows common dialog boxes, and application screens. This setting can be overridden for individual screens through its 3d property. However, display of message boxes and Windows common dialog boxes is always set in the initialization file

FrameTitle
Sets the title text in the MDI frame around a Panther application.

IconPosition
Sets the location of the application's minimized icon on the screen's X and Y axes with this format:
IconPosition=x-position y-position

x-position and y-position are measured in pixel units.

IntroPixmap
Specifies the image that appears during application startup. Set this variable to the image's file name. Refer to "Displaying a Picture on Widgets" in Using the Editors for supported image file types.

KeepInMDI
Determines initial placement of a window in relation to the MDI frame:

Yes
Forces initial placement of a newly created window within the MDI frame, if its size allows.

No (d)
Allows initial placement of the window anywhere within the MDI frame.

MDIWallpaperPixmap
Specifies a wallpaper image. Set this variable to the image's file name. Refer to "Displaying a Picture on Widgets" in Using the Editors for supported image file types.

MDIWallpaperStyle
Sets the position of a wallpaper image on Panther's MDI parent window:

Center
Centers the image on your Panther MDI screen.

Tile (d)
Places the image in the upper left corner of the window; the image is repeated as many times as necessary to fill the entire window.

MoveThreshold
Specifies in pixels the distance that the cursor must be moved in order to be considered a drag instead of a click. This applies when dragging the rubberband, or creating, moving, or resizing an object.

NormalPosition
Sets the location of the application's MDI frame on the screen's X and Y axes when it is restored, with this format:
NormalPosition=x-position y-position

x-position and y-position are measured in pixel units.

NormalSize
Sets the size of the MDI frame in when it is restored, with this format:
NormalSize=width height

width and height are measured in pixel units.

PaletteUse
Specifies whether to use the color palette to produce colors:

Enable (d)
Panther uses the color palette to produce colors, allowing the full range of RGB colors supported by your display device without having to make use of dithering. If PaletteUse is set to Enable, Panther uses the color mappings in the [Prolifics PaletteColors] section.

Disable
Panther does not use the color palette. An application is limited to the reserved system colors (20 on a 256-color display) and dithered combinations of them. This setting requires fewer resources. Set PaletteUse to Disable only if you need to run other applications that use colors intensively.

If PaletteUse is set to Disable, Panther uses the color mappings in the [Prolifics NoPaletteColors] section.

SaveStateOnExit
If set to Yes (the default), the size and location of the MDI frame is saved between sessions.

StackedWindowType
Set to either Dialog or MDI:

Dialog (d)
Forces all stacked windows in a Panther application to behave as dialog boxes: they are modal, have a dialog-style border, and can move outside the MDI frame. This can cause unpredictable behavior if the application moves stacked and sibling windows on the window stack, or if the application creates or breaks sibling relationships between windows after they are displayed.

MDI
Stacked windows behave as regular MDI windows.

StartupState
Set to Minimized, Normal (the default), or Maximized. This setting controls the size of the MDI frame when Panther starts. Windows determines the initial size if no value is given.

Basic Color Mappings

Panther defines sixteen basic colors—eight highlighted and eight unhighlighted. These colors are displayed on the screen editor's color palette (refer to "How to Set an Object's Color with the Color Palette" in Using the Editors):

black

red

hi_black

hi_red

blue

magenta

hi_blue

hi_magenta

green

yellow

hi_green

hi_yellow

cyan

white

hi_cyan

hi_white

The initialization file can map these colors to any of the colors supported by Windows. Panther basic colors are mapped in one of two sections, depending on whether the Windows color palette is enabled or disabled (refer to "PaletteUse").

If the Windows color palette is enabled (PaletteUse=Enable), basic colors are mapped to Window colors in the [Prolifics PaletteColors] section.

Entries in both sections use this syntax:

pantherColor=rgbValue

pantherColor is one of the basic Panther colors listed earlier. rgbValue is an RGB value in the form red/green/blue where red, green, and blue are numbers between 0 and 255. For example:

blue=0/0/255

Under Windows, foreground colors must be primary colors—dithered patterns are invalid. If you specify a non-primary color, Windows rounds it up to a primary color.

You can use the Windows palette feature (on the Windows Control Panel) to interactively mix your colors, then note the values and transfer them to the initialization file.

Note: To create custom color aliases beyond the sixteen basic colors, use the configuration map file—refer to "Configuration Map File" in Application Development Guide.


Status Line Appearance

The [Prolifics StatusLine] section contains several variables that determine the appearance of the status line appears. By default, the status line is an etched out bar with the same colors used for push buttons. (d) indicates the default setting.

Flags
Set this variable to one or more values:

ETCHEDIN (d)
Causes the status bar to appear etched into the MDI frame rather than etched out.

PURECOLORS
Allows only non-dithered colors to paint the status bar.

STATUSBARCOLORS
Enables the four status bar color variables (BackColor, HighLightColor, ShadowColor, and TextColor). If this flag is not set, the control panel color settings for buttons are used.

ShadowWidth
Sets the width of a three-dimensional status bar's shadow, in pixel units. The default width is 2 pixels. To avoid a three-dimensional effect, set this variable to 0.

BackColor
HighLightColor
ShadowColor
TextColor
These variables set colors for the status bar: default background color, text color, shaded highlights, and darkened shadow for the status line. Settings for these color variables are used only if the Flags variable is set to STATUSBARCOLORS. Set these variables to an RGB value with this format:
variable=red/green/blue

red, green and blue are numbers between 0 and 255. For example:

blue=0/0/255

You can use the Windows palette feature on the Windows control panel to mix colors interactively, then note the values and enter them as shown above.

For compatibility with other Windows applications, background color defaults to grey. Other color default values are calculated by sm_ManipulateColor. Messages with embedded display attributes can override the default background color.


Help Behavior

The [Prolifics Help] section specifies the behavior of the Panther interface to the Windows help engine.

EditorHelpPath
Sets the path to the directory that contains screen editor online help. The default installation places the help files in $SMBASE\docs\books.

HelpFile
Set this variable to invoke Windows help. This variable should be set to the path of the desired Winhelp database file. The path can be a fully specified or it can be a file name that is on the path specified by the SMPATH variable.

DDE

This section supports DDE client and server links. For general information on setting DDE client/server links between Panther and other applications, refer to Chapter 46, "Dynamic Data Exchange," in Application Development Guide.

DDEServer
Set to On or Off. When set to On, this variable enables Panther as a DDE server.

DDEClient
Set to On or Off. When set to On, this variable enables Panther as a DDE client.
screenname ! fieldname = service | topic ! item 
Specifies hot links to server applications. The format for server, topic, and item arguments is specific to the server application. For example, a link to a Quattro Pro spreadsheet might look like this:
salesScr!totalSales=QPW|C:\myAcct\sales.wb1!$A:$A$10..$A$10

Table 46-1 on page 46-7 in Application Development Guide shows the syntax used by three widely used Windows applications. Refer to the server application's documentation for information on server argument formats. For more information on setting Panther as a DDE client, refer to "Panther as a DDE Client" in Application Development Guide.


Edit and Windows Menus

Two sections, [Prolifics EditMenu] and [Prolifics WindowsMenus], let you set the labels, mnemonics, and accelerators for the Edit and Windows menus, respectively. For example, this entry sets the Cascade item label and specifies its first letter as the item's mnemonic (&C):

CascadeLabelAndMnemonic=&Cascade

Note: If you change the default settings for accelerators, add the corresponding items in the accelerator table, in the mwjxform.rc file.


Sample Initialization File

[Prolifics Options]
;
; The following are various general Prolifics options.
; Each option is preceded with a comment that indicates
; what it is for.
;   Set this option to the name you want in the MDI Frame
; Window's title bar. You should set this to an appropriate
; value for your application.
FrameTitle=Panther
;   Name of the graphic file to display upon startup of the
; application.
IntroPixmap=
;   SMBASE, SMVARS, SMPATH, SMUSER, SMRBHOST and SMRBPORT may
; be set here to override the environment variable
; settings. This permits different settings for different
; applications running in the same environment, without
; needing to restart Windows. Setting any of these options
; to an empty value will maintain the environment settings.
SMBASE=C:\Program Files\Prolifics\Panther5
SMVARS=
SMPATH=
SMUSER=
SMRBHOST=
SMRBPORT=
;   Use this option to override the SMFLIBS environment
; variable under Windows. If the libraries are accessed
; remotely, change the syntax of the libraries to include
; the host name (e.g.
; SMFLIBS=host!client.lib;host!common.lib;host!server.lib).
SMFLIBS=client.lib;common.lib;server.lib
;   Use this option to override the SMDICNAME environment variable
; under Windows. If the libraries are accessed remotely,
; uncomment this line and use the host name of the remote system.
;SMDICNAME=host!data.dic
;   Use this option to override the SMTERM environment variable
; under Windows.
SMTERM=mswin
;   Use this option to set or override the LM_LICENSE_FILE
; environment variable setting. Note that this can be set to
; a file or to a license server port (e.g. 1700@myhost).
LM_LICENSE_FILE=
;   Setting this option to "No" will cause the application to
; lose the 3-D effect for all user screens and system
; dialogs. Defaults to "Yes" if unspecified.
3D=Yes
;   The following options control the size and location of
; the MDI frame when Prolifics starts. If no values are
; given, the initial size & location will be determined by
; Windows.
;   Set this option to "Minimized", "Normal" or "Maximized".
; Defaults to "Normal".
StartupState=Normal
;   This option sets the normal (i.e. "Restored") size (width
; height) of the MDI frame in pixels. For example,
; NormalSize=100 150 makes the MDI frame 100 pixels wide
; and 150 pixels high when in a restored state.
NormalSize=
;   This option sets the normal (i.e. "Restored") location 
; (x y) of the MDI frame in pixels.
NormalPosition=
;   This option sets the location (x y) of the application's
; minimized icon in pixels. Use this to override Windows'
; default placement.
;IconPosition=
;   Set this option to "Yes" to save the size and location of
; the MDI frame in this file each time you exit Prolifics. Any
; uncommented settings for StartupState, NormalSize,
; NormalPosition and IconPosition are overridden upon
; exiting. The default is "No" if unspecified.
SaveStateOnExit=Yes
;   Name of the graphic file to display as the MDI frame
; background. Style determines if graphic uses a "Tile"
; (default) or "Center" style.
MDIWallpaperPixmap=
MDIWallpaperStyle=
;   The next option controls how Prolifics makes use of the
; color palette, if your display device supports one. Use
; of the palette allows the full range of RGB colors
; supported by your display device to be displayed without
; dithering. If several applications which use the color
; palette are running, they share the palette. The
; application which is active is guaranteed to display its
; colors correctly. If applications share the palette
; correctly, applications which are not active get colors
; which are as close as possible to the requested colors.
; More information on color palettes can be found in
; chapter 19 of the Windows SDK "Guide to Programming".
;   If set to Disable, Prolifics does not make use of the
; color palette. Your application is limited to the
; reserved system colors (20 on a 256 color display) and
; dithered combinations of them. This setting requires
; fewer resources. In this configuration, the colors
; displayed by Prolifics are independent of the focus. You
; should only set this option to Disable if you tend to run
; other applications that are very color intensive.
;   Set this option to "Enable" or "Disable". The default is
; "Enable".
PaletteUse=Enable
;   The following option can be used to force all stacked
; windows in a Prolifics application to be dialog boxes.
; This makes them modal, gives them a dialog style border,
; and allows them to move outside of the MDI frame. Note
; that this may lead to unpredictable behavior if the
; application moves stacked and sibling windows around on
; the window stack, or if the application "siblingizes"
; and/or "desiblingizes" windows after they are displayed.
;
; Set this option to "Dialog" to force stacked windows to
; be dialog boxes or to "MDI" if you want to use regular
; MDI windows.
StackedWindowType=Dialog
;   The option "MoveThreshold" is the number of pixels which
; the mouse must be moved in order to be considered a drag
; instead of a click. This applies when dragging out a
; rectangle to create an object, or when trying to move or
; resize an object. If you actually do want to move or
; resize an object by less than this amount, drag a larger
; distance first, then drag back to the desired position.
; (Do not release the mouse in between.) This only takes
; effect in Edit Mode.
MoveThreshold=5
;   Setting this option to "Yes" will cause new MDI windows
; to be positioned within the MDI frame, if possible. "No"
; (the default) places no constraints on the initial
; position of windows.
KeepInMDI=No
;   The following two options can be used to disable
; Prolifics as a DDE client or server. The default is for
; Prolifics to be enabled as both a client and server. Set
; these to "Off" to disable either or both.
DdeClient=On
DdeServer=On
[Prolifics PaletteColors]
;   This section is used to match the sixteen Prolifics Basic
; colors to RGB values. It is not optional, as Prolifics
; must have a way to perform this mapping. The 16 colors
; listed here correspond to the colors of the Screen
; Editor's Color Palette screen. You may change any of
; these values to override the default. The values for
; these colors are decimal RGB values. You may run Control
; Panel - Colors to look at colors by decimal RGB value.
black=128/128/128
blue=0/0/191
green=0/191/0
cyan=0/191/191
red=191/0/0
magenta=191/0/191
yellow=191/191/0
white=191/191/191
hi_black=0/0/0
hi_blue=0/0/255
hi_green=0/255/0
hi_cyan=0/255/255
hi_red=255/0/0
hi_magenta=255/0/255
hi_yellow=255/255/0
hi_white=255/255/255
[Prolifics NoPaletteColors]
;   The colors in this section will be used if the display
; device does not support a color palette, or you have
; disabled the use of the color palette using the
; PaletteUse option.
;   This section is used to match the sixteen Prolifics Basic
; colors to RGB values. It is not optional, as Prolifics
; must have a way to perform this mapping. The 16 colors
; listed here correspond to the colors of the Screen
; Editor's Color Palette screen. You may change any of
; these values to override the default.The values for these
; colors are decimal RGB values. You may run Control Panel
; - Colors to look at colors by decimal RGB value.
black=128/128/128
blue=0/0/128
green=0/128/0
cyan=0/128/128
red=128/0/0
magenta=128/0/128
yellow=128/128/0
white=192/192/192
hi_black=0/0/0
hi_blue=0/0/255
hi_green=0/255/0
hi_cyan=0/255/255
hi_red=255/0/0
hi_magenta=255/0/255
hi_yellow=255/255/0
hi_white=255/255/255
[Prolifics Fonts]
;   The "Font" option sets the application-wide default font.
; It can be a font description in the form:
; fontname-size[-bold][-italic][-underline], or it can be a
; GUI-independent font (see the [Prolifics FontTable] section
; below). You can also use one of the system fonts below:
;       SYSTEM_FONT       -- the font Windows uses in menus, etc.
; SYSTEM_FIXED_FONT -- a fixed pitch font
; (used in draw mode with SYSTEM_FONT)
; OEM_FIXED_FONT -- the PC, MSDOS character set
; (line drawing will work with this one)
; ANSI_FIXED_FONT -- Courier fixed pitch
; ANSI_VAR_FONT -- Helvetica variable pitch
; DEFAULT_GUI_FONT -- font used form menus, dialog boxes,
; etc. (Windows 95 only)
;   If not specified, the default is SYSTEM_FONT in Windows NT and
; DEFAULT_GUI_FONT in Windows 95.
;Application Font=SYSTEM_FONT
[Prolifics StatusLine]
;   This section configures how the status line appears.
; By default, the status line is an etched out bar with the
; same colors that Windows uses for push buttons.
; The following options modify its appearance:
;   The "Flags" option sets flags for the status line.
; Available flags are:
;   STATUSBARCOLORS - If this flag is set, the options
; BackColor, TextColor, HighLightColor, and
; ShadowColor below are meaningful. If it is not
; set, colors used for the status bar are those
; set for buttons in the control panel.
;   PURECOLORS - All colors used for painting the status
; bar are forced to pure non-dithered colors.
; ETCHEDIN - The status bar is etched in to the MDI
; frame, rather than being etched out. Etched out
; is the default.
;
; By default, no flags are set.
Flags=
;   The "ShadowWidth" option sets the width of the 3D status
; bar shading in pixels. It defaults to 2. If set to 0,
; there is no 3D effect.
ShadowWidth=2
;   The "BackColor", "HighLightColor", and "ShadowColor"
; options are the colors used to paint the status bar
; background, shaded highlights, and darkened shadow.
; These options only take effect if STATUSBARCOLORS is
; one of the flags specified in the "Flags" option above.
; The colors can be GUI independent colors. "BackColor"
; defaults to gray. "TextColor", "HighLightColor" and
; "ShadowColor" are calculated using sm_ManipulateColor()
; if they are not specified here.
BackColor=128/128/128
;TextColor=0/0/0
;HighLightColor=255/255/255
;ShadowColor=0/0/0
;   The "Font" option sets a font for use on the status line.
; It can be one of the system fonts, like SYSTEM_FONT, or
; ANSI_VAR_FONT, or it can be a font description in the
; form: fontname-size[-bold][-italic][-underline] or it
; can be a GUI-independent font. It defaults to
; SYSTEM_FIXED_FONT.
Font=MS Sans Serif-10
;
[Prolifics Help]
;
; This section specifies the behavior of the Prolifics
; interface to external help engines.
;   This option contains the name of the help file to be used
; by the external help system you've installed.
HelpFile=
;   The option "EditorHelpPath" specifies a path where the
; directory that contains the DynaText book directory can be
; found. This should be removed when providing an .ini file
; with your finished application. (until Panther 4.2 only)
EditorHelpPath=$SMBASE\docs\books
[Prolifics DDE]
;   This section supports end user DDE client links. Specify
; the Prolifics screen name, Prolifics widget name, the
; remote server name, the topic, and the item.
;   Example:
; scrnname.scr!widgetname=Excel|Sheet1!R1C1
;   The screen name MUST be separated from the widget name
; with an '!'. The Server, Topic and Item MUST be separated
; with '|' and '!' characters.
;WARNING: QuattroPro requires full path name for its topic. 
; For example, if we connect linkfunc.scr client
; topic and DDETextField client item with QPW server,
; FROMINI.WB1 server topic, and A1 server item, we
; write:
; linkfunc.scr!DDETextField=QPW|C:\QPW\FROMINI.WB1!A1
;NOTE: Prolifics topic and item can be specified in lower,
; upper, or mixed cases. QuattroPro and Microsoft Excel
; servers allow specification of names of their servers,
; topics, and items in lower, upper, or mixed cases.
[Prolifics EditMenu]
;  This section enables a user to set Edit Menu labels,
; mnemonics, and accelerators. Below are examples of
; default settings which are commented out.
; WARNING: in case a user changes default settings for
; ACCELERATORS, he/she should change corresponding items
; in accelerator table prorun.rc and prodev.rc file.
;CutLabelAndMnemonic=Cu&t
;CutAccelerator=CtrlDel+X
;CopyLabelAndMnemonic=&Copy
;CopyAccelerator=Ctrl+C
;PasteLabelAndMnemonic=&Paste
;PasteAccelerator=Ctrl+V
;DeleteLabelAndMnemonic=Delete
;DeleteAccelerator=Del
;ClearLabelAndMnemonic=Clear
;ClearAccelerator=
;SelectAllLabelAndMnemonic=&Select All
;SelectAllAccelerator=
[Prolifics WindowsMenu]
;  This section enables a user to set Windows Menu labels,
; mnemonics, and accelerators. Below are examples of default
; settings which are commented out.
; WARNING: in case a user changes default settings for
; ACCELERATORS, he/she should add corresponding items
; in accelerator table in prorun.rc and prodev.rc files.
;CascadeLabelAndMnemonic=&Cascade
;CascadeAccelerator=
;TileLabelAndMnemonic=&Tile
;TileAccelerator=
;ArrangeIconsLabelAndMnemonic=Arrange &Icons
;ArrangeIconsAccelerator=
[Environment]
; The set of directories or JAR files where the users'
; class files are.
; CLASSPATH=
[databases]
installed=odbc
[dbms odbc]
description=Microsoft ODBC version 3
driver=odb3dm32.dll
model=tmodb132.dll