Solved

Release build crash pWndParent->m_pCtrlCont->AttachControlSite(this);

Posted on 2004-05-02
3
575 Views
Last Modified: 2013-11-20
Hi,

I have an application using RichEdit 2.0 controls in a SDI FormView. When linked against the release version of the MFC library it crashes
on the pWndParent->m_pCtrlCont->AttachControlSite(this); call in

void CWnd::AttachControlSite(CHandleMap* pMap)
{
      if (this != NULL && m_pCtrlSite == NULL)
      {
            // Determine if parent is an OLE control container
            CWnd* pWndParent = (CWnd*)pMap->LookupPermanent(::GetParent(m_hWnd));
            if (pWndParent != NULL && pWndParent->m_pCtrlCont != NULL)
            {
                  // delegate through helper in COleControlSite
                  pWndParent->m_pCtrlCont->AttachControlSite(this);
            }
      }
}

(WINOCC.CPP)

I compiled my program with debug information linked against the Release version of MFC and stepped into the crash and  it occurs after a PumpMessage call deep within MFC :-( I am rather puzzled about this problem and would appreciate any suggestions to resolve this.

I already checked my message handlers for correct format so I dont think it is caused by any of my costum registered window messages...

Confused greetings,
Thees.

0
Comment
Question by:Bender979
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
vijay_visana earned 125 total points
ID: 10974827
There can be many reasons so following article give you very good insight in release problem
go thru it.

http://www.codeproject.com/debug/survivereleasever.asp
0
 

Author Comment

by:Bender979
ID: 10975401
Thanks, but I ran through the issues mentioned there already before posting here.
My message handlers have the correct format, it also happens with compiler optimizations turned off etc. pp.

:-(
0
 

Author Comment

by:Bender979
ID: 10978309
shame and even bigger shame on me, lol OK OK OK I overlooked a wrong message handler *hide in corner*

happens if you sit too long in front of your computer, lol. Cheers.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Detect CR LF to each line 12 137
if loop in java 3 114
wait notify demo infinite loop 3 80
EvenOdd challenge 10 83
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

12 Experts available now in Live!

Get 1:1 Help Now