My experience with Borland C++ Builder is that BCB puts a declaration in the form's header file and opens up the coding window in the .cpp file ready for coding.1. Headers files are not needed for OOP-Design
My understanding of programming, and the way I have taught it, is that the header file is primarily for declarations not for a project's ("solution" as VC++ calls it) code.
2. The reason why the implementation of the managed-windows-forms C++/CLI is in the header file is, that the windows-forms designer can work probably (that means you can either change in the designer or change in the code; the changes are reflected in both parts; there are no misterious files anymore)
-- Greetings Jochen Kalmbach Microsoft MVP VC++ My blog about Win32 and .NET http://blog.kalmbachnet.de/ PS: Please mark an answer as "answered" if it helped!!!

Poor Program Design?
gd2q
We are using header files in C, C++ and in the C++ extension C++/CLI. There is no need for me to explain why header files are useful. (see Stroustrup, The C++ Programming Language, 9.2.1 Header Files, 9.2.3 The One-Definition Rule).
< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Griffonbait has a point but it is not necessary to use OOP to explain the problem. I’m also confused to see in the header file (e.g. form1.h) “project code”. Because the code is strictly for the form, means the GUI, I can tolerate that. But I agree it looks odd. I would have added at least an additional .cpp file with all method implementations of the form class. Maybe someone from VC++ Compiler Team can give us a reasonable explanation.
I can not see any major design problem. Actually, it is even clever to put the project namespace into the header file. It just looks new and a little bit different. I admit, I used the Borland C++Builder in the past. Maybe, I am little bit biased.
gaunmanuel
DennisCIS
Matthew Mickelson
Chook_rl
In my recent (read within the last week) move from Borland C++ Builder to MS Visual C++ I have noticed a strange way in which Visual C++ automatically starts up a method in the form's header file. That is, when I double click on say a button on a form in design view Visual C++ opens up the "click" method in the form's .h file ready for the programmer to write the code.
My experience with Borland C++ Builder is that BCB puts a declaration in the form's header file and opens up the coding window in the .cpp file ready for coding.
My understanding of programming, and the way I have taught it, is that the header file is primarily for declarations not for a project's ("solution" as VC++ calls it) code.
Can anyone enlighten me or is MS VC++ promoting poor program design
Jon Voigt
http://www.codeproject.com/dotnet/vs_templates.asp
Changing the VC++ templates and the scripts might help. But I'm not really sure. I never did that and I would have to read more to understand.