Hi R.!
In a VS2005 Windows Forms Application I have an ordinary class like
class C{
int x;
public:
C(int x_):x(x_) { }
void display()
{
// Here I want to access a TextBox Form member
// Form???->textBox1->Text=(x).ToString();
}
};
In one of its member function I want to do some output to a TextBox on a
Form, like in the display function above.
You should provide a property in your Form-class which returns the stuff
from your private member:
class FormXxx : public Form
{
public:
property String^ MyData
{
return textBox1->Text;
}
property void MyData(String ^text)
{
textBox1->Text = text;
}
};
Then you can access it from outside via:
// Here I want to access a TextBox Form member
Form???->MyData = (x).ToString();
You also can cosider to pass paramters in the constructor of your Form...
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/