Stubborn Error in MFC VC++6: Assert afxWin1.inl Line 19 in Release mode

Posted on 2004-11-05
Last Modified: 2012-08-14
I downloaded a third party code called Real Time Plot, it compiles in Debug but gives Assert afxWin1.inl Line 19 in Release mode. I tried initializing MFC and I used AFX_MANAGE_STATE(AfxGetStaticModuleState)) and other tricks but the Assert keeps coming back.

If you download the software from:  
then you will find that two other users had the same problem before me but no one offered a remedy.

Now I am open to any constructive suggestions.

Thanks guys.

Faisal Kadri
Question by:flkadri
    1 Comment

    Accepted Solution

    I found a remedy for my question:

    Instead of adding the "plot" project as done in the demo code, create a new class, call it "plot" or anything you like.
    Copy and paste the contents of the header and cpp files. Copy and add MCMem header and cpp files to your project and include your newly created class into your dialog or view class, whichever you are using, and proceed as before. This will compile and run without Asserts in Debug and in Release version.
    Obviously, the handle to "this" in the Create syntax does not pass to a separate project in Release version only, I don't know if this is an MFC quirk or programming error but I was kind of hoping that somebody can suggest a way to re-define the handle. Anyway, my remedy works and this is good enough for me!
    Good luck.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
    Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
    The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
    After watching the Introduction to GIMP this tutorial will show you additional tools to use in GIMP.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now