成员变量
CSplashDlg m_dlgSplash;m_dlgSplash.Create(IDD_SPLASH, this);//此行出错
m_dlgSplash.ShowWindow(SW_SHOW);error C2664: 'int __thiscall CDialog::Create(const char *,class CWnd *)' : cannot convert parameter 1 from 'const int' to 'const char *'
        Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
遇到这种问题真是莫名奇妙

解决方案 »

  1.   

    CDialog不是重载了Create(UINT, CWnd*)吗
      

  2.   

    非模式有非模式的调用方式
    得:
    CSplashDlg *m_dlgSplash = new CSplashDlg;m_dlgSplash->Create(IDD_SPLASH, this);//此行出错
    m_dlgSplash->ShowWindow(SW_SHOW); 
      

  3.   

    应该不是这个问题吧
    CSplashDlg m_dlgSplash; 
    是成员变量
    改成这个也是同样的错误。。
    CSplashDlg *m_dlgSplash = new CSplashDlg; 
    m_dlgSplash->Create(IDD_SPLASH, this);//此行出错 
    m_dlgSplash->ShowWindow(SW_SHOW); 
      

  4.   

    m_dlgSplash.Create((UINT)IDD_SPLASH, this);
    还是同样的错误
      

  5.   

    m_dlgSplash.Create(IDD_SPLASH, this);//此行出错 
    参数给的不对吧?他需要的是一个char 你给的是一个整数
      

  6.   

    没。
    我到vc知识库问到了答案

    m_dlgSplash.Create(IDD_SPLASH, this);
    改成
    m_dlgSplash.Create(IDD_SPLASH);
    就可以了
    不知道为什么为这样