用AU3做了个期货外挂,还差最后一步,资金权益监控。父窗口(图1)和子窗口(图2)的句柄均已获取,
#include <windows.h>
#include <iostream.h>  int main()
  {
      HWND LKhwnd=::FindWindow(NULL,"雷凯投资期货交易  - [IF1110]");//父窗口HWND ZJhwnd=::FindWindowEx(LKhwnd,NULL,"XTPDockingPaneTabbedContainer","资金");//子窗口cout<<LKhwnd <<endl<<ZJhwnd <<endl;  return 0;
  }现在想要读取子窗口“资金”里的数据,不知道怎么读。
用SPY查看得到的信息如图3、4,知道这是一个XTPRepor控件。
咨询一位,说是可以这么写
/*假设该控件名为m_wndReportCtrl,那么可以这么读取他的数据: 
int nRecords=m_wndReportCtrl.GetRecords()->GetCount();//总行数
int nCols=m_wndReportCtrl.GetColumns()->GetCount();//总列数
if (nRecords>0)
{
for (int i=0;i<nRecords;i++)
{
CXTPReportRecord* pRecord=m_wndReportCtrl.GetRecords()->GetAt(i);//第i行
if (pRecord)
{
for (int j=0;j<nCols;j++)
{
CXTPReportRecordItemText* pItem=pRecord->GetItem(j);//第i行的第j个单元格(此处假设所有单元格存储的都是CXTPReportRecordItemText类数据)
CString sText=pItem->GetValue();//获取该单元格数据
}
}
}
}*/
囫囵吞枣看了几本C++的书,只会勉强看懂别人的代码,不会自己编。
恳求各位DX帮忙,从控件XTPReport里读数据的完整程序怎么写?
然后再转换成DLL,再在AU3里调用,我自己慢慢弄。