Visual C++ Class Designer | CodeGuru

Visual C++ Class Designer

Back in 2005, when covering the upcoming release of Visual C++ 2005, the use of the Class Designer to document and create C++ code was discussed, but unfortunately this functionality was pulled in the Beta 2 release of Visual C++ 2005. With Visual C++ 2008, support for C++ in the Class Designer is back, but […]

Written By
CodeGuru Staff
CodeGuru Staff
Oct 2, 2007
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Back in 2005, when covering the upcoming release of Visual C++ 2005, the use of the Class Designer to document and create C++ code was discussed, but unfortunately this functionality was pulled in the Beta 2 release of Visual C++ 2005. With Visual C++ 2008, support for C++ in the Class Designer is back, but with a few limitations. Getting the bad news out of the way first, the biggest surprise is that managed C++ classes are not supported by the Class Designer, and only native types can be displayed. The second major limitation is that the Class Designer has no support for modifying the displayed types using the Class Designer surface, unlike C# and Visual Basic.NET which support a bi-directional design experience where modifications in the Class Designer are reflected in code.

With these major limitations out of the way, it’s worth looking at how much the Class Designer can actually do for C++ developers. The range of native C++ constructs that the Class Designer can display is quite impressive. Starting with a simple example, consider the following native C++ type definition:

class NativeClass
{
public:
   NativeClass(void) {};
   ~NativeClass(void) {};
   int PublicInt;
   virtual char* GetString(int number) {return NULL;}
   ///<summary>Always returns zero</summary>
   inline int GetInt() {return 0;}
private:
   double PrivateD;
};

To view this type in the Class Designer, simply select the header file in Solution Explorer, and click the view Class Diagram button, which is located in a toolbar at the top of the Solution Explorer window, as shown in Figure 1.

Figure 1: Basic Class Diagram View

Figure 1 shows the default display for a type on the Class Designer surface, and the Class Designer toolbar is also visible in Figure 1. As is apparent, the default view is fairly useless, and it will generally be necessary to change the display layout to get some useful information. By clicking on the small double-arrow head located near the name of the class (circled in Figure 2), detailed information on the member variables and methods of the class can be seen, as shown in Figure 2.

Figure 2: Class Diagram Detailed View

Figure 2 also shows the Properties window and Class Details windows displayed, and with this information, the visibility, return type, and summary of all methods and member variables can be seen. When a method is selected in the Class Details window, further information about whether the method is virtual or inline can be seen in the Properties window. The detailed class information in Figure 2 is achieved by selecting the Display Full Signature option from the Class Designer toolbar. The other two display options are Display Name, which only shows method and member variable names as the option suggest, and Display Name and Type, which shows all the information in Figure 2 with the exception of parameters to methods.

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.