

NET cross-language development means that you could just develop your user interface in C# and work with business objects written in C++.

You’ll do better with the sample code I provide with this column. They even forgot to make the simple change that takes away the ugly black command prompt in the background behind your Windows application when it runs. But you get no help in building your user interface at all. It creates a form with a menu and a few controls, so you can see where to hand-add your own code. Don’t get too excited though: there are no steps to this wizard, and it doesn’t do very much. You copy some folders from the MSDN CD or DVD to specific places on your hard drive, and the next time you choose File, New Project you have an extra choice under C++: Managed C++ Windows Forms Project. It’s only fair to mention that MSDN has a sample of a Customization project called the ManagedCWinFormWiz. Along the way you’ll get some insight into the differences between C# and C++. In this column, I’m going to show you how to build your user interface in C#, then do a little editing to turn it into a 100% C++ application. It’s easily accessible within files you probably have open anyway, and that means it’s easy to copy. NET, the code generated by the designers isn’t hidden somewhere, or generated only when you build. And at the moment, they only generate C# or VB.NET code. All the visual designers do is generate that code for you behind the scenes. But we also remember that there was always another way to make our user interfaces, creating buttons and labels and the like in code, and setting their size and position with lines of code. Old timers like me remember that the name Visual C++ comes from just that capability. What you can’t do is use the visual designers to drag, drop, and arrange your buttons, labels, and so on if you’re working in Visual C++. Most people will tell you that you can’t build a Windows Forms application in Visual C++.

From Kate Gregory’s Codeguru column, “ Using Visual C++.
