4

I am getting ClassWizard startup error for my class in MSVC 2013.

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Failed to retrieve controls of dialog 'XYZ'.
    ---------------------------
    OK   
    ---------------------------

Then it opens but dialog controls and message handlers are not recognized.

The dialog uses all standard MFC controls.

All resource id values in resource.h are unique.

I tried to put marks like //{{AFX_DATA, {{AFX_MSG, etc. where appropriate. No effect.

I tried to generate a new class for the same dialog id. ClassWizard gives the same message while starting on the new class.

It seems like there is something it doesn't like in my project or resource files.

Any ideas? Is there a way to diagnose this thing? Thank you.

vt.
  • 1,325
  • 12
  • 27
  • Do you get the same message on a different project? Have you tried repairing Visual Studio? – rrirower May 27 '15 at 16:44
  • It works on other projects. – vt. May 27 '15 at 16:49
  • I don't know if it will help, but, in the past, I've enabled [project system logging](http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx) to diagnose other problems. – rrirower May 27 '15 at 17:02
  • Thanks, cool idea, I've actually tried this too. No messages from ClassWizard though. – vt. May 27 '15 at 17:08
  • There is no appropriate place to put `//{{AFX_DATA` and similar comments in Visual Studio 2010 and later. Those comments were used up to and including Visual Studio 6. – IInspectable May 27 '15 at 17:08
  • I would delete all pch, sdf, suo, ncb files and tried reloading the project again – cha May 28 '15 at 04:44
  • Deleting the files did not help. I've got a few "Exception from HRESULT: 0x8CE0000B" during the rebuild. – vt. May 28 '15 at 14:12
  • How did you fix this error @vt? – Gautam Jain Dec 09 '16 at 09:27

1 Answers1

1

This is possible if you are having the resources in a separate project while the associated classes (source code) are in different project.

Gautam Jain
  • 6,789
  • 10
  • 48
  • 67
  • This might've been the case. Thanks – vt. Dec 09 '16 at 14:40
  • For me it is the case, and I am getting this error on all classes. I wonder if it's possible to make the Class Wizard recognize it and work around that fact. – TonyP Jan 25 '23 at 09:13