Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2003, 02:08 AM
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default ClassWizard can't find Class

Hi.

I have a project i VC++ 6 where I have some problem with the ClassWizard. When I try to edit something on a dialog in the dialogeditor (via the ClassWizard), a message appears saying that the ID that I try to open is " a new resource" and that I might want to create a new class for it or select an existing class. I would like to choose an existing class, but the problem is that the class I want to choose is not available through the CW.

This I find odd, because the dialog and its corresponding class works fine when code is compiled. I suspect it has something to do with the fact that I had to merge to versions of the project earlier.

Does anyone have any suggestions on how to go about to fix up my project so that ClassWizard can see all the classes in it?
 
Old October 15th, 2003, 09:04 AM
Authorized User
 
Join Date: Aug 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you see the class in the ClassView tab? If not try a couple of things. First go to the FileView tab and delete the header file and source file for that class. Then add them back in from the file location (the problem could be stemming from the fact that the files were added to the project from another location). Then do a Build | Rebuild All. If it still does not work, then close the workspace and delete the projects "NCB" file. This will cause the project to have to rebuild the ClassView tree. Then open the project back up.

If all else fails, you can go into the "CLW" file and manually edit it. It is fairly self-explanatory. The file keeps a total number of classes count, and info. about each class.

Hope this gives you a couple of things to try.

Andy

 
Old October 16th, 2003, 03:32 AM
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your suggestions.

The funny thing however, is that I CAN see the class in the classview tab, and the program works fine also. It is just when I want to use the Classwizard on that dialog I get the problem. The wizard does not display the appropriate class for connecting the resource ID to.

mvh
Gert
 
Old October 16th, 2003, 03:59 AM
Authorized User
 
Join Date: Jun 2003
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Andy, I was able to make it work by manually editing the "CLW" file as you suggested. Can you please help me identify some of the fields I had to put in there:

[CLS:CAperakLogDlg]
Type=0
HeaderFile=AperakLogDlg.h
ImplementationFile=AperakLogDlg.cpp
BaseClass=CDialog
Filter=D
VirtualFilter=dWC
LastObject=IDOK

What I need to know is this:
What is Type, and what values may this field have?
What is Filter, and VirutalFilter, and what values should I put here?
Does it matter what value the LastObject have?

Thanks in advance.

Gert





Similar Threads
Thread Thread Starter Forum Replies Last Post
Property access from Class within Partial Class zoltac007 C# 2005 0 December 1st, 2006 01:01 AM
Appletviewer can't find class...but IE works fine dperry BOOK: Beginning Java 2, JDK 5 Edition 0 July 7th, 2005 10:44 AM
Open Word Doc from Access - find, find next save donaldmaloney Access VBA 1 May 25th, 2005 11:09 AM
Create a find and a find and replace in VB.NET snowy0 VB How-To 0 January 26th, 2004 07:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.