Tip of the day的bug
生活随笔
收集整理的這篇文章主要介紹了
Tip of the day的bug
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
我創(chuàng)建了一個(gè)簡(jiǎn)單的mdi應(yīng)用程序,使用.BSF(自定義的文檔擴(kuò)展名)作為它的文檔我保存一個(gè)foo.bsf文檔后,可以在資源管理器中雙擊該文件打開mdi應(yīng)用程序同時(shí)打開foo.bsf文檔.但當(dāng)我給mdi應(yīng)用程序加上a tip of the day組件之后,從資源管理器中雙擊foo.bsf后,就會(huì)給我一個(gè)警告:ASSERT(::IsWindow(m_hWnd)),然后mdi應(yīng)用程序就死那了.
當(dāng)從dde啟動(dòng)應(yīng)用程序(例如:雙擊相關(guān)文檔)時(shí),"Tip of the Day"是有bug的.你可以看看函數(shù)"ShowTipAtStartup",它在"InitInstance"中調(diào)用,可以看到tip of the day作為一個(gè)模式對(duì)話框顯示,在處理其它消息時(shí)它一直進(jìn)行消息循環(huán)你可心修改ShowTipAtStartup使其從dde啟動(dòng)時(shí)不出現(xiàn)tip of the day.
?void CTipOfApp::ShowTipAtStartup(void)
????????{
????????????????// CG: This function added by 'Tip of the Day' component.
????????????????CCommandLineInfo cmdInfo;
????????????????ParseCommandLine(cmdInfo);
????????????????if (
????????????????????????cmdInfo.m_bShowSplash &&
????????????????????????cmdInfo.m_nShellCommand != CCommandLineInfo::FileDDE
????????????????????????)
????????????????{
????????????????????????CTipDlg dlg;
????????????????????????if (dlg.m_bStartup)
????????????????????????????????dlg.DoModal();
????????????????}
????????}
如果還有其它bug,你可以設(shè)定cmdInfo.m_nShellCommand的過濾.
當(dāng)從dde啟動(dòng)應(yīng)用程序(例如:雙擊相關(guān)文檔)時(shí),"Tip of the Day"是有bug的.你可以看看函數(shù)"ShowTipAtStartup",它在"InitInstance"中調(diào)用,可以看到tip of the day作為一個(gè)模式對(duì)話框顯示,在處理其它消息時(shí)它一直進(jìn)行消息循環(huán)你可心修改ShowTipAtStartup使其從dde啟動(dòng)時(shí)不出現(xiàn)tip of the day.
?void CTipOfApp::ShowTipAtStartup(void)
????????{
????????????????// CG: This function added by 'Tip of the Day' component.
????????????????CCommandLineInfo cmdInfo;
????????????????ParseCommandLine(cmdInfo);
????????????????if (
????????????????????????cmdInfo.m_bShowSplash &&
????????????????????????cmdInfo.m_nShellCommand != CCommandLineInfo::FileDDE
????????????????????????)
????????????????{
????????????????????????CTipDlg dlg;
????????????????????????if (dlg.m_bStartup)
????????????????????????????????dlg.DoModal();
????????????????}
????????}
如果還有其它bug,你可以設(shè)定cmdInfo.m_nShellCommand的過濾.
總結(jié)
以上是生活随笔為你收集整理的Tip of the day的bug的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 重磅 | 吴恩达新书《Machine L
- 下一篇: 重磅 |“吴恩达deeplearning