Home Dashboard Directory Help
Search

CMFCRibbonEdit::OnSetFocus() in MFC Microsoft Office Fluent UI by Tomasz Olejniczak


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 680263
Opened: 7/21/2011 8:36:19 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

I want my application to handle a change in the focus of edit control on a ribbon bar, so I overrode the method OnSetFocus() in a class derived from CMFCRibbonEdit. The problem is that the focus on this control is changing and this method is never called. Spy++ tool reports that the messages WM_SETFOCUS/WM_KILLFOCUS are being sent for this control.

Likely reason: It looks like in intenal MFC class CMFCRibbonRichEditCtrl there is no call of CMFCRibbonEdit::OnSetFocus() method in CMFCRibbonRichEditCtrl::OnKillFocus()/OnSetFocus() methods.
Details
Sign in to post a comment.
Posted by Microsoft on 11/18/2011 at 12:01 PM
Hello Tomasz,

Thanks for the report. This issue has been fixed in MFC for the next major release of Visual Studio.

Pat Brenner
Visual C++ Libraries Development
Posted by Microsoft on 8/2/2011 at 12:04 AM
Thanks again for attaching the demo project to help us investigate this issue. 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 Tomasz Olejniczak on 7/28/2011 at 5:04 AM
Hi,

I've just attached a demo project. It's the RibbonMDI project from Visual Studio 2010 Samples with added ribbon edit control.
Posted by Microsoft on 7/28/2011 at 3:20 AM
Hello,

Sorry for bothering. Is there any update?

It would be greatly appreciated if you could provide us with that information as quickly as possible. If we do not hear back from you within 7 days, we will close this issue.

Thanks again for your efforts and we look forward to hearing from you.
Posted by MS-Moderator08 [Feedback Moderator] on 7/28/2011 at 2:43 AM
Hello,

Sorry for bothering. Is there any update?
Posted by MS-Moderator08 on 7/21/2011 at 10:36 PM
Thank you for reporting this issue. Could you please attach a demo project to help us reproduce this issue?
Posted by MS-Moderator01 on 7/21/2011 at 8:51 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.
Posted by Tomasz Olejniczak on 7/28/2011 at 5:18 AM
The workaround for this problem is overriding the methods OnSetFocus(CWnd* pOldWnd) and OnKillFocus(CWnd* pOldWnd) in a class derived from CMFCRibbonRichEditCtrl, e.g. CMyMFCRibbonRichEditCtrl. Then add appropriate calls to m_edit.OnSetFocus() in these methods and make your class derived from CMFCRibbonEdit to create CMyMFCRibbonRichEditCtrl instead of CMFCRibbonRichEditCtrl when setting pWndEdit pointer.
File Name Submitted By Submitted On File Size  
RibbonMDI+RibbonEditControl.zip 7/28/2011 234 KB
RibbonMDI+RibbonEditControl.zip 7/28/2011 26.66 MB