Announcement

Collapse
No announcement yet.

SỬA LỖI " Unhandled exception at 0x003eaea9 in Game.exe: 0xC0000005:"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [C++] SỬA LỖI " Unhandled exception at 0x003eaea9 in Game.exe: 0xC0000005:"

    mình đang tạo form giao diện trên C++ copy code trên trang networkingprogramming
    code ntn:
    #include <afxwin.h> //MFC core and standard components
    #include "resource.h" //main symbols
    //-----------------------------------------------------------------------------------------

    class GAME_FORM : public CDialog
    {
    public:
    GAME_FORM(CWnd* pParent = NULL): CDialog(GAME_FORM::IDD, pParent)
    { }
    enum{IDD = INTERFACE1};
    protected:
    virtual void DoDataExchange(CDataExchange* pDX) { CDialog:oDataExchange(pDX); }
    virtual BOOL OnInitDialog()
    {
    CDialog::OnInitDialog();
    return TRUE;
    }
    public:
    DECLARE_MESSAGE_MAP()
    };
    //-----------------------------------------------------------------------------------------
    class TheGame : public CWinApp
    {
    public:
    TheGame() { }
    public:
    virtual BOOL InitInstance()
    {
    CWinApp::InitInstance();
    GAME_FORM dlg;
    m_pMainWnd = &dlg;
    INT_PTR nResponse = dlg.DoModal();
    return FALSE;
    } //close function
    };
    //-----------------------------------------------------------------------------------------
    //Need a Message Map Macro for both CDialog and CWinApp
    BEGIN_MESSAGE_MAP(GAME_FORM, CDialog)
    END_MESSAGE_MAP()
    //-----------------------------------------------------------------------------------------
    TheGame theApp; //Starts the Application

    BẠN NÀO TÌM GIÚP MÌNH LỖI VỚI.
    THANKS!!!

LHQC

Collapse
Working...
X