Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 15th, 2003, 02:08 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Norway.
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?
Reply With Quote
  #2 (permalink)  
Old October 15th, 2003, 09:04 AM
Authorized User
 
Join Date: Aug 2003
Location: Cary, NC, USA.
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

Reply With Quote
  #3 (permalink)  
Old October 16th, 2003, 03:32 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Norway.
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
Reply With Quote
  #4 (permalink)  
Old October 16th, 2003, 03:59 AM
Authorized User
 
Join Date: Jun 2003
Location: , , Norway.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:02 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.