Dave's Brain

Browse - programming tips - how to do visual stdio class wizard stuff in visual studio 2005

Date: 2009oct22
Language: C/C++

Q.  Visual Studio 6 had "Class Wizard" but Visual Studio doesn't.
How do I accomplish the things that Class Wizard did?

A.  Create a class for a dialog:

	Right-click on your a part of your dialog where there is no
	control and select "Add Class..."

Make a variable that's tied to a control:

	Right-click on a control and select "Add Variable..."

Make a method for a an event for a control (eg OnChange)...

	Right-click on a control and select "Add Event Handler"

or

	Right-click on a control and select "Properties"
	then click on lighting bolt icon at the top.

Make a method for a Windows message sent to the dialog:

	Right-click on your a part of your dialog where there is no
	control and select "Properties"

	Click on the right-most icon at the top for as list of Windows
	messages.

Make a method that overrides a CDialog method (eg OnInitDialog()):

	From the main menu select:
	View > Class View

	Find your class (eg CMyDialog) in the Class View.
	(You type the first view letters into the search box.)

	Right-click on your class and select Properties.

	Click on the 3D cube icon at the top to access overrides.

	(In my opinion the old Class Wizard was nicer for this because
	you saw the Windows messages and overrides together without
	having to guess which was which.)

Make your own method or variable in the dialog:

	In the Class View right-click on your class and
	select "Add..."

	(Or you can just edit the code.)
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2010, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.