Exception in IAccessibleProxyImpl from CMFCPropertyGridCtrl
-
I am working with an MFC Dialog Application built with VS 2010 My application uses CPropertySheet with multiple CPropertyPage's and on one of them I am using a CMFCPropertyGridCtrl. The Dialog associated with that page handles PreTranslateMessage's. When running this code on a Windows 7 Touch Screen computer, I get the following exception in the PreTranslateMessage handling a WM_MOUSEDOWN for the CMFCPropertyGridCtrl which eventually calls IsDialogMessaag(): mfc100ud.dll!ATL::IAccessibleProxyImplATL::CAccessibleProxy::get_accParent(IDispatch * * ppdispParent) Line 69 C++ // Delegate to standard helper? HRESULT CWnd::get_accParent(IDispatch **ppdispParent) { ASSERT(m_pStdObject != NULL); return m_pStdObject->get_accParent(ppdispParent); } The problem is that ppdispParent points to a NULL. I have no idea what should be done to fix this??? Can anyone help explain this?
-
I am working with an MFC Dialog Application built with VS 2010 My application uses CPropertySheet with multiple CPropertyPage's and on one of them I am using a CMFCPropertyGridCtrl. The Dialog associated with that page handles PreTranslateMessage's. When running this code on a Windows 7 Touch Screen computer, I get the following exception in the PreTranslateMessage handling a WM_MOUSEDOWN for the CMFCPropertyGridCtrl which eventually calls IsDialogMessaag(): mfc100ud.dll!ATL::IAccessibleProxyImplATL::CAccessibleProxy::get_accParent(IDispatch * * ppdispParent) Line 69 C++ // Delegate to standard helper? HRESULT CWnd::get_accParent(IDispatch **ppdispParent) { ASSERT(m_pStdObject != NULL); return m_pStdObject->get_accParent(ppdispParent); } The problem is that ppdispParent points to a NULL. I have no idea what should be done to fix this??? Can anyone help explain this?
Start by posting a stack trace. Always post a stack trace when reporting a crash.
Steve
-
Start by posting a stack trace. Always post a stack trace when reporting a crash.
Steve
I've found the solution to this problem. It appears to be related to the HTML control issue discussed in: http://support.microsoft.com/kb/954251/de I added the following WM_DESTROY handler to my CMFCPropertyGridCtrl. void CPropGridCtrl::OnDestroy() { if ( NULL != m_pStdObject ) { m_pStdObject->Release(); m_pStdObject = NULL; } CMFCPropertyGridCtrl::OnDestroy(); } When I run with this, I don't see any crashes, but without it I get them so looks like this is the magic bullet.
-
I've found the solution to this problem. It appears to be related to the HTML control issue discussed in: http://support.microsoft.com/kb/954251/de I added the following WM_DESTROY handler to my CMFCPropertyGridCtrl. void CPropGridCtrl::OnDestroy() { if ( NULL != m_pStdObject ) { m_pStdObject->Release(); m_pStdObject = NULL; } CMFCPropertyGridCtrl::OnDestroy(); } When I run with this, I don't see any crashes, but without it I get them so looks like this is the magic bullet.
The Internet comes through with the goods again.
Steve
-
I am working with an MFC Dialog Application built with VS 2010 My application uses CPropertySheet with multiple CPropertyPage's and on one of them I am using a CMFCPropertyGridCtrl. The Dialog associated with that page handles PreTranslateMessage's. When running this code on a Windows 7 Touch Screen computer, I get the following exception in the PreTranslateMessage handling a WM_MOUSEDOWN for the CMFCPropertyGridCtrl which eventually calls IsDialogMessaag(): mfc100ud.dll!ATL::IAccessibleProxyImplATL::CAccessibleProxy::get_accParent(IDispatch * * ppdispParent) Line 69 C++ // Delegate to standard helper? HRESULT CWnd::get_accParent(IDispatch **ppdispParent) { ASSERT(m_pStdObject != NULL); return m_pStdObject->get_accParent(ppdispParent); } The problem is that ppdispParent points to a NULL. I have no idea what should be done to fix this??? Can anyone help explain this?
I had the same problem using a CMFCPropertyGridCtrl in a CPropertyPage with VS2012 (without Touch Screen). Using the resouce in a CDialog is no problem, but when used in a CpropertyPage,the page calls OnDestroy as soon as it should be initialized. The Solution was, dont include the CMFCPropertyGridCtrl aus a resource control and dynamically create it after the InitDialog of the CProperyPage is called. CMFCPropertyGridCtrl * pctrlPropertyGrid = new CMFCPropertyGridCtrl(); if (pctrlPropertyGrid) { CRect rect; GetWindowRect(&rect); ScreenToClient(&rect); rect.DeflateRect(5, 10, 5, 10); pctrlPropertyGrid->Create(WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER, rect, this, IDC_MFCPROPERTYGRID1); ... }