调试过程中出现这样的错误
Unhandled exception in Mby.exe (MFC42D.DLL) :0xC0000005;Access Violation  this 指针的value显示:Cstatic hWnd=???这个错误怎么解决呢?

解决方案 »

  1.   


    您好,我的程序出错语句是:
    for(int j=0;j<40;j++)
    {
    if(bytestate[j]=='0')
    {
    bmp.LoadBitmap(IDB_BITMAP_GRAY);
    }
    else
    {
    bmp.LoadBitmap(IDB_BITMAP_GREEN);
    }

    m_Imagearray[j]->SetBitmap((HBITMAP)bmp);
    bmp.DeleteObject();
    }在j=39时,的m_Imagearray[j]->SetBitmap((HBITMAP)bmp);
    bmp.DeleteObject();
    这两个语句报错,怎么加您说的那个判断句柄呢
      

  2.   

    HBITMAP LoadBitmap(
      HINSTANCE hInstance, 
      LPCTSTR lpBitmapName
    ); 这里面不是有句柄吗?判断这里面的行不?