在 
CXXXView.h中有如下代码:
int splash; 在
BOOL CSplashApp::InitInstance()
{
  //在这里我要用splash对象 怎么用?我这样写 splash.display();
  //错误如下:error C2065: 'splash' : undeclared identifier
  //该怎么访问呢?
}

解决方案 »

  1.   

    要先得到你的视图指针
    不过在InitInstance中视图好像还没有创建了吧
      

  2.   

    在你的APP初始化的时候,View还没建立呢!怎么可能访问得到呢?不如把View的成员改为APP的成员,在View里面访问APP里的。
      

  3.   

    在这个函数里不行,不知道你的真正用意是什么,想在程序开始时做splash的话,VC可以实现,请查找相关资料。
      

  4.   

    启动画面vc里面component and controls就有的,不用自己写