2

I'm running simple dialog on CLR where I fill some textBoxes and press push, So but I need to know when I pressed push.

Here is how I run dialog :

void CFloBossOPCDlg::OnBnClickedButton3()
{
    NewBoi ^ nb = gcnew NewBoi();
    nb->Show();

I can't declare nb as global variable and even I can't declare nb as part of CFloBossOPCDlg so how can I override close event to understand when I need to get filled textboxes ? Thank you.

cnd
  • 32,616
  • 62
  • 183
  • 313

2 Answers2

1

You can use gcroot to declare handles in native types.

http://msdn.microsoft.com/en-us/library/481fa11f(v=vs.80).aspx

Muhammad Hasan Khan
  • 34,648
  • 16
  • 88
  • 131
0

You can add an event handler for the Closed event on the nb object.

Kieren Johnstone
  • 41,277
  • 16
  • 94
  • 144