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

  1. //***************************************************************************
  2. //
  3. //  SRCENTBN.H
  4. //
  5. //  Header File for Application Programming Interface for
  6. //  SRC Enterprises Button Custom Control (SRCENTBN.DLL)
  7. //
  8. //  Copyright (c) 1996 Steven R Clabaugh
  9. //
  10. //***************************************************************************
  11. #ifndef _INCL_SRCENTBN_H
  12. #define _INCL_SRCENTBN_H
  13.  
  14. //**************************************************************
  15. // Button Custom Control Types
  16. //**************************************************************
  17.  
  18. // Momentary Pushbutton; User defined bitmaps (Default Button Type)
  19. // that requires 2 bitmaps
  20. //    A bitmap for the unpushed state
  21. //    A bitmap for the pushed state
  22. //    An optional bitmap for the disabled state
  23. #define BTN_MNTRY     0x0000
  24.  
  25. // Predefined bitmap Spin Buttons; No bitmaps requirements from user.
  26. #define BTN_SPIN1     0x0001   // Spin Button w/Predefined size 1 Bitmaps
  27. #define BTN_SPIN2     0x0002   // Spin Button w/Predefined size 2 Bitmaps
  28. #define BTN_SPIN3     0x0003   // Spin Button w/Predefined size 3 Bitmaps
  29. #define BTN_SPIN4     0x0004   // Spin Button w/Predefined size 4 Bitmaps
  30. #define BTN_SPIN5     0x0005   // Spin Button w/Predefined size 5 Bitmaps
  31. #define BTN_SPIN6     0x0006   // Spin Button w/Predefined size 6 Bitmaps
  32.  
  33. // User defined bitmap Spin Button that requires 3 bitmaps.
  34. //    A bitmap for normal unpushed state.
  35. //    A bitmap for the incrementing pushed state.
  36. //    A bitmap for the decrementing pushed state.
  37. //    An optional bitmap for the disabled state
  38. #define BTN_SPINU     0x0007   // User Defined Bitmap Spin Button
  39.  
  40. // Wrap on/off style bit for Spin Buttons
  41. #define BTN_WRAP      0x0008   // Wrap Bit; Valid for Spin Button Only
  42.  
  43. // Color Buttons, No bitmap requirement for Color Buttons
  44. #define BTN_RED       0x0010   // Red Color Button
  45. #define BTN_GRN       0x0020   // Green Color Button
  46. #define BTN_BLU       0x0030   // Blue Color Button
  47. #define BTN_YEL       0x0040   // Yellow Color Button
  48. #define BTN_CYN       0x0050   // Cyan Color Button
  49. #define BTN_MAG       0x0060   // Magenta(Purple) Color Button
  50. #define BTN_GRY       0x0070   // Gray  Color Button
  51. #define BTN_BLK       0x0080   // Black Color Button
  52.  
  53. // Push Type 2-State Button that requires 3 bitmaps
  54. //    A bitmap for the unpushed state 1
  55. //    A bitmap for the unpushed state 2
  56. //    A bitmap for the pushed state
  57. //    An optional bitmap for the disabled state
  58. #define BTN_P2S       0x0100   // Push Style 2-State Button
  59.  
  60. // Toggle Type 2-State Button that requires 2 bitmaps
  61. //    A bitmap for the state 1 position
  62. //    A bitmap for the state 2 position
  63. //    An optional bitmap for the disabled state 1 position
  64. //    An optional bitmap for the disabled state 2 position
  65. #define BTN_T2S       0x0200   // Toggle Style 2-State Button
  66.  
  67. // Vertical Style Bit (Default is Horizontal)
  68. // Valid for Spin Buttons and 2-State Toggle Buttons
  69. #define BTN_VERT      0x0400
  70.  
  71. //**********************************************************
  72. // Button Custom Control API Functions
  73. //**********************************************************
  74. #ifdef __cplusplus
  75. extern "C" {
  76. #endif  // __cplusplus
  77.  
  78. HWND FAR PASCAL _export SRCEntBNCreate(DWORD, LPSTR, LPSTR, LPSTR, LPSTR,
  79.                                        int, int, int, int, int, int, int,
  80.                                        int, int, int, BOOL, HWND, HMENU,
  81.                                        HINSTANCE);
  82. VOID FAR PASCAL _export SRCEntBNEnable(HWND, BOOL);
  83. int  FAR PASCAL _export SRCEntBNGetDelay(HWND);
  84. VOID FAR PASCAL _export SRCEntBNGetRange(HWND, LPINT, LPINT);
  85. int  FAR PASCAL _export SRCEntBNGetSpeed(HWND);
  86. int  FAR PASCAL _export SRCEntBNGetStep(HWND);
  87. int  FAR PASCAL _export SRCEntBNGetVal(HWND);
  88. VOID FAR PASCAL _export SRCEntBNInit(HWND, LPSTR, LPSTR, LPSTR, LPSTR,
  89.                                      int, int ,int, int, int, int, BOOL);
  90. int  FAR PASCAL _export SRCEntBNSetDelay(HWND, int);
  91. VOID FAR PASCAL _export SRCEntBNSetHand(HWND, BOOL);
  92. VOID FAR PASCAL _export SRCEntBNSetRange(HWND, int, int);
  93. int  FAR PASCAL _export SRCEntBNSetSpeed(HWND, int);
  94. int  FAR PASCAL _export SRCEntBNSetStep(HWND, int);
  95. int  FAR PASCAL _export SRCEntBNSetVal(HWND, int);
  96. VOID FAR PASCAL _export SRCEntBNSetWrap(HWND, BOOL);
  97. VOID FAR PASCAL _export SRCEntBNStop(HWND);
  98.  
  99. #ifdef __cplusplus
  100. }
  101. #endif  // __cplusplus
  102.  
  103. //***************************************************************************
  104. //***************************************************************************
  105. //***************************************************************************
  106. //
  107. //  SRCEntBN Class Definition
  108. //
  109. //***************************************************************************
  110. //***************************************************************************
  111. //***************************************************************************
  112. #ifdef __cplusplus
  113.  
  114. class FAR CSRCEntBN
  115. {
  116.  
  117.    //******************************************************************
  118.    //***********************  Member Data  ****************************
  119.    //******************************************************************
  120.  
  121.    private:
  122.  
  123.       HWND m_hButton;
  124.  
  125.    //******************************************************************
  126.    //***********************  Member Functions  ***********************
  127.    //******************************************************************
  128.  
  129.    public:
  130.  
  131.       // Constructor/Destructor
  132.       FAR PASCAL _export CSRCEntBN();
  133.       FAR PASCAL _export ~CSRCEntBN();
  134.  
  135.       // Creates a Button (DO NOT use STRICT Type Handles)
  136.       UINT FAR PASCAL _export Create(
  137.                   DWORD Style,
  138.                   LPSTR BM1,
  139.                   LPSTR BM2,
  140.                   LPSTR BM3,
  141.                   LPSTR BM4,
  142.                   int   X,
  143.                   int   Y,
  144.                   int   nWidth,
  145.                   int   nHeight,
  146.                   int   nstep,
  147.                   int   rmin,
  148.                   int   rmax,
  149.                   int   val,
  150.                   int   delay,
  151.                   int   speed,
  152.                   int   bHand,
  153.                   UINT  hParent,    //Cast this to UINT in application code
  154.                   UINT  IDVal,      //Cast this to UINT in application code
  155.                   UINT  hInst       //Cast this to UINT in application code
  156.                  );
  157.  
  158.       UINT FAR PASCAL _export GetHandle();
  159.       void FAR PASCAL _export Enable(BOOL bEnable);
  160.       int  FAR PASCAL _export GetDelay();
  161.       void FAR PASCAL _export GetRange(LPINT lpMin, LPINT lpMax);
  162.       int  FAR PASCAL _export GetSpeed();
  163.       int  FAR PASCAL _export GetStep();
  164.       int  FAR PASCAL _export GetVal();
  165.       int  FAR PASCAL _export SetDelay(int nDelay);
  166.       void FAR PASCAL _export SetHand(BOOL bHand);
  167.       void FAR PASCAL _export SetRange(int nMin, int nMax);
  168.       int  FAR PASCAL _export SetSpeed(int nSpeed);
  169.       int  FAR PASCAL _export SetStep(int nStep);
  170.       int  FAR PASCAL _export SetVal(int nVal);
  171.       void FAR PASCAL _export SetWrap(int nWrap);
  172.       void FAR PASCAL _export Stop();
  173.  
  174. }; // End CSRCEntBN Button Custom Control Class Definition
  175.  
  176. #endif // __cplusplus
  177. #endif // _INCL_SRCENTBN_H
  178.