Solved

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

Posted on 2004-05-02
3
606 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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.

785 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