CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011

    Unhandled exception


    I'm working on an assignment in MFC. I added two edit boxes in my form,mixed something with the code involving with these edit boxes and removed it all later, including the edit boxes. And what happened, the compiler goes without errors, but when I debug it an "Unhandled exception at 0x00620c19 in voltmeter.exe: 0xC0000005: Access violation reading location 0xfefeff66" happens. I have gone through the code with the debuger and saw that the DoModal() function returnes -1, when it should return 1. And in the DoModal function in the line
    LPCDLGTEMPLATE lpDialogTemplate = m_lpDialogTemplate;
    the variable lpDialogTemplate doesnt change it's content, it always stays unfulfilled, and when it hits the line
    if (lpDialogTemplate == NULL)
    return -1;
    it returnes -1, I think this is the problem, or maybe I'm wrong . Here is the link to download the program. http://rapidshare.com/files/446842749/voltmeter2.rar

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Hanover Germany

    Re: Unhandled exception

    1. Please, attach your .zip to your post.
    2. As you can see this forum:
    C++ and WinAPI Discuss Windows API related issues using C++ (and Visual C++). This is a non-MFC forum.
    So, you'd beeter post to Visual C++ Programming
    3. Check all your dialog resource IDs: are they correct?
    4. Sometimes helps Rebuild All
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.