Button handler

Hi,

For example, I have a header file name form1.h. In this header file, there's a part for a button1 click handler. And then, I have a c++ file docreate(). How do I call the docreate() at the button1 click handler. Please help.

1
2
3
4
5
6
#pragma endregion
private: System::Void Form2_Load(System::Object^  sender, System::EventArgs^  e) {
			 }
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
                         }
};
You call it like any function.
1
2
3
4
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
{
  docreate();
}

Of course you need to include the header file and add the .cpp to the project.
Thank you for your response!
Topic archived. No new replies allowed.