Using Custom Controls in a Managed C++ Application

In order to test the control you just created, you will have to create an application that uses the control. Select New, Project from the File menu. Select Visual C++ Projects from the list of project types and select the Managed C++ Application template from the list of available templates. In order to prevent having to switch back and forth between the two projects, make sure the radio button labeled Add to Solution is selected. Give your project the name CPPTestHarness and click OK to create the project.

The first thing you should do is set some of your project settings so that the two projects can work together. First, change the output path for the ShapeControl project so that the final ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.