以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  高级功能研发区  (http://www.weistock.com/bbs/list.asp?boardid=5)
----  AddinDemo 为什么不能同时注册两个行情数据  (http://www.weistock.com/bbs/dispbbs.asp?boardid=5&id=90978)

--  作者:hhxu
--  发布时间:2016/2/5 11:48:12
--  AddinDemo 为什么不能同时注册两个行情数据
我在OnInitDialog函数中注册了两个期权的行情数据如下两行(2月2150的认沽和认购), 但是在ReportUpdate函数中只能收到第一条10000522的行情更新,为什么 谢谢了?   我用的是免费版本。


//注册期权行情数据
g_pMainFormework->RegReportNotify("10000522",\'QQ\');
g_pMainFormework->RegReportNotify("10000520",\'QQ\');



void CMainWindowDlg::ReportUpdate(LPARAM l)
{
REPORT_STRUCT * pData = (REPORT_STRUCT*)l;
//显示处理报表 pData->m_fNewPrice ....
CString strTextName;
CString strText;
strTextName.Format("%s",pData->m_szLabel);
if(strTextName == "10000520")
{
strText.Format("注册品种: %s |申买价 %.4f |买量 %.4f |申卖价 %.4f |卖量 %.4f |", pData->m_szName, pData->m_fBuyPrice[0],pData->m_fBuyVolume[0],pData->m_fSellPrice[0],pData->m_fSellVolume[0]);
GetDlgItem(IDC_STATIC_TEXT)->SetWindowText(strText);
}
if(strTextName == "10000522")
{
strText.Format("注册品种: %s |申买价 %.4f |买量 %.4f |申卖价 %.4f |卖量 %.4f |", pData->m_szName, pData->m_fBuyPrice[0],pData->m_fBuyVolume[0],pData->m_fSellPrice[0],pData->m_fSellVolume[0]);
GetDlgItem(IDC_STATIC_TEXT2)->SetWindowText(strText);
}
}

--  作者:hhxu
--  发布时间:2016/2/5 13:39:35
--  
更新一下,注册两个可以了(我把源代码中没有用的几个RegReportNotify去掉了) ,但是注册四个就不行 第四次调用RegReportNotify 返回false??
是不是免费有次数限制 help



--  作者:马良
--  发布时间:2016/2/5 13:53:11
--  
免费版只能注册3个,收费版本专业版20个
--  作者:hhxu
--  发布时间:2016/2/5 14:04:34
--  
thanks