问题描述
你好
我面临VS2008 MFC应用程序的特殊问题.
我创建了一个MFC应用程序,该应用程序最初显示一个对话框,在对话框中单击确定"后,它显示一个窗体,该窗体显示带有一些信息的左右窗格.
我面临的问题是,当我在对话框中单击确定"时,在某些计算机上显示窗体,而在其他计算机上则不显示窗体.
当我在应用程序中注释窗体的状态条形码时,窗体将显示在所有计算机上.奇怪的是,当我用较旧的应用程序(带有状态条形码)替换该应用程序时,现在可以正常工作了.我在3台没有显示表格的机器上尝试过.他们现在使用较旧的应用程序显示表单.
我无法破解导致这种奇怪行为的原因.所有计算机都具有相同的安装(.NET Framework 2.0和3.5).
期待您的答复.
谢谢
Nipun
Hello
I am facing a peculiar problem with VS2008 MFC application.
I have created an MFC application which initially shows a Dialog box, after clicking OK in dialog box, it shows a Form showing left and right pane with some information.
Problem I am facing is when I click OK on a dialog box, Form gets displayed on some machines and on other machines does not get displayed.
When I comment Form''s Status Bar code in my application, form gets displayed on all machines. Here strange part is, when I replace this application with older one (with Status Bar code), that works fine now. I tried this on 3 machines which were not showing the form earlier. They shows the form now with older application.
I am unable to crack what causes this strange behavior.
All machines have same installtions(.NET framework 2.0 and 3.5).
Looking forward for your reply.
thanks
Nipun
推荐答案
BOOL CEmuDiagnosticsClientDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
m_pMainFrame = (CMainFrame*)AfxGetMainWnd();
//Do Modal Dialog box
if( m_IPAddressDlg->DoModal() == IDOK)
{
//m_pMainFrame->SetStatusBar(STATUSBAR_CONNECTING);
vector<ipaddressinfo> IPAddrInfoVectorDoc;
//Get IP Address vector
m_IPAddressDlg->GetIPAddressData(m_IPAddrInfoVectorDoc);
//Add IP Address list in left view
m_pLeftView->CreateIPAddressList();// == false)
m_IPAddressDlg->SetDlgCretaedFirstTime(false);
m_IPAddressDlg->DeleteVectorEntries();
m_IPAddrInfoVectorDoc.clear();
}
//m_pMainFrame->SetStatusBar(STATUSBAR_READY);
return TRUE;
}</ipaddressinfo>
到目前为止,已注释了StatusBar代码,这使我的应用程序可以正常工作.
As of now, StatusBar code is commented which causes my application to work fine.
这篇关于表单上状态栏的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!