Spin Control for Windows NT Operating System, October release (c)1992 Babarsoft, 10/28/92 by Mark Gamber Spin is a control used to manipulate numeric data entry or a list of items where a listbox would be cumbersome. To begin using Spin, copy SPIN.DLL to your development directory and, from the Dialog Editor, select "File_Open Custom" to pick the file from a list of DLLs displayed. If all goes well, you should see the control in the custom control listbox displayed by selecting the toolbar item. Spin's main attraction deals with numeric data entry. You may attach an edit control to Spin, allowing Spin to increment and decrement the number in the edit control automatically without any extra coding. In addition, you may select upper and lower limits and "wrap around" when a limit is reached. These require some extra code as they are not available while designing the dialog box. Attaching an Edit Control: hEdit = GetDlgItem( hDlg, IDM_EDIT ); SendMessage( GetDlgItem( hDlg, IDM_SPIN ), BM_SETSTATE, hEdit, MAKELONG( LoLimit, HiLimit ) ); This code fragment illustrates how to attach an edit control to the Spin control and set upper and lower limits. To set the "wrap around" feature: SendMessage( GetDlgItem( hDlg, IDM_SPIN ), BM_SETSTYLE, Wrap, NULL ); If Wrap is 0, wrapping is disabled. Otherwise, it is enabled. By default, wrapping is disabled. Messages: In addition to numeric entry, Spin may be used to select a predetermined list of items where a listbox is inappropriate. When clicked, Spin sends a WM_COMMAND to the parent process, wParam is the ID of the Spin, the low word of lParam is 0 if the lower half is clicked, 1 of the upper half is clicked. If the mouse is held down on the Spin, it repeats several times a second. Spin may be freely distributed and included with other applications royalty free. The user, you, must agree to indemnify and hold harmless the soft- -ware and author for any damages incurred, whether real or imaginary. In addition, the software may not be altered in any way. If you cannot agree to these simple terms, destroy the software and pretend you never saw it. The author may be contacted in these fine locations: America Online E-Mail: PCA MarkG Compuserve Mail: 76450,2754 Internet: pcamarkg@aol.com