Solved

VC++ Class Wizard

Posted on 2001-08-21
17
1,121 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared 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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

690 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