hellhammer
October 21st, 2004, 01:01 PM
I've just started to program Windows Forms apps in VC++ .NET.
I have prior experience in developing WinForms apps in C# .NET, and the confusion that leads to my question is rooted in the jump from C# to C++.
In C#, when I add a button to the form and create an event handler function this function is visible in my code file.
However, in VC++, the designer is the ".h" file and the InitializeComponent function is also in the ".h" file.
The event handler function is also added in the ".h" file.
My questions are the following:
1. What code is added in the project's ".cpp" file? By that, I mean to ask, what part of my program should be coded in the .cpp file?
2. How do I access the components, say btn1, btn2 etc from the .cpp file?
I have prior experience in developing WinForms apps in C# .NET, and the confusion that leads to my question is rooted in the jump from C# to C++.
In C#, when I add a button to the form and create an event handler function this function is visible in my code file.
However, in VC++, the designer is the ".h" file and the InitializeComponent function is also in the ".h" file.
The event handler function is also added in the ".h" file.
My questions are the following:
1. What code is added in the project's ".cpp" file? By that, I mean to ask, what part of my program should be coded in the .cpp file?
2. How do I access the components, say btn1, btn2 etc from the .cpp file?