• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Adding a view class to class wizard

I am using 2 different views in a CFormView based application but I can only control one of them (the original) from Class Wizard.  Do I have to add the new view class manually somehow to Class Wizard to control it?  Is this possible?

Thanks.
0
klingej
Asked:
klingej
  • 2
1 Solution
 
captainkirkCommented:
How did you create the second view class???

Here's a tip: you need to make sure that all of the MFC "insert blocks" exist in your source files, like the BEGIN_MESSAGE_MAP / END_MESSAG_MAP pair in your .cpp file and the AFX_MSG block and the DECLARE_MESSAGE_MAP and AFX_INSERT_LOCATION macros in your .h file...

try that and then delete the .clw file then rebuild the .clw file by attempting to get into Class Wizard - it will ask you what files you want to use to rebuild the class info file...


hope that helps...
0
 
klingejAuthor Commented:
That worked fine. Is there a way to accomplish the same thing without deleting the .clw file?  Can you just add source files to what class wizard includes?

Thanks.
0
 
captainkirkCommented:
Yes, your source files should be included in the project in order to even compile and be included in the various project views (Class View, File View, Resource View) ... glad it helped, anyway...

0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now