ClassWizard issues

This is a discussion on ClassWizard issues within the Windows Programming forums, part of the Platform Specific Boards category; Ok calling it a wizard sort of puts into your head the idea that it is a very powerful and ...

  1. #1
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590

    ClassWizard issues

    Ok calling it a wizard sort of puts into your head the idea that it is a very powerful and intelligent entity. It's not.

    I keep having problems creating classes.

    Here is what I'm doing.


    1. Create a new dialog in the resource editor.
    2. Right click it, select ClassWizard.
    3. ClassWizard pops up and says there is no class for resource ID IDD_DIALOG1 or the ID of my dialog if I've changed it.
    4. I select create new class.
    5. I put in the name as CMyDialog, base as CDialog.
    6. Error message comes up and says cannot open file CMyDialog.cpp or CMyDialog.h - and thus it DOES NOT ADD the class to the wizard...you can't select it.
    7. However, when I look in the directory - and in the project those files are there and they are complete.

    Why does this happen? It seems to happen more when I attempt to put a C in front of my class name. But it keeps happening more and more which cause me to have to remove the two files from the project, close their windows in the IDE, and physically erase the frieking files. Then when I open ClassWizard it can create another CMyDialog....but it prob will fail again with the same error.

    Anyone else have this problem. Is it a bug in ClassWizard?
    Sometimes MSVC says this same thing when I try to compile. Cannot save such and such a file because it is in use. After it says this, I compile and everything is ok.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I always do it this way

    Add Class->MFC Class->ClassName:"CMyDialog",BaseClass:"CDialog"(leave the filenames as they are:MyDialog.h/.cpp)->Finish

    That creates the dialog calss and resource and forgoes any problems.

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Yeah that's what I've been doing as well. It seems to work better.

    I guess its a bug that got through, or they knew about but figured who would care.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. iterator issues
    By Elkvis in forum C++ Programming
    Replies: 10
    Last Post: 02-05-2009, 08:52 PM
  2. issues
    By OrAnGeWorX in forum C Programming
    Replies: 35
    Last Post: 11-18-2008, 11:18 PM
  3. SQL Connection issues
    By jverkoey in forum Tech Board
    Replies: 4
    Last Post: 02-17-2005, 06:52 AM
  4. Multi-platform support issues.
    By OOPboredom in forum C Programming
    Replies: 2
    Last Post: 04-27-2004, 06:41 PM
  5. hexdump issues
    By daluu in forum C Programming
    Replies: 2
    Last Post: 03-04-2003, 08:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21