---------------------------------------------------------------- Slider Control Copyright 1993 Northeast Data Corp. All Rights Reserved This is the DEMO version of the control. It has the same characteristics as the commercial version, except for a notice that appears each time the control is loaded. ---------------------------------------------------------------- Release 1.0 August 1993 This document describes the Slider Custom Control. CONTENTS 1. Product Description 2. Legal Information 3. Installation 4. Usage 5. Support ---------------------------------------------------------------- 1. Product Description The Slider Control is a Microsoft Windows DLL designed and implemented in compliance with Microsoft standards for interfacing with applications and the SDK Dialog Editor. The Slider Control is intended for use by application programmers who are using the Microsoft SDK for Windows version 3.1. The control appears to the end user as a slider similar to those used on audio/video equipment such as stereos, tuners, and amplifiers. To the application programmer, the interface to the slider is similar to the one for the MS Windows standard scroll bar. The programmer can set a range of values that will be fed back to the application as the end user adjusts the position of the slider on its scale. Being integrated with the MS Windows SDK Dialog Editor, the programmer can add the Slider Control to the Dialog Editor. This allows use of the control in dialog boxes. The programmer can also use the control in an application window by creating a window whose class is "slider". Use of the Slider Control in a finished application requires the Slider Control DLL (slider.dll) to be installed with the application. This is true of all custom controls written for MS Windows. There are style settings available that allow the programmer to control the behavior and appearance of the Slider Control. The slider can appear in a horizontal or vertical orientation. A horizontal slider can have top "tick marks", bottom tick marks, no tick marks, or tick marks on both the bottom and top. This is also true for vertical sliders, where tick marks are left and right rather than top and bottom. The range of the slider can be set to any range with low and high values varying from 0 to 32767. All communication between the Slider Control and the application is performed using the standard Windows message mechanism for controls. Design of the Slider Control message mechanism allows the application to continuously monitor the setting of the control. A Visual Basic version of the Slider Control is available separately in the form of a standard "VBX" control. It allows use of the control from the Visual Basic and Visual C++ environments. ------------------------------------------------------------------- 2. Legal Information The purchaser of the Slider Control is allowed to use it and distribute it in applications without paying any royalty, and without printing or displaying a copyright notice for the control. This only includes distribution of the Slider Control DLL. It does not include distribution of the header file, import library, or documentation that comes with the Slider Control. The purchaser of the Slider Control may distribute the control DLL with applications that are networked (multiple users accessing the DLL from a file server) without paying any license fees to Northeast Data Corp. The development files for using the Slider Control (this excludes the DLL) may only be used by the purchaser of the control. The purchaser may install the development files on his/her own machine for development purposes. These files may not be made available to any other person in any way. For use of the Slider Control in any other fashion, the purchaser should contact Northeast Data Corp. to make special arrangements. All information regarding purchasing the control can be found during the initial loading of the DLL. ------------------------------------------------------------------- 3. Installation Create a "slider" directory on your hard disk and copy all files from the distribution disk to the directory. Make sure you specify the /s option in order to copy any subdirectories. Included with the software is a subdirectory containing a Microsoft Windows foundation class for the slider as well as a test program for using it. You may want to copy the slider.dll file to your Windows directory. This eliminates the need to specify the installation directory as the working directory when you run the test application or your own application. You may also want to copy the .lib file to your LIB directory and the header files (at least slider.h) to your INCLUDE directory. ------------------------------------------------------------------- 4. Usage The slider.dll has to be loaded before you can create "slider" class windows. Loading the DLL causes the slider to be registered as a global class. This is necessary in order for the application to be able to create slider windows. There are two ways to load the DLL. You can either load it explicitly by calling the MS Windows LoadLibrary API function, or load it implicitly as in the slidetst demo application. If you choose to load the slider implicitly, you MUST call the "registerSlider" function. Although this function doesn't do anything inside the DLL, it causes the linker to generate code that loads the DLL automatically when your applications starts. Create slider windows by calling the MS Windows CreateWindow function, or by putting slider controls into a dialog box using the Dialog Editor. Look at the slidetst.c file for an example of creating the windows from the application. To use the slider control in dialog boxes, use the SDK Dialog Editor for Windows V3.1. Install the slider.dll as a custom control. Two sliders will show up in the custom control dialog box - a vertical slider and a horizontal slider. There is a directory named MSFC directly below the directory you are reading this file from (only if you used the -d option to unzip) that contains a C++ class based on this control that works with MSVC as well as a test application for that class. STYLES ------ These are the window styles that can be assigned: SCS_VERTICAL - Creates a vertical slider SCS_HORIZONTAL - Creates a horizontal slider SCS_TEXTHASRANGE - If specified, you can assign the initial slider range and position in the text for the control. For example, setting the window text to 1,100,50 will create a slider with a range of 1 to 100 and an initial setting of 50. Valid ranges are 0 to 32767. If you do not specify this style, you must set these values yourself using the SCM_SETRANGE and SCM_SETPOS messages. SCS_INVERTRANGE - Causes the slider range to be reversed. Horizontal sliders normally have the low end of the range on the left and the high range toward the right. Vertical sliders have the low end at the bottom and the high end at the top. Specifying this style reverses this order. SCS_LEFTTICKS - Displays tick marks to the left of a vertical slider. SCS_RIGHTTICKS - Displays tick marks to the right of a vertical slider. SCS_TOPTICKS - Displays tick marks along the top of a horizontal slider. SCS_BOTTOMTICKS - Displays tick marks along the bottom of a horizontal slider. SCS_TABSTOP - The control can be activated by tabbing to it with the TAB key. Like other controls, this is only operational in dialog boxes. MESSAGES -------- These are the messages you can send to the slider control: SCM_SETRANGE - wParam - unused lParam - Low word = low end of range High word = high end of range Old range is returned in low and high words of function result if successful, otherwise -1. SCM_GETRANGE - wParam - unused lParam - unused Current low end of range is returned in low order word of SendMessage function result. High end of range is in high order word. SCM_SETPOS - wParam - New position lParam - unused Old position is returned if successful, otherwise -1. SCM_GETPOS - wParam - unused lParam - unused Current position is returned from the SendMessage function. COLORS ------ The background color of the control can be modified by responding to the WM_CTLCOLOR message and setting the background color by calling the SetBkColor API function. The highlight color around the edge of the slider and around the slider button can be controlled using the Windows control panel. MONITORING THE SLIDER --------------------- As the user adjust the slider, WM_HSCROLL or WM_VSCROLL messages are sent to the owner of the slider control. The behavior of the slider is the same as for the standard scroll bar control. See the SDK for information about these messages. ----------------------------------------------------------------------- 5. Support For technical support, call 716-247-5934 from 8:00 a.m to 5:00 p.m Monday through Friday.