home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c016 / 3.ddi / MHINC.PAK / MHDC2001.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-15  |  9.3 KB  |  302 lines

  1. //--------------------------------------------------------
  2. // MHDC2001.H generated from MHDC200.VBX by
  3. // VbxGen 1.0 - Borland International
  4. //--------------------------------------------------------
  5.  
  6. #ifdef __OWL_OWLDEFS_H
  7.   #include <owl\vbxctl.h>
  8. #endif
  9.  
  10. //--------------------------------------------------------
  11. // MhDice (VB1)
  12. //--------------------------------------------------------
  13.  
  14. // properties
  15. #define Prop_MhDice_CtlName 0
  16. #define Prop_MhDice_Index 1
  17. #define Prop_MhDice_Parent 2
  18. #define Prop_MhDice_BackColor 3
  19. #define Prop_MhDice_Left 4
  20. #define Prop_MhDice_Top 5
  21. #define Prop_MhDice_Width 6
  22. #define Prop_MhDice_Height 7
  23. #define Prop_MhDice_Enabled 8
  24. #define Prop_MhDice_Visible 9
  25. #define Prop_MhDice_MousePointer 10
  26. #define Prop_MhDice_DragMode 11
  27. #define Prop_MhDice_DragIcon 12
  28. #define Prop_MhDice_TabIndex 13
  29. #define Prop_MhDice_TabStop 14
  30. #define Prop_MhDice_Tag 15
  31. #define Prop_MhDice_Value 16
  32. #define Prop_MhDice_Picture1 17
  33. #define Prop_MhDice_Picture2 18
  34. #define Prop_MhDice_Picture3 19
  35. #define Prop_MhDice_Picture4 20
  36. #define Prop_MhDice_Picture5 21
  37. #define Prop_MhDice_Picture6 22
  38. #define Prop_MhDice_AutoSize 23
  39. #define Prop_MhDice_TopSideColor 24
  40. #define Prop_MhDice_RightSideColor 25
  41. #define Prop_MhDice_LeftSideColor 26
  42. #define Prop_MhDice_FillColor 27
  43. #define Prop_MhDice_hWnd 28
  44.  
  45. // events
  46. #define Event_MhDice_Click 0
  47. #define Event_MhDice_DragDrop 1
  48. #define Event_MhDice_DragOver 2
  49. #define Event_MhDice_GotFocus 3
  50. #define Event_MhDice_KeyDown 4
  51. #define Event_MhDice_KeyPress 5
  52. #define Event_MhDice_KeyUp 6
  53. #define Event_MhDice_LostFocus 7
  54. #define Event_MhDice_MouseDown 8
  55. #define Event_MhDice_MouseMove 9
  56. #define Event_MhDice_MouseUp 10
  57.  
  58. // default form data
  59. //
  60. // Some VBX controls do not operate correctly when created without
  61. // a form file.  This occurs when a program creates a control
  62. // dynamically rather than as part of a dialog resource.  If this
  63. // control exhibits problems in this mode, try creating it with the
  64. // following form data:
  65. //
  66. // For OWL programs:
  67. //
  68. //   TVbxMhDice* c = new TVbxMhDice(..., sizeof(MhDiceData), MhDiceData);
  69. //
  70. // For C/C++ programs:
  71. //
  72. //   HFORMFILE file = VBXCreateFormFile(sizeof(MhDiceData), MhDiceData);
  73. //   HCTL c = VBXCreate(..., file);
  74. //   VBXDeleteFormFile(file);
  75. //
  76. // Note that the VBXGEN_DATA or MhDice_DATA symbol must be
  77. // defined in order to use the default form data.
  78. //
  79. extern BYTE MhDiceData[54L];
  80. #if defined(VBXGEN_DATA) || defined(MhDice_DATA)
  81.   BYTE MhDiceData[54L]={
  82.     0x01,0x00,0x00,0x03,0xff,0xff,0xff,0x00,
  83.     0x04,0x08,0xff,0xff,0x09,0xff,0xff,0x0a,
  84.     0x00,0x0b,0x00,0x0d,0x00,0x00,0x0e,0x00,
  85.     0x00,0x0f,0x00,0x10,0x01,0x00,0x17,0xff,
  86.     0xff,0x18,0xff,0xff,0xff,0x00,0x19,0xff,
  87.     0xff,0xff,0x00,0x1a,0xc0,0xc0,0xc0,0x00,
  88.     0x1b,0xff,0xff,0xff,0x00,0xff,
  89.   };
  90. #endif
  91.  
  92. #ifdef __OWL_VBXCTL_H
  93.  
  94. // OWL class
  95. class TVbxMhDice : public TVbxControl {
  96.   public:
  97.  
  98.     // constructors
  99.     TVbxMhDice(TWindow* parent, int id, LPCSTR title,
  100.         int x, int y, int w, int h,
  101.         long initLen=0, void far* initData=0, TModule* module=0) :
  102.       TVbxControl(parent, id, "MHDC200.VBX", "MhDice",
  103.           title, x, y, w, h, initLen, initData, module) {}
  104.  
  105.     TVbxMhDice(TWindow* parent, int resourceId, TModule* module=0) :
  106.         TVbxControl(parent, resourceId, module) {}
  107.  
  108. #if 0
  109.     // event handlers
  110.     void EvClick(VBXEVENT FAR*)
  111.     {
  112.       // no arguments
  113.     }
  114.  
  115.     void EvDragDrop(VBXEVENT FAR*)
  116.     {
  117.       // Source As Control,X As Integer,Y As Integer
  118.     }
  119.  
  120.     void EvDragOver(VBXEVENT FAR*)
  121.     {
  122.       // Source As Control,X As Integer,Y As Integer,State As Integer
  123.     }
  124.  
  125.     void EvGotFocus(VBXEVENT FAR*)
  126.     {
  127.       // no arguments
  128.     }
  129.  
  130.     void EvKeyDown(VBXEVENT FAR*)
  131.     {
  132.       // KeyCode As Integer,Shift As Integer
  133.     }
  134.  
  135.     void EvKeyPress(VBXEVENT FAR*)
  136.     {
  137.       // KeyAscii As Integer
  138.     }
  139.  
  140.     void EvKeyUp(VBXEVENT FAR*)
  141.     {
  142.       // KeyCode As Integer,Shift As Integer
  143.     }
  144.  
  145.     void EvLostFocus(VBXEVENT FAR*)
  146.     {
  147.       // no arguments
  148.     }
  149.  
  150.     void EvMouseDown(VBXEVENT FAR*)
  151.     {
  152.       // Button As Integer,Shift As Integer,X As Integer,Y As Integer
  153.     }
  154.  
  155.     void EvMouseMove(VBXEVENT FAR*)
  156.     {
  157.       // Button As Integer,Shift As Integer,X As Integer,Y As Integer
  158.     }
  159.  
  160.     void EvMouseUp(VBXEVENT FAR*)
  161.     {
  162.       // Button As Integer,Shift As Integer,X As Integer,Y As Integer
  163.     }
  164.  
  165. #endif
  166.  
  167.     // enumerations
  168.     enum { // values for property MousePointer
  169.       MousePointer_0_Default,
  170.       MousePointer_1_Arrow,
  171.       MousePointer_2_Cross,
  172.       MousePointer_3_IBeam,
  173.       MousePointer_4_Icon,
  174.       MousePointer_5_Size,
  175.       MousePointer_6_Size_NE_SW,
  176.       MousePointer_7_Size_NS,
  177.       MousePointer_8_Size_NW_SE,
  178.       MousePointer_9_Size_WE,
  179.       MousePointer_10_Up_Arrow,
  180.       MousePointer_11_Hourglass,
  181.       MousePointer_12_No_Drop,
  182.     };
  183.  
  184.     enum { // values for property DragMode
  185.       DragMode_0_Manual,
  186.       DragMode_1_Automatic,
  187.     };
  188.  
  189.  
  190.     // properties
  191.     BOOL GetPropCtlName(string& v) {return GetProp(0,v);}
  192.     BOOL SetPropCtlName(string& v) {return SetProp(0,v);}
  193.  
  194.     BOOL GetPropIndex(int& v) {return GetProp(1,v);}
  195.     BOOL SetPropIndex(int v) {return SetProp(1,v);}
  196.  
  197.     BOOL GetPropParent(int& v) {return GetProp(2,v);}
  198.     BOOL SetPropParent(int v) {return SetProp(2,v);}
  199.  
  200.     BOOL GetPropBackColor(COLORREF& v) {return GetProp(3,v);}
  201.     BOOL SetPropBackColor(COLORREF v) {return SetProp(3,v);}
  202.  
  203.     BOOL GetPropLeft(long& v) {return GetProp(4,v);}
  204.     BOOL SetPropLeft(long v) {return SetProp(4,v);}
  205.  
  206.     BOOL GetPropTop(long& v) {return GetProp(5,v);}
  207.     BOOL SetPropTop(long v) {return SetProp(5,v);}
  208.  
  209.     BOOL GetPropWidth(long& v) {return GetProp(6,v);}
  210.     BOOL SetPropWidth(long v) {return SetProp(6,v);}
  211.  
  212.     BOOL GetPropHeight(long& v) {return GetProp(7,v);}
  213.     BOOL SetPropHeight(long v) {return SetProp(7,v);}
  214.  
  215.     BOOL GetPropEnabled(BOOL& v) {return GetProp(8,v);}
  216.     BOOL SetPropEnabled(BOOL v) {return SetProp(8,v);}
  217.  
  218.     BOOL GetPropVisible(BOOL& v) {return GetProp(9,v);}
  219.     BOOL SetPropVisible(BOOL v) {return SetProp(9,v);}
  220.  
  221.     BOOL GetPropMousePointer(ENUM& v) {return GetProp(10,v);}
  222.     BOOL SetPropMousePointer(ENUM v) {return SetProp(10,v);}
  223.  
  224.     BOOL GetPropDragMode(ENUM& v) {return GetProp(11,v);}
  225.     BOOL SetPropDragMode(ENUM v) {return SetProp(11,v);}
  226.  
  227.     BOOL GetPropDragIcon(HPIC& v) {return GetProp(12,v);}
  228.     BOOL SetPropDragIcon(HPIC v) {return SetProp(12,v);}
  229.  
  230.     BOOL GetPropTabIndex(int& v) {return GetProp(13,v);}
  231.     BOOL SetPropTabIndex(int v) {return SetProp(13,v);}
  232.  
  233.     BOOL GetPropTabStop(BOOL& v) {return GetProp(14,v);}
  234.     BOOL SetPropTabStop(BOOL v) {return SetProp(14,v);}
  235.  
  236.     BOOL GetPropTag(string& v) {return GetProp(15,v);}
  237.     BOOL SetPropTag(string& v) {return SetProp(15,v);}
  238.  
  239.     BOOL GetPropValue(int& v) {return GetProp(16,v);}
  240.     BOOL SetPropValue(int v) {return SetProp(16,v);}
  241.  
  242.     BOOL GetPropPicture1(HPIC& v) {return GetProp(17,v);}
  243.     BOOL SetPropPicture1(HPIC v) {return SetProp(17,v);}
  244.  
  245.     BOOL GetPropPicture2(HPIC& v) {return GetProp(18,v);}
  246.     BOOL SetPropPicture2(HPIC v) {return SetProp(18,v);}
  247.  
  248.     BOOL GetPropPicture3(HPIC& v) {return GetProp(19,v);}
  249.     BOOL SetPropPicture3(HPIC v) {return SetProp(19,v);}
  250.  
  251.     BOOL GetPropPicture4(HPIC& v) {return GetProp(20,v);}
  252.     BOOL SetPropPicture4(HPIC v) {return SetProp(20,v);}
  253.  
  254.     BOOL GetPropPicture5(HPIC& v) {return GetProp(21,v);}
  255.     BOOL SetPropPicture5(HPIC v) {return SetProp(21,v);}
  256.  
  257.     BOOL GetPropPicture6(HPIC& v) {return GetProp(22,v);}
  258.     BOOL SetPropPicture6(HPIC v) {return SetProp(22,v);}
  259.  
  260.     BOOL GetPropAutoSize(BOOL& v) {return GetProp(23,v);}
  261.     BOOL SetPropAutoSize(BOOL v) {return SetProp(23,v);}
  262.  
  263.     BOOL GetPropTopSideColor(COLORREF& v) {return GetProp(24,v);}
  264.     BOOL SetPropTopSideColor(COLORREF v) {return SetProp(24,v);}
  265.  
  266.     BOOL GetPropRightSideColor(COLORREF& v) {return GetProp(25,v);}
  267.     BOOL SetPropRightSideColor(COLORREF v) {return SetProp(25,v);}
  268.  
  269.     BOOL GetPropLeftSideColor(COLORREF& v) {return GetProp(26,v);}
  270.     BOOL SetPropLeftSideColor(COLORREF v) {return SetProp(26,v);}
  271.  
  272.     BOOL GetPropFillColor(COLORREF& v) {return GetProp(27,v);}
  273.     BOOL SetPropFillColor(COLORREF v) {return SetProp(27,v);}
  274.  
  275.     BOOL GetProphWnd(int& v) {return GetProp(28,v);}
  276.     BOOL SetProphWnd(int v) {return SetProp(28,v);}
  277.  
  278. #if 0
  279.   DECLARE_RESPONSE_TABLE(TVbxMhDice);
  280. #endif
  281. };
  282.  
  283. #if 0
  284. // OWL response table
  285. DEFINE_RESPONSE_TABLE1(TVbxMhDice, TVbxControl)
  286.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_Click, EvClick ),
  287.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_DragDrop, EvDragDrop ),
  288.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_DragOver, EvDragOver ),
  289.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_GotFocus, EvGotFocus ),
  290.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_KeyDown, EvKeyDown ),
  291.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_KeyPress, EvKeyPress ),
  292.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_KeyUp, EvKeyUp ),
  293.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_LostFocus, EvLostFocus ),
  294.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_MouseDown, EvMouseDown ),
  295.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_MouseMove, EvMouseMove ),
  296.   EV_VBXEVENTINDEX( IDC_MhDice, Event_MhDice_MouseUp, EvMouseUp ),
  297. END_RESPONSE_TABLE;
  298. #endif
  299.  
  300. #endif
  301.  
  302.