解决了打开缓慢的问题,先显示主窗口,再加载诗词数据
下载地址 v2.6版本:增加了搜索诗人;在阅读模式是,点下拉菜单时发生变化; 诗词总数达到4000页 下载地址 v2.7版本: 改正了部分单引 不能查询和保存的错误; 下载地址 v2.7繁体版本:在繁体字操作系统下可正常显示诗词,用Unicode编码,诗词数据尚未改成繁体字 下载地址 v2.8版本下载:用Unicode编码,在不同语言的操作系统下可正常显示诗词 下载地址 推荐下载v2.9版本:支持繁体操作系统,诗词总页数达到4300页
下载地址
GetParentFrame()
->RecalcLayout();ResizeParentToFit();
AddComboKindData();
SetFirstFont();
b_MidText=GetPrivateProfileInt(“setting“,“midtext“,0,IniFile);
SetTimer(100,0,NULL);
// KillTimer(100);
} void CTangshiView::OnTimer(UINT nIDEvent)
{
if(nIDEvent==100)
{
CMainFrame* m_p=(CMainFrame*)AfxGetApp()->m_pMainWnd;
m_p->m_LeftTree->AddTreeData();
m_p->m_LeftTree->GetAllNum();
char mystrbuf[102];
CString strtemp_Dynasty,strtemp_Author,strtemp_Title;
GetPrivateProfileString(“load“,“dynasty“,“当代“,mystrbuf,102,IniFile);
strtemp_Dynasty=mystrbuf;
GetPrivateProfileString(“load“,“author“,NULL,mystrbuf,102,IniFile);
strtemp_Author=mystrbuf;
GetPrivateProfileString(“load“,“title“,NULL,mystrbuf,102,IniFile);
strtemp_Title=mystrbuf;
m_p->m_LeftTree->FirstLoad(strtemp_Dynasty,strtemp_Author,strtemp_Title);
if(m_checkBaike)
{
ShellExecute(NULL,NULL,“http://baike.baidu.com/list-php/dispose/searchword.phpord=“+m_strSearch,NULL,NULL,SW_SHOWNORMAL);
// return;
}
CString sql_search, sql_or,sql_num;
sql_or=m_checkTitle/span>“d_title“:m_checkAuthor/span>“d_author“:“d_poetry“;
myado.OnInitADO();//GROUP BY number HAVING COUNT(number) > 1
// sql_search.Format(“select count(*) as num from t_poetry where %s like ‘%’%s’%'”,sql_or,m_strSearch);
sql_search.Format(“select distinct d_title,d_poetry,d_author from t_poetry where %s like ‘%s%s%s’ order by d_author“,sql_or,“%“,m_strSearch,“%“);
myado.m_pRecordset.CreateInstance(__uuidof(Recordset));
myado.m_pRecordset->Open((_bstr_t)sql_search,myado.m_pConnection.GetInterfacePtr(),adOpenKeyset,adLockOptimistic,adCmdText);
if(myado.m_pRecordset->RecordCount>0)
{
int j;
j=0;
m_List.DeleteAllItems();
while(!myado.m_pRecordset->adoEOF)
{
m_List.InsertItem(j,“”);
m_List.SetItemText(j,0,(char*)(_bstr_t)myado.m_pRecordset->GetCollect(“d_title“));
m_List.SetItemText(j,1,(char*)(_bstr_t)myado.m_pRecordset->GetCollect(“d_poetry“));
m_List.SetItemText(j,2,(char*)(_bstr_t)myado.m_pRecordset->GetCollect(“d_author“));
myado.m_pRecordset->MoveNext();
j++;
}
CString str_myshow;
str_myshow.Format(“共找到“%s”%d篇“,m_strSearch,j);
SetDlgItemText(IDC_STATIC_SHOW,str_myshow);
}
else
{
SetDlgItemText(IDC_STATIC_SHOW,“未找到““+m_strSearch+“”,百度一下吧!“);
}
myado.ExitConnect();
}
相关资源:哄女孩子开心的小软件-其它其他资源-CSDN文库
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!