Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

VC++ Class Wizard

Posted on 2001-08-21
17
Medium Priority
?
1,129 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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 1200 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…

578 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