我在基于基本对话框的程序设计过程中,运行一切都很正常,但是,当我加入像组合框,列表框等控件时,也不会报错,但对他们添加成员变量后,即使没有进行任何代码编写,但每次运行都会出现一下错误,请问这是什么原因啊??
  Unhandled exception videoCap.exe (NTDLL.DLL): 0XC00000005:Access violation  请指点~!

解决方案 »

  1.   

    NTDLL.DLL?不会是system32里的什么东西坏了吧。
      

  2.   

    你的控件的ID号乱了,手工编辑resource.h,重新牌号
      

  3.   

    1 我不止编译了一次,每次都如此
    2 Win32应该没有问题,因为重新建立一个空间时可以运行
    3 控件ID号也没有乱,因为就不到5个ID
     就是,每次加入组合框,列表框时,一旦添加了成员变量,在运行就出错误。
    删除后就没有问题
      

  4.   

    这是Resource.h里的代码,应该没有问题吧,大家看看,提点建议啊
    #define IDM_ABOUTBOX                    0x0010
    #define IDD_ABOUTBOX                    100
    #define IDS_ABOUTBOX                    101
    #define IDD_VIDEOCAP_DIALOG             102
    #define IDR_MAINFRAME                   128
    #define IDR_MENU1                       129
    #define IDC_CAPWND                      1000
    #define IDC_COMBO1                      1001//
    #define IDC_BUTTON1                     1005//
    #define ID_PREVIEW                      32771
    #define ID_OVERlAY                      32772
    #define ID_STATUS                       32773
    #define ID_TOOL                         32774
    #define ID_VIDEO_SOURCE                 32775
    #define ID_VIDEO_FORMAT                 32776
    #define ID_COMPRESS                     32777
    #define ID_DRIVER_SET                   32778
    #define ID_VIDEO_SAVE                   32779
    #define ID_IMG_SAVE                     32780
    #define ID_DISCONNECT                   32781
    #define ID_DEVICE_CONNECT               32782
    #define ID_VIDEO_START                  32783
    #define ID_VIDEO_SAVEAS                 32784
    #define ID_IMG_DJSP                     32785
    #define ID_IMG_JSDJ                     32786
    #define ID_MENUITEM32787                32787
    #define ID_IMG_STATIC                   32788
    #define ID_IMG_DYNAMIC                  32789
    #define ID_IMG_EDITCOPY                 32790
    #define ID_MENUITEM32791                32791
    #define ID_MENUITEM32792                32792
    #define ID_ABOUT                        32793
    #define ID_MENUITEM32794                32794
    #define ID_IMG_STATIC_END               32795
    #define ID_INDICATOR_STATUS             57671
    #define ID_INDICATOR_MOUSE              57672
    #define ID_INDICATOR_TIME               57673// Next default values for new objects
    // 
    #ifdef APSTUDIO_INVOKED
    #ifndef APSTUDIO_READONLY_SYMBOLS
    #define _APS_NEXT_RESOURCE_VALUE        130
    #define _APS_NEXT_COMMAND_VALUE         32796
    #define _APS_NEXT_CONTROL_VALUE         1006
    #define _APS_NEXT_SYMED_VALUE           101
    #endif
    #endif
      

  5.   

    这种问题一般Rebuilt all就行了,一般是因为ID修改后,编译临时文件没有更新。