home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c016 / 3.ddi / SSINC.PAK / SSBC.H next >
Encoding:
C/C++ Source or Header  |  1993-12-08  |  21.7 KB  |  667 lines

  1. //if Borland compiler
  2.  
  3. #ifndef _SPREAD_H
  4. #define _SPREAD_H
  5.  
  6. #ifdef _MSC_VER
  7. #include "stdafx.h"
  8. #endif
  9.  
  10. #include <owl\vbxctl.h>
  11. #include <string.h>
  12.  
  13. //MACROS FOR EXTRACTING PARAMETERS OUT OF THE DATA ARRAY FOR VBX EVENTS
  14. #ifndef AFX_NUM_EVENTPARAM
  15.     #define AFX_NUM_EVENTPARAM(type, lpParams) (type FAR&)(**(type FAR* FAR*)lpParams)
  16.     #define AFX_HLSTR_EVENTPARAM(lpParams) (HLSTR FAR&)(*(HLSTR FAR*)lpParams)
  17.     #define AFX_NUM_EVENTPARAMINDEX(type, lpParams, index) (short FAR&)(**((type FAR* FAR*)(lpParams) + index))
  18.     #define AFX_HLSTR_EVENTPARAMINDEX(lpParams, index) (HLSTR FAR&)(*((HLSTR FAR*)(lpParams) + index))
  19. #endif
  20.  
  21. #define VBAPI FAR PASCAL
  22. typedef   signed short  SHORT;          // s
  23. typedef unsigned short  USHORT;         // u
  24. typedef unsigned int    FSHORT;         // fs
  25. typedef   signed char   CHAR;           // ch
  26. typedef unsigned char   ENUM;           // enum
  27. typedef unsigned long   ULONG;          // ul
  28. typedef unsigned long   FLONG;          // fl
  29. typedef SHORT      FAR *LPSHORT;        // lps
  30. typedef USHORT     FAR *LPUSHORT;       // lpu
  31. typedef USHORT          IPROP;          // iprop
  32. typedef HANDLE          HFORMFILE;      // hformfile
  33. typedef USHORT          ERR;            // err
  34. typedef HPIC       FAR *LPHPIC;         // lphpic
  35. typedef LPVOID          HLSTR;          // hlstr
  36. typedef HLSTR      FAR *LPHLSTR;        // lphlstr
  37. typedef LPVOID          HAD;            // hAD - handle to Basic array desc.
  38. typedef LPVOID          HCTL;           // hctl
  39.  
  40.  
  41. extern "C"
  42. {
  43. extern void FAR PASCAL SpreadSaveDesignInfo(int,int,BOOL);
  44. LPSTR   VBAPI VBDerefHlstrLen(HLSTR hlstr, LPUSHORT lpcbLen);
  45. };
  46.  
  47. //if Borland compiler
  48. #ifndef _MSC_VER
  49.  
  50. #define NO_INDEX -1
  51. #define CString char*
  52.  
  53. class CVBControl: public TVbxControl
  54. {
  55.     public:
  56.  
  57.     long GetNumProperty(int propIndex, int index=NO_INDEX)
  58.     {
  59.     int ret;
  60.     long value;
  61.  
  62.             ret = GetProp(propIndex, value);
  63.             return value;
  64.     }
  65.  
  66.     float GetFloatProperty(int propIndex, int index=NO_INDEX)
  67.     {
  68.     int ret;
  69.     float value;
  70.  
  71.             ret = GetProp(propIndex, value);
  72.             return value;
  73.     }
  74.  
  75.     char *GetStrProperty(int propIndex, int index=NO_INDEX)
  76.     {
  77.     int ret;
  78.     char *value;
  79.  
  80.             ret = GetProp(propIndex, value);
  81.             return value;
  82.     }
  83.  
  84.     HPIC GetPictureProperty(int propIndex, int index=NO_INDEX)
  85.     {
  86.     int ret;
  87.     HPIC value;
  88.  
  89.             ret = GetProp(propIndex, value);
  90.             return value;
  91.     }
  92.  
  93.     BOOL SetNumProperty(int propIndex, int value, int index=NO_INDEX)
  94.     {
  95.         return SetProp(propIndex, value, -1);
  96.     }
  97.  
  98.     BOOL SetNumProperty(int propIndex, long value, int index=NO_INDEX)
  99.     {
  100.         return SetProp(propIndex, value, -1);
  101.     }
  102.  
  103.     BOOL SetFloatProperty(int propIndex, float value, int index=NO_INDEX)
  104.     {
  105.         return SetProp(propIndex, value, -1);
  106.     }
  107.  
  108.     BOOL SetStrProperty(int propIndex, const char *value, int index=NO_INDEX)
  109.     {
  110.         return SetProp(propIndex, value, -1);
  111.     }
  112.  
  113.     BOOL SetPictureProperty(int propIndex, HPIC value, int index=NO_INDEX)
  114.     {
  115.         return SetProp(propIndex, value, -1);
  116.     }
  117. };
  118. //if Microsoft compiler
  119. #else
  120. #define NO_INDEX 0
  121. #endif
  122.  
  123. class BaseSpreadSheet
  124. {
  125. public:
  126. CVBControl *m_pVBControl;
  127. int Index;
  128. int m_nID;
  129.  
  130.     BaseSpreadSheet(CVBControl *pVBControl, int nID, int I=NO_INDEX)
  131.     {
  132.         m_pVBControl = pVBControl;
  133.         m_nID = nID;
  134.         Index = I;
  135.     };
  136. };
  137.  
  138. class CHszProperty : public BaseSpreadSheet
  139. {
  140.     public://methods
  141.     CHszProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index) {};
  142.  
  143.     void operator =(LPCSTR lpszValue)
  144.     {
  145.         m_pVBControl->SetStrProperty(m_nID, lpszValue, Index);
  146.     };
  147.  
  148.     operator CString()
  149.     {
  150.         return m_pVBControl->GetStrProperty(m_nID, Index);
  151.     };
  152. };
  153.  
  154. class CShortProperty : public BaseSpreadSheet
  155. {
  156. public:
  157.     CShortProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index) {};
  158.  
  159.     short operator=(short nValue)
  160.     {
  161.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  162.         return nValue;
  163.     };
  164.     short operator += (short nValue)
  165.     {
  166.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) + nValue;
  167.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  168.         return nValue;
  169.     };
  170.     short operator -= (short nValue)
  171.     {
  172.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) - nValue;
  173.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  174.         return nValue;
  175.     };
  176.     short operator *= (short nValue)
  177.     {
  178.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) * nValue;
  179.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  180.         return nValue;
  181.     };
  182.     short operator /= (short nValue)
  183.     {
  184.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) / nValue;
  185.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  186.         return nValue;
  187.     };
  188.     short operator %= (short nValue)
  189.     {
  190.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) % nValue;
  191.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  192.         return nValue;
  193.     };
  194.     short operator ^= (short nValue)
  195.     {                                       
  196.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) ^ nValue;
  197.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  198.         return nValue;
  199.     };
  200.     short operator &= (short nValue)
  201.     {                                       
  202.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) & nValue;
  203.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  204.         return nValue;
  205.     };
  206.     short operator |= (short nValue)
  207.     {                                             
  208.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) | nValue;
  209.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  210.         return nValue;
  211.     };
  212.     short operator <<= (short nValue)
  213.     {                                       
  214.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) << nValue;
  215.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  216.         return nValue;
  217.     };
  218.     short operator >>= (short nValue)
  219.     {                                       
  220.         nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) >> nValue;
  221.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  222.         return nValue;
  223.     };
  224.     short operator ++ (int)
  225.     {
  226.         short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) + 1;
  227.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  228.         return nValue;
  229.     };
  230.     short operator -- (int)
  231.     {
  232.         short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) - 1;
  233.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  234.         return nValue;
  235.     };
  236.     short operator ++ ()
  237.     {
  238.         short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) + 1;
  239.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  240.         return nValue;
  241.     };
  242.     short operator -- ()
  243.     {
  244.         short nValue = (short)m_pVBControl->GetNumProperty(m_nID, Index) - 1;
  245.         m_pVBControl->SetNumProperty(m_nID, nValue, Index);
  246.         return nValue;
  247.     };
  248.     operator short()
  249.     {
  250.         return (short)m_pVBControl->GetNumProperty(m_nID, Index);
  251.     };
  252. };
  253.  
  254. class CLongProperty : public BaseSpreadSheet
  255. {
  256. public:
  257.     CLongProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index){};
  258.  
  259.     long operator = (LONG lValue)
  260.     {
  261.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  262.         return lValue;
  263.     };
  264.     long operator += (LONG lValue)
  265.     {                                                    
  266.         lValue = m_pVBControl->GetNumProperty(m_nID) + lValue;
  267.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  268.         return lValue;
  269.     };
  270.     long operator -= (LONG lValue)
  271.     {                                                    
  272.         lValue = m_pVBControl->GetNumProperty(m_nID) - lValue;
  273.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  274.         return lValue;
  275.     };
  276.     long operator *= (LONG lValue)
  277.     {                                       
  278.         lValue = m_pVBControl->GetNumProperty(m_nID) * lValue;
  279.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  280.         return lValue;
  281.     };                  
  282.     long operator /= (LONG lValue)
  283.     {                                       
  284.         lValue =m_pVBControl->GetNumProperty(m_nID) / lValue;
  285.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  286.         return lValue;
  287.     };
  288.     long operator %= (LONG lValue)
  289.     {                                                    
  290.         lValue = m_pVBControl->GetNumProperty(m_nID) % lValue;
  291.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  292.         return lValue;
  293.     };
  294.     long operator ^= (LONG lValue)
  295.     {                                                    
  296.         lValue = m_pVBControl->GetNumProperty(m_nID) ^ lValue;
  297.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  298.         return lValue;
  299.     };
  300.     long operator &= (LONG lValue)
  301.     {                                       
  302.         lValue = m_pVBControl->GetNumProperty(m_nID) & lValue;
  303.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  304.         return lValue;
  305.     };
  306.     long operator |= (LONG lValue)
  307.     {   
  308.         lValue = m_pVBControl->GetNumProperty(m_nID) | lValue;
  309.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  310.         return lValue;
  311.     };
  312.     long operator <<= (LONG lValue)
  313.     {                                                    
  314.         lValue = m_pVBControl->GetNumProperty(m_nID) << lValue;
  315.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  316.         return lValue;
  317.     };
  318.     long operator >>= (LONG lValue)
  319.     {                                       
  320.         lValue = m_pVBControl->GetNumProperty(m_nID) >> lValue;
  321.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  322.         return lValue;
  323.     };
  324.     LONG operator ++ (int)
  325.     {
  326.         LONG lValue = m_pVBControl->GetNumProperty(m_nID) + 1;
  327.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  328.         return lValue;
  329.     };
  330.     LONG operator -- (int)
  331.     {
  332.         LONG lValue = m_pVBControl->GetNumProperty(m_nID) + 1;
  333.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  334.         return lValue;
  335.     };
  336.     LONG operator ++ ()
  337.     {
  338.         LONG lValue = m_pVBControl->GetNumProperty(m_nID) + 1;
  339.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  340.         return lValue;
  341.     };
  342.     LONG operator -- ()
  343.     {
  344.         LONG lValue = m_pVBControl->GetNumProperty(m_nID) - 1;
  345.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  346.         return lValue;
  347.     };
  348.     operator LONG()
  349.     {
  350.         MessageBox(NULL,"LONG","Index",MB_OK);
  351.         return m_pVBControl->GetNumProperty(m_nID, Index);
  352.     };
  353. };
  354.  
  355. class CBoolProperty : public CShortProperty
  356. {
  357. public:
  358.     CBoolProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CShortProperty(pVBControl, nID, Index){};
  359.     void operator = (int nValue)
  360.     {
  361.         m_pVBControl->SetNumProperty(m_nID, nValue);
  362.     };
  363. };
  364.  
  365. class CColorProperty : public CLongProperty
  366. {
  367.     public:
  368.     CColorProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
  369.     void operator=(LONG lValue)
  370.     {
  371.         m_pVBControl->SetNumProperty(m_nID, lValue);
  372.     };
  373. };
  374.  
  375. class CEnumProperty : public CShortProperty
  376. {
  377. public:
  378.     CEnumProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CShortProperty(pVBControl, nID, Index){};
  379.     void operator = (int nValue)
  380.     {
  381.         m_pVBControl->SetNumProperty(m_nID, nValue);
  382.     };
  383. };
  384.  
  385. class CRealProperty : public BaseSpreadSheet
  386. {
  387. public:
  388.     CRealProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index){};
  389.     float operator=(float flValue)
  390.     {
  391.         m_pVBControl->SetFloatProperty(m_nID, flValue, Index);
  392.         return flValue;
  393.     };
  394.     operator float()
  395.     {
  396.         return m_pVBControl->GetFloatProperty(m_nID, Index);
  397.     };
  398. };
  399.  
  400. class CPictureProperty : public BaseSpreadSheet
  401. {
  402. public:
  403.     CPictureProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):BaseSpreadSheet(pVBControl, nID, Index){};
  404.     void operator = (HPIC hPic)
  405.     {
  406.         m_pVBControl->SetPictureProperty(m_nID, hPic, Index);
  407.     };
  408.     operator HPIC()
  409.     {
  410.         return m_pVBControl->GetPictureProperty(m_nID, Index);
  411.     };
  412. };
  413.  
  414. class CXPosProperty : public CLongProperty
  415. {
  416. public:
  417.     CXPosProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
  418.     void operator = (LONG lValue)
  419.     {
  420.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  421.     };
  422. };
  423.  
  424. class CXSizeProperty : public CLongProperty
  425. {
  426. public:
  427.     CXSizeProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
  428.     void operator = (LONG lValue)
  429.     {
  430.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  431.     };
  432. };
  433.  
  434. class CYPosProperty : public CLongProperty
  435. {
  436. public:
  437.     CYPosProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
  438.     void operator = (LONG lValue)
  439.     {
  440.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  441.     };
  442. };
  443.  
  444. class CYSizeProperty : public CLongProperty
  445. {
  446. public:
  447.     CYSizeProperty(CVBControl *pVBControl, int nID, int Index=NO_INDEX):CLongProperty(pVBControl, nID, Index){};
  448.     void operator = (LONG lValue)
  449.     {
  450.         m_pVBControl->SetNumProperty(m_nID, lValue, Index);
  451.     };
  452. };
  453.  
  454. class CSpreadSheet
  455. {
  456. public:
  457. CVBControl *Ctrl;
  458.  int DesignWindow;
  459.  
  460.     CSpreadSheet(CVBControl *c)
  461.     {
  462.         Ctrl = c;
  463.         DesignWindow = NULL;
  464.     };
  465.  
  466.     CSpreadSheet()
  467.     {
  468.         Ctrl = NULL;
  469.         DesignWindow = NULL;
  470.     };
  471.  
  472.     #ifndef _MSC_VER
  473.         void ProcessEvent(const VBXEVENT *ptrEvent);
  474.         void Set(TVbxControl *c){Ctrl = (CVBControl*)c;};
  475.     #else
  476.         void ProcessEvent(int , const CVBControl *, LPVOID);
  477.         void Set(CVBControl *c){Ctrl = c;};
  478.     #endif
  479.  
  480.     void CallEvent(int, LPVOID);
  481.  
  482.     //Borland's coustom control events
  483.     //FarPoint's products:Grid/VBX, Spread/VBX, Spread/VBX++ and Aware/VBX
  484.     //have much more functionality
  485.     //Call FarPoint TODAY for details for a low cost upgrade!!!
  486.     virtual void Advance(int AdvanceNext){};
  487.     virtual void BlockSelected(long BlockCol, long BlockRow, long BlockCol2, long BlockRow2){};
  488.     virtual void Change(long Col, long Row){};
  489.     virtual void Click(long Col, long Row){};
  490.     virtual void DblClick(long Col, long Row){};
  491.     virtual void EditError(long Col, long Row, int EditError){};
  492.     virtual void EditMode(long Col, long Row, int Mode, int ChangeMade){};
  493.     virtual void LeaveCell(long Col, long Row, long NewCol, long NewRow, int *Cancel){};
  494.     virtual void QueryAdvance(int AdvanceNext, int Cancel){};
  495.     virtual void RightClick(int ClickType, long Col, long Row, long MouseX, long MouseY){};
  496.     virtual void SelChange(long BlockCol, long BlockRow, long BlockCol2, long BlockRow2, long CurCol, long CurRow){};
  497.                                       
  498.     //Default Visual Basic events                                      
  499.     virtual void DragDrop(long Source, float X, float Y){};
  500.     virtual void DragOver (long Source, float X, float Y, int State){};
  501.     virtual void GotFocus(){};
  502.     virtual void KeyDown(int KeyCode, int Shift){};
  503.     virtual void KeyPress(int *KeyAscii){};
  504.     virtual void KeyUp(int KeyCode, int Shift){};
  505.     virtual void LostFocus(){};
  506.     virtual void MouseDown(int Button, int Shift, float X, float Y){};
  507.     virtual void MouseMove(int Button, int Shift, float X, float Y){};
  508.     virtual void MouseUp(int Button, int Shift, float X, float Y){};
  509.  
  510.     //Borland's control properties
  511.     CEnumProperty Action() { return CEnumProperty(Ctrl, 21); }
  512.     CLongProperty ActiveCol() { return CLongProperty(Ctrl, 22); }
  513.     CLongProperty ActiveRow() { return CLongProperty(Ctrl, 23); }
  514.     CBoolProperty AllowUserFormulas() { return CBoolProperty(Ctrl, 150); }
  515.     CBoolProperty ArrowsExitEditMode() { return CBoolProperty(Ctrl, 143); }
  516.     CBoolProperty AutoCalc() { return CBoolProperty(Ctrl, 26); }
  517.     CColorProperty BackColor() { return CColorProperty(Ctrl, 27); }
  518.     CBoolProperty CalcDependencies() { return CBoolProperty(Ctrl, 28); }
  519.     CEnumProperty CellType() { return CEnumProperty(Ctrl, 29); }
  520.     CHszProperty Clip() { return CHszProperty(Ctrl, 30); }
  521.     CLongProperty Col() { return CLongProperty(Ctrl, 31); }
  522.     CLongProperty Col2() { return CLongProperty(Ctrl, 32); }
  523.     CRealProperty ColWidth(long Index) { return CRealProperty(Ctrl, 33,Index); }
  524.     CLongProperty DataColCnt() { return CLongProperty(Ctrl, 165); }
  525.     CLongProperty DataRowCnt() { return CLongProperty(Ctrl, 166); }
  526.     CBoolProperty DisplayColHeaders() { return CBoolProperty(Ctrl, 34); }
  527.     CBoolProperty DisplayRowHeaders() { return CBoolProperty(Ctrl, 35); }
  528.     CBoolProperty EditMode() { return CBoolProperty(Ctrl, 36); }
  529.     CBoolProperty EditModePermanent() { return CBoolProperty(Ctrl, 97); }
  530.     CBoolProperty EditModeReplace() { return CBoolProperty(Ctrl, 156); }
  531.     CColorProperty ForeColor() { return CColorProperty(Ctrl, 38); }
  532.     CHszProperty Formula() { return CHszProperty(Ctrl, 39); }
  533.     CColorProperty GrayAreaBackColor() { return CColorProperty(Ctrl, 141); }
  534.     CColorProperty GridColor() { return CColorProperty(Ctrl, 171); }
  535.     CBoolProperty GridShowHoriz() { return CBoolProperty(Ctrl, 186); }
  536.     CBoolProperty GridShowVert() { return CBoolProperty(Ctrl, 187); }
  537.     CBoolProperty GridSolid() { return CBoolProperty(Ctrl, 172); }
  538.     CShortProperty hWnd() { return CShortProperty(Ctrl, 159); }
  539.     CBoolProperty IsBlockSelected() { return CBoolProperty(Ctrl, 93); }
  540.     CLongProperty LeftCol() { return CLongProperty(Ctrl, 41); }
  541.     CBoolProperty Lock() { return CBoolProperty(Ctrl, 42); }
  542.     CLongProperty MaxCols() { return CLongProperty(Ctrl, 43); }
  543.     CLongProperty MaxRows() { return CLongProperty(Ctrl, 44); }
  544.     CBoolProperty MoveActiveOnFocus() { return CBoolProperty(Ctrl, 144); }
  545.     CBoolProperty ProcessTab() { return CBoolProperty(Ctrl, 114); }
  546.     CBoolProperty Protect() { return CBoolProperty(Ctrl, 46); }
  547.     CBoolProperty ReDraw() { return CBoolProperty(Ctrl, 47); }
  548.     CBoolProperty RetainSelBlock() { return CBoolProperty(Ctrl, 149); }
  549.     CLongProperty Row() { return CLongProperty(Ctrl, 50); }
  550.     CLongProperty Row2() { return CLongProperty(Ctrl, 51); }
  551.     CRealProperty RowHeight(long index) { return CRealProperty(Ctrl, 52, index); }
  552.     CEnumProperty ScrollBars() { return CEnumProperty(Ctrl, 92); }
  553.     CLongProperty SelBlockCol() { return CLongProperty(Ctrl, 53); }
  554.     CLongProperty SelBlockCol2() { return CLongProperty(Ctrl, 54); }
  555.     CLongProperty SelBlockRow() { return CLongProperty(Ctrl, 55); }
  556.     CLongProperty SelBlockRow2() { return CLongProperty(Ctrl, 56); }
  557.     CShortProperty SelectBlockOptions() { return CShortProperty(Ctrl, 176); }
  558.     CColorProperty ShadowColor() { return CColorProperty(Ctrl, 60); }
  559.     CColorProperty ShadowDark() { return CColorProperty(Ctrl, 61); }
  560.     CColorProperty ShadowText() { return CColorProperty(Ctrl, 62); }
  561.     CHszProperty Text() { return CHszProperty(Ctrl, 63); }
  562.     CLongProperty TopRow() { return CLongProperty(Ctrl, 64); }
  563.     CShortProperty TypeEditLen() { return CShortProperty(Ctrl, 73); }
  564.     CShortProperty TypeFloatDecimalPlaces() { return CShortProperty(Ctrl, 74); }
  565.     CBoolProperty TypeFloatMoney() { return CBoolProperty(Ctrl, 77); }
  566.     CBoolProperty TypeFloatSeparator() { return CBoolProperty(Ctrl, 78); }
  567.     CShortProperty TypeFloatSepChar() { return CShortProperty(Ctrl, 203); }
  568.     CEnumProperty TypeHAlign() { return CEnumProperty(Ctrl, 233); }
  569.     CBoolProperty TypePictCenter() { return CBoolProperty(Ctrl, 146); }
  570.     CBoolProperty TypePictMaintainScale() { return CBoolProperty(Ctrl, 148); }
  571.     CPictureProperty TypePictPicture() { return CPictureProperty(Ctrl, 145); }
  572.     CBoolProperty TypePictStretch() { return CBoolProperty(Ctrl, 147); }
  573.     CBoolProperty TypeTextShadow() { return CBoolProperty(Ctrl, 84); }
  574.     CBoolProperty TypeTextWordWrap() { return CBoolProperty(Ctrl, 85); }
  575.     CShortProperty UserResize() { return CShortProperty(Ctrl, 174); }
  576.     CHszProperty Value() { return CHszProperty(Ctrl, 95); }
  577.  
  578.     //Native control properties
  579.     CEnumProperty BorderStyle() { return CEnumProperty(Ctrl, 0); }
  580.     CHszProperty CtlName() { return CHszProperty(Ctrl, 1); }
  581.     CShortProperty DragIcon() { return CShortProperty(Ctrl, 2); }
  582.     CEnumProperty DragMode() { return CEnumProperty(Ctrl, 3); }
  583.     CBoolProperty Enabled() { return CBoolProperty(Ctrl, 4); }
  584.     CBoolProperty FontBold() { return CBoolProperty(Ctrl, 5); }
  585.     CBoolProperty FontItalic() { return CBoolProperty(Ctrl, 6); }
  586.     CHszProperty FontName() { return CHszProperty(Ctrl, 7); }
  587.     CRealProperty FontSize() { return CRealProperty(Ctrl, 8); }
  588.     CBoolProperty FontStrikethru() { return CBoolProperty(Ctrl, 9); }
  589.     CBoolProperty FontUnderline() { return CBoolProperty(Ctrl, 10); }
  590.     CYSizeProperty Height() { return CYSizeProperty(Ctrl, 11); }
  591.     CXPosProperty Left() { return CXPosProperty(Ctrl, 13); }
  592.     CShortProperty TabIndex() { return CShortProperty(Ctrl, 15); }
  593.     CBoolProperty TabStop() { return CBoolProperty(Ctrl, 16); }
  594.     CHszProperty Tag() { return CHszProperty(Ctrl, 17); }
  595.     CYPosProperty Top() { return CYPosProperty(Ctrl, 18); }
  596.     CBoolProperty Visible() { return CBoolProperty(Ctrl, 19); }
  597.     CXSizeProperty Width() { return CXSizeProperty(Ctrl, 20); }
  598.  
  599.     };
  600.  
  601. //spreadsheet actions
  602. #define SS_ACTION_ACTIVE_CELL   0
  603. #define SS_ACTION_GOTO_CELL   1
  604. #define SS_ACTION_SELECT_BLOCK   2
  605. #define SS_ACTION_CLEAR   3
  606. #define SS_ACTION_DELETE_COL   4
  607. #define SS_ACTION_DELETE_ROW   5
  608. #define SS_ACTION_INSERT_COL   6
  609. #define SS_ACTION_INSERT_ROW   7
  610. #define SS_ACTION_RECALC   11
  611. #define SS_ACTION_CLEAR_TEXT   12
  612. #define SS_ACTION_DESELECT_BLOCK   14
  613. #define SS_ACTION_RESET   28
  614.  
  615. //SelectBlockOptions
  616. #define SS_SELBLOCKOPT_COLS   1
  617. #define SS_SELBLOCKOPT_ROWS   2
  618. #define SS_SELBLOCKOPT_BLOCKS   4
  619. #define SS_SELBLOCKOPT_ALL   8
  620.  
  621. //cell type
  622. #define SS_CELL_TYPE_EDIT   1
  623. #define SS_CELL_TYPE_FLOAT   2
  624. #define SS_CELL_TYPE_STATIC_TEXT   5
  625. #define SS_CELL_TYPE_PICTURE   9
  626.  
  627. //user resize row and columns
  628. #define SS_USER_RESIZE_COL   1
  629. #define SS_USER_RESIZE_ROW   2
  630.  
  631. //scroll bar
  632. #define SS_SCROLLBAR_NONE   0
  633. #define SS_SCROLLBAR_H_ONLY   1
  634. #define SS_SCROLLBAR_V_ONLY   2
  635. #define SS_SCROLLBAR_BOTH   3
  636.  
  637. //horizontal align
  638. #define SS_CELL_H_ALIGN_LEFT   0
  639. #define SS_CELL_H_ALIGN_RIGHT   1
  640. #define SS_CELL_H_ALIGN_CENTER   2
  641.  
  642. //event id numbers
  643. #define Event_Advance 0
  644. #define Event_BlockSelected 1
  645. #define Event_Change 2
  646. #define Event_Click 3
  647. #define Event_DblClick 4
  648. #define Event_DragDrop 5
  649. #define Event_DragOver 6
  650. #define Event_EditError 7
  651. #define Event_EditMode 8
  652. #define Event_GotFocus 9
  653. #define Event_KeyDown 10
  654. #define Event_KeyPress 11
  655. #define Event_KeyUp 12
  656. #define Event_LeaveCell 13
  657. #define Event_LostFocus 14
  658. #define Event_MouseDown 15
  659. #define Event_MouseMove 16
  660. #define Event_MouseUp 17
  661.  
  662. //#define Event_QueryAdvance 18
  663. #define Event_RightClick 18
  664. #define Event_SelChange 19
  665.  
  666. #endif
  667.