home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / scentsls / srcentsl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-20  |  4.8 KB  |  124 lines

  1. //***************************************************************************
  2. //
  3. //  SRCENTSL.H
  4. //
  5. //  Header File for Application Programming Interface for
  6. //  SRC Enterprises Slider Custom Control (SRCENTSL.DLL)
  7. //
  8. //  Copyright (c) 1996 Steven R Clabaugh
  9. //
  10. //***************************************************************************
  11. #ifndef _INCL_SRCENTSL_H
  12. #define _INCL_SRCENTSL_H
  13.  
  14. //**********************************************************
  15. // Slider Styles
  16. //**********************************************************
  17.  
  18. #define SL_REVERSED  0x0004    // Reversed          style bit
  19. #define SL_HORZ      0x0010    // Horizontal        style bit
  20. #define SL_THERM     0x0020    // Thermometer guage style bit
  21.  
  22. //**********************************************************
  23. // Slider Custom Control API Functions
  24. //**********************************************************
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif  // __cplusplus
  28.  
  29. HWND FAR PASCAL _export SRCEntSLCreate(DWORD, LPSTR, LPSTR, int, int, int,
  30.                                        int, int, int, int, int, BOOL, BOOL,
  31.                                        HWND, HMENU, HINSTANCE);
  32. VOID FAR PASCAL _export SRCEntSLEnableMouse(HWND, BOOL);
  33. VOID FAR PASCAL _export SRCEntSLGetRange(HWND, LPINT, LPINT);
  34. int  FAR PASCAL _export SRCEntSLGetRevVal(HWND);
  35. int  FAR PASCAL _export SRCEntSLGetVal(HWND);
  36. VOID FAR PASCAL _export SRCEntSLInit(HWND, LPSTR, LPSTR, int, int, int, int,
  37.                                      int, int, BOOL, BOOL);
  38. VOID FAR PASCAL _export SRCEntSLSetFace(HWND, LPSTR);
  39. VOID FAR PASCAL _export SRCEntSLSetHand(HWND, BOOL);
  40. VOID FAR PASCAL _export SRCEntSLSetKnob(HWND, LPSTR, int, int, int, BOOL);
  41. VOID FAR PASCAL _export SRCEntSLSetRange(HWND, int, int, BOOL);
  42. int  FAR PASCAL _export SRCEntSLSetVal(HWND, int, BOOL);
  43.  
  44. #ifdef __cplusplus
  45. }
  46. #endif  // __cplusplus
  47.  
  48. //***************************************************************************
  49. //***************************************************************************
  50. //***************************************************************************
  51. //
  52. //  SRCEntSL Class Definition
  53. //
  54. //***************************************************************************
  55. //***************************************************************************
  56. //***************************************************************************
  57. #ifdef __cplusplus
  58.  
  59. class FAR CSRCEntSL
  60. {
  61.  
  62.    //****************************************************************
  63.    //***********************  Member Data  **************************
  64.    //****************************************************************
  65.  
  66.    private:
  67.  
  68.       HWND m_hSlider;
  69.  
  70.    //****************************************************************
  71.    //***********************  Member Functions  *********************
  72.    //****************************************************************
  73.  
  74.    public:
  75.  
  76.       // Constructor/Destructor
  77.       FAR PASCAL _export CSRCEntSL();
  78.       FAR PASCAL _export ~CSRCEntSL();
  79.  
  80.       // Overloaded operators
  81.       void FAR PASCAL _export operator+=(int x);
  82.       void FAR PASCAL _export operator-=(int x);
  83.       void FAR PASCAL _export operator++();      // prefix
  84.       void FAR PASCAL _export operator++(int);   // postfix
  85.       void FAR PASCAL _export operator--();      // prefix
  86.       void FAR PASCAL _export operator--(int);   // postfix
  87.  
  88.       // Creates a Slider (DO NOT use STRICT Type Handles)
  89.       UINT FAR PASCAL _export Create(
  90.                   DWORD Style,
  91.                   LPSTR FaceName,
  92.                   LPSTR KnobName,
  93.                   int   X,
  94.                   int   Y,
  95.                   int   ks,
  96.                   int   kt,
  97.                   int   kb,
  98.                   int   rmin,
  99.                   int   rmax,
  100.                   int   val,
  101.                   BOOL  bHand,
  102.                   BOOL  bMouse,
  103.                   UINT  hParent,  //Cast this to UINT in application code
  104.                   UINT  ID,       //Cast this to UINT in application code
  105.                   UINT  hInst     //Cast this to UINT in application code
  106.                  );
  107.  
  108.       UINT FAR PASCAL _export GetHandle();
  109.       void FAR PASCAL _export EnableMouse(BOOL bMouse);
  110.       void FAR PASCAL _export GetRange(LPINT lpMin, LPINT lpMax);
  111.       int  FAR PASCAL _export GetRevVal();
  112.       int  FAR PASCAL _export GetVal();
  113.       void FAR PASCAL _export SetFace(LPSTR FaceName);
  114.       void FAR PASCAL _export SetHand(BOOL bHand);
  115.       void FAR PASCAL _export SetKnob(LPSTR KnobName,int ks,int kt,int kb,
  116.                                       BOOL bRedraw);
  117.       void FAR PASCAL _export SetRange(int nMin, int nMax, BOOL bRedraw);
  118.       int  FAR PASCAL _export SetVal(int nVal, BOOL Redraw);
  119.  
  120. }; // End CSRCEntSL Slider Custom Control Class Definition
  121.  
  122. #endif // __cplusplus
  123. #endif // _INCL_SRCENTSL_H
  124.