我在做一个启动界面,在把  两个对话框 做成同时出现的时候,
出错了
 error C2143: syntax error : missing ';' before '*'
 error C2501: 'CPaintDlg' : missing storage-class or type specifiers
 error C2501: 'm_dlgPaint' : missing storage-class or type specifiers
Error executing cl.exe.Desk3.exe - 3 error(s), 0 warning(s)//CPaintDlg 为第二 个对话框的类名
//m_dlgPaint 是在第一个对话框的OnInitDialog()里用CPaintDlg* m_dlgPaint;
如果哪位牛人可以给出启动界面的关键原代码的话,另开贴给高分;

解决方案 »

  1.   


    把CPaintDlg* m_dlgPaint放到onshow中试试。
      

  2.   

    ???
    onshow
    是类吗 ?
    怎么没有 啊?
      

  3.   

    //第一个对话框Desk3
    #include "stdafx.h"
    #include "Desk3.h"
    #include "PaintDlg.h"
    #include "Desk3Dlg.h"
    //第二个对话框的 
    #include "stdafx.h"
    #include "Desk3.h"
    #include "PaintDlg.h"
    #include "Desk3Dlg.h"
      

  4.   

    http://www.vckbase.com/code/viewcode.asp?id=1644
    http://expert.csdn.net/Expert/topic/1491/1491444.xml?temp=.1083338
      

  5.   

    ;//三个错误都是指向这里的CPaintDlg* m_dlgPaint;//是在第一个对话框的OnInitDialog()里
      

  6.   

    定义的指针没有给分配内存!!有出错隐患!
    最好 CPaintDlg* m_dlgPaint = new CPaintDlg;
          .....
      

  7.   

    可是
    我定义了m_dlgPaint = NULL;
    这样不可以吗 ?