home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / mslang / vcslid / readme.txt < prev    next >
Encoding:
Text File  |  1993-09-03  |  9.9 KB  |  254 lines

  1. ----------------------------------------------------------------
  2.  
  3.                         Slider Control  
  4.  
  5.               Copyright 1993 Northeast Data Corp.
  6.  
  7.                      All Rights Reserved
  8.  
  9.  
  10.  
  11.       This is the DEMO version of the control. It has the 
  12.       same characteristics as the commercial version, except
  13.       for a notice that appears each time the control is 
  14.       loaded.
  15.  
  16.  
  17. ----------------------------------------------------------------
  18.  
  19.  
  20.    Release 1.0
  21.  
  22.    August 1993
  23.  
  24.  
  25. This document describes the Slider Custom Control. 
  26.  
  27.  
  28.                CONTENTS
  29.  
  30. 1. Product Description
  31. 2. Legal Information
  32. 3. Installation
  33. 4. Usage
  34. 5. Support
  35.  
  36.  
  37. ----------------------------------------------------------------
  38.  
  39. 1. Product Description
  40.  
  41. The Slider Control is a Microsoft Windows DLL designed and 
  42. implemented in compliance with Microsoft standards for
  43. interfacing with applications and the SDK Dialog Editor.
  44.  
  45. The Slider Control is intended for use by application programmers
  46. who are using the Microsoft SDK for Windows version 3.1. The control
  47. appears to the end user as a slider similar to those used on audio/video
  48. equipment such as stereos, tuners, and amplifiers.
  49.  
  50. To the application programmer, the interface to the slider is similar
  51. to the one for the MS Windows standard scroll bar. The programmer can
  52. set a range of values that will be fed back to the application as the
  53. end user adjusts the position of the slider on its scale.
  54.  
  55.  
  56. Being integrated with the MS Windows SDK Dialog Editor, the programmer
  57. can add the Slider Control to the Dialog Editor. This allows use of the
  58. control in dialog boxes. The programmer can also use the control in an
  59. application window by creating a window whose class is "slider".
  60.  
  61. Use of the Slider Control in a finished application requires the
  62. Slider Control DLL (slider.dll) to be installed with the application.
  63. This is true of all custom controls written for MS Windows.
  64.  
  65. There are style settings available that allow the programmer to control
  66. the behavior and appearance of the Slider Control. The slider can appear
  67. in a horizontal or vertical orientation. A horizontal slider can have top
  68. "tick marks", bottom tick marks, no tick marks, or tick marks on both the
  69. bottom and top. This is also true for vertical sliders, where tick marks
  70. are left and right rather than top and bottom.
  71.  
  72. The range of the slider can be set to any range with low and high values
  73. varying from 0 to 32767.
  74.  
  75. All communication between the Slider Control and the application is 
  76. performed using the standard Windows message mechanism for controls. 
  77. Design of the Slider Control message mechanism allows the application to
  78. continuously monitor the setting of the control.
  79.  
  80. A Visual Basic version of the Slider Control is available separately in 
  81. the form of a standard "VBX" control. It allows use of the control from 
  82. the Visual Basic and Visual C++ environments.
  83.  
  84.  
  85. -------------------------------------------------------------------
  86.  
  87. 2. Legal Information
  88.  
  89. The purchaser of the Slider Control is allowed to use it and
  90. distribute it in applications without paying any royalty, and without
  91. printing or displaying a copyright notice for the control. This only
  92. includes distribution of the Slider Control DLL. It does not include
  93. distribution of the header file, import library, or documentation that
  94. comes with the Slider Control. 
  95.  
  96. The purchaser of the Slider Control may distribute the control DLL with
  97. applications that are networked (multiple users accessing the DLL from
  98. a file server) without paying any license fees to Northeast Data Corp.
  99.  
  100. The development files for using the Slider Control (this excludes the
  101. DLL) may only be used by the purchaser of the control. The purchaser
  102. may install the development files on his/her own machine for development
  103. purposes. These files may not be made available to any other person in
  104. any way.
  105.  
  106. For use of the Slider Control in any other fashion, the purchaser should
  107. contact Northeast Data Corp. to make special arrangements. 
  108.  
  109. All information regarding purchasing the control can be found during
  110. the initial loading of the DLL.
  111.  
  112.  
  113. -------------------------------------------------------------------
  114.  
  115. 3. Installation
  116.  
  117. Create a "slider" directory on your hard disk and copy all files from
  118. the distribution disk to the directory. Make sure you specify the /s
  119. option in order to copy any subdirectories. Included with the software
  120. is a subdirectory containing a Microsoft Windows foundation class for
  121. the slider as well as a test program for using it.
  122.  
  123. You may want to copy the slider.dll file to your Windows directory. 
  124. This eliminates the need to specify the installation directory as the
  125. working directory when you run the test application or your own
  126. application. You may also want to copy the .lib file to your LIB
  127. directory and the header files (at least slider.h) to your INCLUDE
  128. directory.
  129.  
  130. -------------------------------------------------------------------
  131.  
  132. 4. Usage
  133.  
  134. The slider.dll has to be loaded before you can create "slider" class
  135. windows. Loading the DLL causes the slider to be registered as a global
  136. class. This is necessary in order for the application to be able to
  137. create slider windows. There are two ways to load the DLL. You can
  138. either load it explicitly by calling the MS Windows LoadLibrary API
  139. function, or load it implicitly as in the slidetst demo application.
  140.  
  141.  
  142. If you choose to load the slider implicitly, you MUST call the 
  143. "registerSlider" function. Although this function doesn't do anything
  144. inside the DLL, it causes the linker to generate code that loads the
  145. DLL automatically when your applications starts.
  146.  
  147. Create slider windows by calling the MS Windows CreateWindow function,
  148. or by putting slider controls into a dialog box using the Dialog Editor.
  149. Look at the slidetst.c file for an example of creating the windows from
  150. the application.
  151.  
  152. To use the slider control in dialog boxes, use the SDK Dialog Editor
  153. for Windows V3.1. Install the slider.dll as a custom control. Two sliders
  154. will show up in the custom control dialog box - a vertical slider and a
  155. horizontal slider.
  156.  
  157. There is a directory named MSFC directly below the directory you are
  158. reading this file from (only if you used the -d option to unzip) that 
  159. contains a C++ class based on this control that works with MSVC as well
  160. as a test application for that class.
  161.  
  162. STYLES
  163. ------
  164.  
  165. These are the window styles that can be assigned:
  166.  
  167.    SCS_VERTICAL      - Creates a vertical slider
  168.    SCS_HORIZONTAL    - Creates a horizontal slider
  169.    SCS_TEXTHASRANGE  - If specified, you can assign the initial slider
  170.                        range and position in the text for the control.
  171.                        For example, setting the window text to 1,100,50
  172.                        will create a slider with a range of 1 to 100 and
  173.                        an initial setting of 50. Valid ranges are 0 to
  174.                        32767. If you do not specify this style, you must
  175.                        set these values yourself using the SCM_SETRANGE
  176.                        and SCM_SETPOS messages.
  177.    SCS_INVERTRANGE   - Causes the slider range to be reversed. Horizontal
  178.                        sliders normally have the low end of the range on
  179.                        the left and the high range toward the right. 
  180.                        Vertical sliders have the low end at the bottom and
  181.                        the high end at the top. Specifying this style
  182.                        reverses this order.
  183.    SCS_LEFTTICKS     - Displays tick marks to the left of a vertical slider.
  184.    SCS_RIGHTTICKS    - Displays tick marks to the right of a vertical slider.
  185.    SCS_TOPTICKS      - Displays tick marks along the top of a horizontal 
  186.                        slider.
  187.    SCS_BOTTOMTICKS   - Displays tick marks along the bottom of a horizontal
  188.                        slider.
  189.    SCS_TABSTOP       - The control can be activated by tabbing to it with
  190.                        the TAB key. Like other controls, this is only
  191.                        operational in dialog boxes.
  192.                   
  193.  
  194. MESSAGES
  195. --------
  196.  
  197. These are the messages you can send to the slider control:
  198.  
  199.    SCM_SETRANGE      - wParam - unused
  200.                        lParam - Low word = low end of range
  201.                                 High word = high end of range
  202.  
  203.                        Old range is returned in low and high words of
  204.                        function result if successful, otherwise -1.
  205.  
  206.    SCM_GETRANGE      - wParam - unused
  207.                        lParam - unused
  208.  
  209.                        Current low end of range is returned in low
  210.                        order word of SendMessage function result. High
  211.                        end of range is in high order word.
  212.  
  213.    SCM_SETPOS        - wParam - New position
  214.                        lParam - unused
  215.                        
  216.                        Old position is returned if successful, otherwise -1.
  217.  
  218.    SCM_GETPOS        - wParam - unused
  219.                        lParam - unused
  220.                      
  221.                        Current position is returned from the SendMessage
  222.                        function.                       
  223.  
  224.  
  225. COLORS
  226. ------
  227.  
  228. The background color of the control can be modified by responding to the
  229. WM_CTLCOLOR message and setting the background color by calling the
  230. SetBkColor API function. The highlight color around the edge of the slider
  231. and around the slider button can be controlled using the Windows control
  232. panel. 
  233.  
  234.  
  235. MONITORING THE SLIDER
  236. ---------------------
  237.  
  238. As the user adjust the slider, WM_HSCROLL or WM_VSCROLL messages are sent
  239. to the owner of the slider control. The behavior of the slider is the same
  240. as for the standard scroll bar control. See the SDK for information about
  241. these messages.
  242.  
  243. -----------------------------------------------------------------------
  244.  
  245. 5. Support
  246.  
  247. For technical support, call 716-247-5934 from 8:00 a.m to 5:00 p.m
  248. Monday through Friday.
  249.  
  250.  
  251.  
  252.  
  253. 
  254.