Search

Class Wizard Generates Corrupted Output for OnInitDialog() Handler Function by NicolasJ

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 779271
Opened: 2/14/2013 9:32:35 PM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
Visual Studio 2012 Pro obtained from Dream Spark
Update 1 installed
Installed on Windows 8 Pro 64bit
Macbook Pro 10,1

The class wizard generates corrupted output when trying to create a handler for OnInitDialog.
Details (expand)

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

Visual Studio 2012

Steps to reproduce

1. Create a new Dialog using the resource view
2. Double click the dialog to create a CDialogEx derived class
3. Place the cursor in the constructor of the new CDialogEx class
4. Start the class wizard
5. Add a virtual function for the OnInitDialog callback
6. Observe output

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results

BOOL ProjectPropertiesDialog::OnInitDialog()
{
    CDialogEx::OnInitDialog();

#5312

    return TRUE; // return TRUE unless you set the focus to a control
#5313

#5312

    return TRUE; // return TRUE unless you set the focus to a control
#5313
    // TODO: Add extra initialization here

    return TRUE; // return TRUE unless you set the focus to a control
#5313
    return TRUE; // return TRUE unless you set the focus to a control
#5313
    // EXCEPTION: OCX Property Pages should return FALSE
}

Expected results

BOOL ProjectPropertiesDialog::OnInitDialog()
{
    CDialogEx::OnInitDialog();

    // TODO: Add extra initialization here

    return TRUE; // return TRUE unless you set the focus to a control
}
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/20/2013 at 5:24 PM
Thank you for reporting this issue. We have already fixed this issue internally, and it will also be fixed in a future Visual Studio 2012 update.

Thank you,
Jennifer Leaf
Visual C++
Posted by Microsoft on 2/19/2013 at 2:21 AM
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 Microsoft on 2/14/2013 at 9:50 PM
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.