Search

Using CFileDialog in Loop causes Error by bill928

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 683726
Opened: 8/10/2011 8:44:27 AM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
In Windows 7 reusing a CFileDialog causes an ASSERT in debug, and throws an exception which displays a message box "Encountered and Improper Argument". The code works in Windows XP, and works in Windows 7 if the "bVistaStyle" parameter is FALSE.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 2010

Steps to reproduce

CFileDialog dlg(TRUE, NULL, NULL, NULL, _T("All Files (*.txt)|*.txt||"));

while (dlg.DoModal() == IDOK)
{
// do something
}

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

Loop terminates with error dialog.

Expected results

Loop continues until CANCEL button.
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 8/11/2011 at 3:45 PM
Hello,

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 MS-Moderator08 [Feedback Moderator] on 8/10/2011 at 8:03 PM
Thank you for submitting feedback on Visual Studio 2010 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 MS-Moderator01 on 8/10/2011 at 9:42 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.