Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

932 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