对话框引入MSCOMM控件后不能显示,去掉控件后就可以正常显示,有哪位高手QQ帮我看看代码也可以,100分。
我的QQ:312471977

解决方案 »

  1.   

    把用到MSCOMM控件的代码贴出来看看
      

  2.   

    在C...App::InitInstance()中加上:
    AfxOleInit()
      

  3.   

    我建的工程不是SDI的,是Dialog的,要是单独建立新的Dialog工程使用MSCOMM就没任何问题,但我这个工程引入MSCOMM并添加到Dialog中后就执行Winmain后没反应了;不添加到启动时的Dialog中工程也可以正常执行,但把它添加到哪个Dialog中哪个就不能显示。在OnInitDialog()中AfxOleInit() 
    没作用,怀疑根本没执行到OnInitDialog()。代码14M,谁用QQ帮我看看也行啊?
    我的QQ:312471977
      

  4.   

    谁告诉你在OnInitDialog里面加了?要在应用程序类的初始化函数InitInstance中加。
      

  5.   

    是啊,添加到CxxxApp::InitInstance里,要在对话框初始化之前。
      

  6.   

    BOOL CFE_DLGApp::InitInstance()
    {
    // Standard initialization
    // If you are not using these features and wish to reduce the size
    //  of your final executable, you should remove from the following
    //  the specific initialization routines you do not need.
        AfxOleInit();//加上之后还是不行,这里加对不对啊?
    CFE_DLGDlg dlg;
    m_pMainWnd = &dlg;
    int nResponse = dlg.DoModal();
    if (nResponse == IDOK)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
    }
    else if (nResponse == IDCANCEL)
    {
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
    } // Since the dialog has been closed, return FALSE so that we exit the
    //  application, rather than start the application's message pump.
    return FALSE;
    }加上之后还是不行,加的对不对啊?我学VC刚5天,希望大侠们多多指教啊,具体的最好。
      

  7.   

    代码14M,肯定很多垃圾,清理后删除DEBUG、Release目录,打包发给我看看。[email protected]
      

  8.   

    文件夹里有一堆图片,删了后是3.5M了,找到原因和解决方法了。
    AfxEnableControlContainer();这样就可以了;谢谢楼上各位的帮忙。