Search

MFC status bar message is displayed (wrong) again after tool bar button is pressed by Marc_75

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 658227
Opened: 4/8/2011 1:19:20 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
After a toolbar button is pressed the status bar message for the button is updated again. At that time, the mouse may already have moved to a complete other location. But the MFCStatusBar still wants to display the status bar message for the button ID again at that time. The 'Ready'-status bar text is displayed shortly after
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010 SP1

What category (if any) best represents this feedback?

Reliability

Steps to reproduce

Open any MFC application that uses the new CMFCStatusBar class from the MFC feature pack.

Just press the 'File Open'-button on the tool bar. At that moment, the icon is displayed as 'pressed down'. Then the 'File Open'-dialog appears.

After pressing the 'cancel'-button using the mouse (for which of course you'll have to move the mouse cursor position), the status bar text for the 'File Open'-button is displayed again, which is wrong since the mouse cursor position isn't positioned above the tool bar button anymore.

Product Language

English

Operating System

Windows Vista

Operating System Language

English

Actual results

Code is run from the function:
void CMFCToolBar::OnLButtonUp(UINT nFlags, CPoint point)

The button command is executed from this function by the line:
GetOwner()->SendMessage(WM_COMMAND, nIDCmd);    // send command

After the command has been executed (e.g. closing the 'File Open'-dialog), the following function will be called:
OnMouseMove(0, point);

Now the following line is executed by OnMouseMove(0, point):
ShowCommandMessageString(pButton->m_nID);

Expected results

I would not expect the status bar message to be displayed again when the mouse cursor position was changed in the mean time.
File Attachments
File Name Submitted By Submitted On File Size  
statusbar.zip 4/13/2011 127 KB
demo.avi 4/13/2011 4.64 MB
Sign in to post a comment.
Posted by Microsoft on 4/19/2011 at 4:30 PM
Hello,

Thanks for the report and the additional information. 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 4/13/2011 at 11:00 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Marc_75 on 4/13/2011 at 2:11 AM
Hello,

I find it strange that you cannot reproduce this issue, because it's so simple. But never mind, I've posted a sample project as well as a video file. Watch the status bar text as soon as the 'Cancel'-button is pressed in the 'File Open'-dialog. It will show 'open an existing file' for a short while! That's the bug I mentioned, since the mouse cursor isn't positioned anymore above the 'Open'-button on the tool bar.

Thank you!
Posted by Microsoft on 4/13/2011 at 1:54 AM
Could you please give us your demo project and a video file of this issue. I am sorry for the inconvenience. We are unable to reproduce the issue with the steps you provided before.
Posted by Marc_75 on 4/8/2011 at 2:11 AM
I'm sorry, I incorrectly set the product version to VS2010 although I'm using VS2010 SP1.
This has been updated.
Posted by Microsoft on 4/8/2011 at 2:03 AM
Thanks for reporting this issue you've encountered with Visual Studio!

Please install Service Pack 1 for Visual Studio 2010 to see the result.
Sign in to post a workaround.