home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Spiele Shareware / os2games.iso / os2games / addons / gi / c / pmtools / spin.hpp < prev   
Encoding:
C/C++ Source or Header  |  1993-08-23  |  1.5 KB  |  29 lines

  1. /*--------------------------------------------------------------------------*/
  2. /*                                                                          */
  3. /*   Service-Klasse: Spin-Button                                            */
  4. /*                                                                          */
  5. /*   Version       : V1.00                                                  */
  6. /*                                                                          */
  7. /*   Date          : 23.08.93                                               */
  8. /*                                                                          */
  9. /*   Written       : RF                                                     */
  10. /*                                                                          */
  11. /*     Revision History :
  12.  
  13.                                                                             */
  14. /*--------------------------------------------------------------------------*/
  15.  
  16. class SPINBUTTON
  17.     {
  18.     private:
  19.         HWND    win;
  20.  
  21.     public:
  22.         SPINBUTTON (HWND w=0) : win(w) {};
  23.         void Set (HWND w) {win = w;};
  24.  
  25.         unsigned    SetLimits   (LONG upper, LONG lower) { return WinSendMsg (win, SPBM_SETLIMITS, upper, lower); };
  26.         unsigned    QueryLimits (LONG *upper, LONG *lower) { return WinSendMsg (win, SPBM_QUERYLIMITS, (ULONG)upper, (ULONG)lower); };
  27.         unsigned    SetValue    (LONG value) { return WinSendMsg (win, SPBM_SETCURRENTVALUE, value, 0); };
  28.         unsigned    QueryValue  (LONG *res) { return WinSendMsg (win, SPBM_QUERYVALUE, (LONG)res, 0); };
  29.     };