Solved

VC++ Class Wizard

Posted on 2001-08-21
17
1,110 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
Comment Utility
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
Comment Utility
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
Comment Utility
>>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
 

Author Comment

by:string6
Comment Utility
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
Comment Utility
When I click view menu, class wizard menu is grayed out.
It does not accept click.
0
 

Author Comment

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

Expert Comment

by:jkr
Comment Utility
>>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
Comment Utility
When I click view menu, class wizard menu is grayed out.
It does not accept click.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 86

Expert Comment

by:jkr
Comment Utility
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
Comment Utility
Thanks I notices that my stuff is being posted over and over,
0
 

Author Comment

by:string6
Comment Utility
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
Comment Utility
>>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
Comment Utility
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
Comment Utility
Thank you for your help!!
0
 
LVL 86

Expert Comment

by:jkr
Comment Utility
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
Comment Utility
Actually that was good idea, but it still forced me to do Dialog based, which was a problem.
0
 

Expert Comment

by:valentins
Comment Utility
Just add an empty resource file to your project.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now