Locked Using Common Controls in VS 2012

  • Thursday, August 16, 2012 12:18 PM
     
     

    Today we started using VS 2012. The first task is to create a new project and using some ressources of an older project (made in VS 2010).

    2 problems occured:

    1. ) I can't import (drag and drop) a dialog ressource wwith common controls into VS 2012 - VS 2012 crashes when I try this

    2.) the dialog editor toolbox displays only the new MFCControls, but the common controls are all greyed out

    I tried this in several test projects (MDI and dialog based) - no succes

    Is this a bug in VS 2012 or is there a setting I have to make in order to use the common controls

    How can I use common controls in MFC VS 2012 and how can I reuse existing dialogs?

    Thanks!

All Replies

  • Thursday, August 16, 2012 1:15 PM
     
     

    1. ) I can't import (drag and drop) a dialog ressource wwith common controls into VS 2012 - VS 2012 crashes when I try this

    If you can reproduce it in a project that you can pass to Microsoft,
    please submit a bug report on the MS connect site.

    2.) the dialog editor toolbox displays only the new MFCControls, but the common controls are all greyed out
    <http://social.msdn.microsoft.com/Forums/getfile/153027>

    I think the one's that are greyed out are for WinForms use, not
    Win32/MFC native applications - the non MFC ones may be under a
    different section.

    Dave

  • Thursday, August 16, 2012 3:32 PM
     
     

    I think these are the controls for MFC, however all other sections are greyed out, too.

    So there are only the new MFC-controls available in the tool box.

    Maybe I have to adjust a setting somewhere in the project properties to make the common controls available? Or add a #define somewhere?

    The interesting thing is: After creating a new dialog based project with the wizard you can see a dialog with common controls (e.g. static text control) . But you can't add new ones.

    Can anyone confirm that common controls are not accessable in MFC dialoges?


    Matthias Gross - Developer and company owner GHL Matthias Gross GmbH & Co.KG Germany www.aquariumcomputer.com

  • Thursday, August 16, 2012 8:33 PM
     
     

    >The interesting thing is: After creating a new dialog based project with the wizard you can see a dialog with common controls (e.g. static text control) . But you can't add new ones.

    Mighty odd.

    When I open a Win32 project and show a dialog, the toolbox has all the
    expected standard Win32 controls under the "Dialog Editor" section and
    the MFC specific ones follow in the list (it's quite long!)

    Dave

  • Friday, August 17, 2012 6:33 AM
     
     

    you write "I open a project"

    I assume this was an older existing project

    it would be interesting to know if the controls are also there in a new VS 2012 project


    Matthias Gross - Developer and company owner GHL Matthias Gross GmbH & Co.KG Germany www.aquariumcomputer.com

  • Friday, August 17, 2012 8:59 AM
     
     

    you write "I open a project"
    I assume this was an older existing project

    That's right.

    it would be interesting to know if the controls are also there in a new VS 2012 project

    They are there for me.

    Dave

  • Friday, August 17, 2012 5:06 PM
     
     

    OK, it seems this problem occurs not everywhere

    just to make sure: we are talking about VS 2012 RTM (released this Wednesday - 15. Aug. 2012)

    maybe the system configuration is important:

    I have German VS 2012 Professional on a Win7 SP 1 64 Bit

    May I ask you for your system details?


    Matthias Gross - Developer and company owner GHL Matthias Gross GmbH & Co.KG Germany www.aquariumcomputer.com

  • Friday, August 17, 2012 9:37 PM
     
     

    just to make sure: we are talking about VS 2012 RTM (released this Wednesday - 15. Aug. 2012)

    Yes.

    maybe the system configuration is important:
    I have German VS 2012 Professional on a Win7 SP 1 64 Bit
    May I ask you for your system details?

    Sure, I have VS2012 Ultimate installed on a clean Win7 x64 SP1
    English.

    You have installed on a system that hasn't had any beta or RC version
    of VS2012 on it?

    Dave

  • Saturday, August 18, 2012 7:00 AM
     
     Answered

    Thanks for the reply. There was no VS 2012 beta or RC installed before. Only VS 2010 and VS 2008.

    Finally I found someone in the web with a similar problem and this gave me the solution:

    I deleted the toolbar cash files, after restarting VS 2012 they were created again -> all expected tools are shown now!

    Thanks to this blog:

    http://www.dotnetthoughts.net/2011/02/28/controls-toolbox-not-showing-in-visual-studio-2010/

    I hope MS looks into this issue, it should not happen that the toolbox has not the correct content directly after a fresh installation.


    Matthias Gross - Developer and company owner GHL Matthias Gross GmbH & Co.KG Germany www.aquariumcomputer.com

    • Marked As Answer by MatthiasGross Saturday, August 18, 2012 7:01 AM
    •  
  • Wednesday, October 24, 2012 1:34 PM
     
     

    Hi Matthias,

    Many thanks to point out the workaround, i was facing the same problem.



    Fred


    • Edited by Fred-Armoni Wednesday, October 24, 2012 1:36 PM
    •