g_pMainFormework-->GetDataInfo(&stDatas)此函数为什么会返回0;g_pMainFormework是全局的指针啊,
void CMainWindowDlg::OnButtonOrderin()
{
CString strText;
PCALCINFO stDatas={0};
int a=0;
strcpy(stDatas.m_szLabel,"if07");//品种代码
stDatas.m_wMarket='JZ';//市场代码
stDatas.m_dataType=MIN60_DATA;//周期
stDatas.m_nCustomCyc=0;//自定义周期参数
if(g_pMainFormework->GetDataInfo(&stDatas)){
float myclose=stDatas.m_pMainData[stDatas.m_nNumData-2].m_fClose;//收盘价
}
}
返回0表示调用失败,试试将IF07合约代码改成大写的看看