How to use a separate .cpp file for my event function definitions in windows forms?
问题 I'm having trouble defining my C++ event functions in windows forms. I want to define my event functions (example: button click) in a separate .cpp file instead of doing all the function definitions in the windows forms .h file that's already full of generated code for the windows forms GUI. I tried doing this, Declaration inside the Form1.h class: private: System::Void ganttBar1_Paint (System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e); And this is the definition inside Form1