Slider control window styles are set when a slider window is created. The
following styles can be set when creating a slider control window. If no
styles are specified, defaults, which are identified in the following descriptions,
are used.
- Specify either of the following to determine the slider's
orientation:
SLS_HORIZONTAL
The slider is positioned horizontally.
The slider arm can move left and right on the slider shaft. A scale can
be placed on top of the slider shaft, below the slider shaft, or in both
places. This is the default orientation of the slider.
SLS_VERTICAL
The slider is positioned vertically. The slider
arm can move up and down the slider shaft. A scale can be placed on the
left side of the slider shaft, on the right side of the slider shaft, or
in both places.
Specify
one of the following to position the slider within the slider window:
SLS_CENTER
The slider is centered in the slider
window. This is the default positioning of the slider.
SLS_BOTTOM
The slider is positioned at the bottom of the slider
window. This is valid for horizontal sliders only.
SLS_TOP
The slider is positioned at the top of the slider
window. This is valid for horizontal sliders only.
SLS_LEFT
The slider is positioned at the left edge of the
slider window. This is valid for vertical sliders only.
SLS_RIGHT
The slider is positioned at the right edge of the
slider window. This is valid for vertical sliders only.
Specify
one of the following to determine the location of the scale on the slider
shaft:
SLS_PRIMARYSCALE1
The slider uses the increment
and spacing specified for scale 1 as the incremental value for positioning
the slider arm. Scale 1 is displayed above the slider shaft of a horizontal
slider and to the right of the slider shaft of a vertical slider. This is
the default for a slider.
SLS_PRIMARYSCALE2
The
slider uses the increment and spacing specified for scale 2 as the incremental
value for positioning the slider arm. Scale 2 is displayed below the slider
shaft of a horizontal slider and to the left of the slider shaft of a vertical
slider.
Specify
one of the following to determine the slider arm's home position:
SLS_HOMELEFT
The slider uses the left edge of the
slider as the base value for incrementing. This is the default for horizontal
sliders and is valid for horizontal sliders only.
SLS_HOMERIGHT
The slider uses the right edge of the slider as
the base value for incrementing. This is valid for horizontal sliders only.
SLS_HOMEBOTTOM
The slider
uses the bottom of the slider as the base value for incrementing. This is
the default for vertical sliders and is valid for vertical sliders only.
SLS_HOMETOP
The slider
uses the top of the slider as the base value for incrementing. This is valid
for vertical sliders only.
Specify
one of the following to determine the location of the slider buttons. If
you do not specify one of these styles, or if conflicting styles are specified,
slider buttons are not included in the slider control.
SLS_BUTTONSLEFT
The slider includes incremental
slider buttons with the control and places them to the left of the slider
shaft. These slider buttons move the slider arm by one position, either
left or right, in the direction that is selected. This is valid for horizontal
sliders only.
SLS_BUTTONSRIGHT
The
slider includes incremental slider buttons with the control and places them
to the right of the slider shaft. These slider buttons move the slider arm
by one position, either left or right, in the direction that is selected.
This is valid for horizontal sliders only.
SLS_BUTTONSBOTTOM
The slider includes incremental slider buttons
with the control and places them at the bottom of the slider shaft. These
slider buttons move the slider arm by one position, either up or down, in
the direction that is selected. This is valid for vertical sliders only.
SLS_BUTTONSTOP
The slider
includes incremental slider buttons with the control and places them at
the top of the slider shaft. These slider buttons move the slider arm by
one position, either up or down, in the direction that is selected. This
is valid for vertical sliders only.
Other
styles that you can specify:
SLS_SNAPTOINCREMENT
The slider arm, when moved
to a position between two specified values on the slider scale, such as
between two tick marks, is positioned on the nearest value and is redrawn
at that position. If this style is not specified, the slider arm remains
at the position to which it is moved.
SLS_READONLY
The slider is created as a read-only slider. This
means that the user cannot interact with the slider. It is used merely as
a mechanism to present a quantity to the user, such as the percentage of
completion of an ongoing task. Visual differences for a read-only slider
include a narrow slider arm, no slider buttons and no detents.
SLS_RIBBONSTRIP
As the slider arm moves, the slider fills the slider
shaft between the home position and the slider arm with a color value that
is different from the slider shaft color, similar to the mercury in a thermometer.
SLS_OWNERDRAW
The application
is notified whenever the slider shaft, the ribbon strip, the slider arm,
and the slider background are to be drawn.
[Back]
[Next]