Venturio
March 14th, 2009, 04:35 PM
Hi,
I'm new to C++ (and these forums), but I have some experience with Java, PHP and several other languages though.
I made a Windows forms application and would like to know an easy way to update the form controls of the mainform, from any cpp file, function, etc... in my project.
For example, a function (outside the form header file) should be able to update a textfield in the form, during its execution. What would be the best way to do this in C++?
In the main function, I tried this:
MainForm^ mainform = gcnew MainForm();
Application::Run(mainform);
mainform->txtUpdates->Text = "test";
But this doesn't work. Can anyone help?
Thanks in advance!
I'm new to C++ (and these forums), but I have some experience with Java, PHP and several other languages though.
I made a Windows forms application and would like to know an easy way to update the form controls of the mainform, from any cpp file, function, etc... in my project.
For example, a function (outside the form header file) should be able to update a textfield in the form, during its execution. What would be the best way to do this in C++?
In the main function, I tried this:
MainForm^ mainform = gcnew MainForm();
Application::Run(mainform);
mainform->txtUpdates->Text = "test";
But this doesn't work. Can anyone help?
Thanks in advance!