能不能在VS FlexGrid中像邦定recordSet那样邦定一个数组,而且数据是由struct组成的。比如:
struct testStruct{
double a;
double b;
cstring c;
};
testStruct temp[10];
这样能不能把这个temp数组邦定到一个VS FlexGrid上?
谢谢!!

解决方案 »

  1.   

    自己单独写一个类,来保存这个结构!以下是伪代码:// 单行数据
    class CItemValue
    {
    public:
       char szName[100];
       char szSxe[100];
       char szSchool[100];public:
       void SetName();
       ...
    }class CItemList: public CTypedPtrArray< CObArray, CItemValue* >
    {
    public:
       int  Add( CItemValue* pItem );
       void InsertAt( int nIndex, CItemValue* pItem, int nCount = 1 );
       void RemoveAt( int nIndex);
       ...
    }
      

  2.   

    这代码是构造一个数组吧,我想VSFlexGrid绑定到数组,该怎么使用BindToArray呢?