Solved

VC++ Class Wizard

Posted on 2001-08-21
17
1,113 Views
Last Modified: 2013-12-03
I have always liked hand written code a lot better than the code generated from wizard kind of thing.  However, now I have come to the time that I have to use class wizard of VC++.  The project I am workng on is plain hande crafted code.  The problem is that the Class Wizard menu is grayed out.  Can anybody tell me how to activate this thing?  I started this project from VC++ not using App Wiz. I manually imported MSFlexGrid into the project.  As I am trying to write event handlers and stuff like that, I realized that I cannot find enough information about it from anywhere.  Thus I decided to use Class Wiz, but I cannot get it to run - The menu is disabled.  My project doesn't have .CLW file.  Does anyone have any idea about this?  
0
Comment
Question by:string6
  • 10
  • 6
17 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 6410108
Well, the steps for rebuilding the .clw file might help:

To rebuild the ClassWizard file

Delete your project's .clw file.


On the View menu, click ClassWizard.
If ClassWizard appears, the project for which you deleted the .clw file is not the active project. From ClassWizard's Project drop-down list, select the project for which you want to rebuild the .clw file.

If ClassWizard asks you to close any files, close ClassWizard, close the files, and then restart ClassWizard.
A message box asks if you want to rebuild the ClassWizard file from your source files.

Click Yes.
The Select Source Files dialog box appears.

Use the Add and Add All buttons to transfer all of the project's .h and .cpp files, and the .rc file from the File Name list to the Files In Project box. Click Remove to remove any files other than .h, .cpp, or .rc from the Files In Project box.


Click OK.
ClassWizard appears and generates a new .clw file.

Click OK to close ClassWizard.

(from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_rebuilding_the_classwizard_.28...clw.29_.file.asp)
0
 

Author Comment

by:string6
ID: 6410175
The problem is I don't have .CLW file to delete, and class wizard menu is not activated - grayed out.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6410186
>>The problem is I don't have .CLW file to delete

I know - start with

On the View menu, click ClassWizard.

A message box asks if you want to rebuild the ClassWizard file from your source files.

Click Yes.
The Select Source Files dialog box appears.

Use the Add and Add All buttons to transfer all of the project's .h and .cpp files, and the .rc file
from the File Name list to the Files In Project box. Click Remove to remove any files other than .h,
.cpp, or .rc from the Files In Project box.


Click OK.
ClassWizard appears and generates a new .clw file.

Click OK to close ClassWizard.
0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

Author Comment

by:string6
ID: 6410222
The problem is I don't have .CLW file to delete, and class wizard menu is not activated - grayed out.
0
 

Author Comment

by:string6
ID: 6410242
When I click view menu, class wizard menu is grayed out.
It does not accept click.
0
 

Author Comment

by:string6
ID: 6410257
When I click view menu, class wizard menu is grayed out.
It does not accept click.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6410296
>>and class wizard menu is not activated - grayed out

Do you have MFC/ATL in your project? If not, add it, as the ClassWizard only works with these - see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_using_classwizard.asp
0
 

Author Comment

by:string6
ID: 6410299
When I click view menu, class wizard menu is grayed out.
It does not accept click.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6410303
PS: Try to avoid pressing your browser's 'refresh' button - better use the 'reload question'
link provided in the upper right corner of the page...
0
 

Author Comment

by:string6
ID: 6410307
Thanks I notices that my stuff is being posted over and over,
0
 

Author Comment

by:string6
ID: 6410320
I use MFC classes (like CWnd, CButton stuff like that) and I even imported an ActiveX control, MSFlexGrid.
Yes it is MFC project, but I did not use app wizard.

By the way, du you know how to delete duplicate postings?
0
 
LVL 86

Accepted Solution

by:
jkr earned 300 total points
ID: 6410941
>>By the way, du you know how to delete duplicate postings?

There is none :o)

BTW: A solution that often helps for this kind of problem is to delete the .ncb and .opt files
0
 

Author Comment

by:string6
ID: 6410966
My bigest problem is that I am trying to use ActiveX control in plain CWnd derived window, not CDialog.  I thinks the Class Wizard wants me to use them only in CDialog. using resource editor.  But, I cannot use CDialog in this project.  I just decided that I am not going to process events.  I will be processing WMs instead.
0
 

Author Comment

by:string6
ID: 6410969
Thank you for your help!!
0
 
LVL 86

Expert Comment

by:jkr
ID: 6410999
So, did deleteing the files help?

(Haven't worked with the CW for a while, but I remember that we once had a similar problem and solved it this way)
0
 

Author Comment

by:string6
ID: 6411230
Actually that was good idea, but it still forced me to do Dialog based, which was a problem.
0
 

Expert Comment

by:valentins
ID: 8180575
Just add an empty resource file to your project.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question