Home Dashboard Directory Help
Search

BUG: MFC - Observation pointer in CMFCRibbonBar becomes invalid by mem64k


Status: 

Closed
 as By Design Help for as By Design


1
0
Sign in
to vote
Type: Bug
ID: 767035
Opened: 10/11/2012 5:20:38 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

There is an observation pointer (m_pPressed) that will be initialized in CMFCRibbonBar::OnLButtonDown() function. This pointer needs to be valid during the live time of the CMFCRibbonPanel elements on the ribbon bar. In case the user removes some or all elements with CMFCRibbonPanel::RemoveAll() or MFCRibbonPanel::Remove() before the mouse interaction is completely ended, the observation pointer becomes invalid and the application crashes.
Details
Sign in to post a comment.
Posted by Microsoft on 11/2/2012 at 10:08 AM
Hello,

Thanks for the report. We have investigated and believe that this behavior is by design: you should not try to delete the ribbon edit owner inside the message loop. The preferable way to do it is by calling PostMessage with some user message (e.g. UM_CLEANUP_PANEL) from the OnKillFocus message handler and then remove panel elements inside UM_CLEANUP_PANEL message handler.

Pat Brenner
Visual C++ Libraries Development
Posted by Microsoft on 10/15/2012 at 4:02 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by mem64k on 10/12/2012 at 4:03 AM
Hi! I just uploaded a sample project MFCRibbonPressedTest.zip.
Posted by Microsoft on 10/11/2012 at 9:04 PM
Thanks for your feedback.

In order to fix the issue, we must first reproduce the issue in our labs. In order to efficiently investigate and reproduce this issue, we are requesting additional information outlined below.

Could you please give us a demo project so that we can conduct further research?

Please submit this information to us within 3 business days. We look forward to hearing from you with this information.

Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 10/11/2012 at 5:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
MFCRibbonPressedTest.zip 10/12/2012 109 KB