Click here to Skip to main content
11,436,156 members (62,708 online)
Click here to Skip to main content

ClassWiz: A VS.NET addin that provides a classwizard similar to that in VC++ 6.0

, 29 Jun 2003 CPOL
Rate this:
Please Sign up or sign in to vote.
A VS.NET addin that provides a classwizard similar to that in VC++ 6.0
<!-- Add the rest of your HTML here -->

Sample screenshot

Introduction

I wrote the classwiz addin to get a class wizard similar to that in Visual C++ 6.0 in VS.NET 2003. The main functionality which I needed was to be able to override any virtual function, not just a small set of functions in a subset of base classes which VS.NET 2003 currently allows. I felt quite odd why the functionality to override functions like that in VC#.NET is not available for VC++.NET. Luckily VC++.NET provides lot of control through automation that makes it not very difficult to implement such a feature through custom addins. ClassWiz relies heavily on VC++ code model to do its job. Currently, the addin is quite useful to automate overriding of virtual functions for any custom class. Later I want to enhance the addin to provide more functionality like overriding window messages and commands.

How to Use

Here are the few simple steps to use the addin.

  1. Download the demo project and extract ClassWiz.dll
  2. Register classwiz.dll using regsvr32 classwiz.dll from command line.
  3. When you launch VS.NET 2003 you will see a new option called "Class wizard" within the Tools menu. Currently the addin does not work for VS.NET 2002.
  4. Selecting the menu option will bring the dialog box shown in the image
  5. The top tree view shows the base classes of a selected class and the bottom tree view shows the derived classes
  6. You can highlight a function in the top treeview and click on add function to override the function in your derived class
  7. You can also delete a function by clicking the "Delete Function" button

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Rama Krishna Vavilala
Architect
United States United States
No Biography provided

Comments and Discussions

 
QuestionCan this Class Wizard work on the new Visual Studio 2008 for MFC Pin
JPM200930-Oct-08 14:31
memberJPM200930-Oct-08 14:31 
Questiongood job but... Pin
hsm22-Nov-06 4:55
memberhsm22-Nov-06 4:55 
Generalcome this way Pin
ccppca24-Feb-05 5:50
memberccppca24-Feb-05 5:50 
GeneralRe: come this way Pin
John M. Drescher3-Feb-06 12:22
memberJohn M. Drescher3-Feb-06 12:22 
QuestionHow to generate a App Wizard similar to ClassWiz? Pin
FranzKlein1-Dec-04 6:51
memberFranzKlein1-Dec-04 6:51 
GeneralBooks for Visual C++ 2003 IDE Pin
Vikash Dubey27-Sep-04 21:39
memberVikash Dubey27-Sep-04 21:39 
GeneralUsing MFC in ADD-Ins Pin
FranzKlein21-Sep-04 2:26
memberFranzKlein21-Sep-04 2:26 
GeneralRe: Using MFC in ADD-Ins Pin
Anna-Jayne Metcalfe3-Jan-06 1:30
memberAnna-Jayne Metcalfe3-Jan-06 1:30 
My ResOrg.NET add-in does this, but I really wouldn't recommend this approach for new code.

You are far better using WTL 7.5 than MFC in an add-in environment. It's lightweight, just as capable and straightforward if you know MFC already.

Anna Rose | [Rose]

Currently working mostly on: Visual Lint Cool | :cool:

Anna's Place | Tears and Laughter

"Be yourself - not what others think you should be"
- Marcia Graesch

"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.

GeneralDoesn't work Pin
Nikolay Unguzov21-Jan-04 4:47
memberNikolay Unguzov21-Jan-04 4:47 
GeneralRe: Doesn't work Pin
JabraJabra23-Jan-05 6:52
memberJabraJabra23-Jan-05 6:52 
GeneralRe: Doesn't work Pin
attempter14-Apr-05 9:58
memberattempter14-Apr-05 9:58 
GeneralRe: Doesn't work Pin
John M. Drescher3-Feb-06 12:35
memberJohn M. Drescher3-Feb-06 12:35 
QuestionHow to make it work on VS.NET 2002? Pin
Agent of FBI3-Oct-03 15:41
memberAgent of FBI3-Oct-03 15:41 
GeneralDear Code programmers Pin
Tarek A.4-Jul-03 6:43
memberTarek A.4-Jul-03 6:43 
GeneralRe: Dear Code programmers Pin
jhaga4-Jul-03 7:11
memberjhaga4-Jul-03 7:11 
GeneralRamayana Pin
Nishant S30-Jun-03 20:15
editorNishant S30-Jun-03 20:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150428.2 | Last Updated 30 Jun 2003
Article Copyright 2003 by Rama Krishna Vavilala
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid