How to do global pointer , which indicates on the second form ?
If I want e.g. invoke another form I do it like this :
private: System::Void menuItemDlg_Click(System::Object * sender,
System::EventArgs * e)
{
DIALOG1 *myDlg = new DIALOG1;
myDlg->Show();
}
but I want to use "myDlg " in all functions my MainForm. How to declare
myDlg as global pointer?
Michiel - 10 Jun 2004 09:40 GMT
> How to do global pointer , which indicates on the second form ?
>
[quoted text clipped - 13 lines]
> but I want to use "myDlg " in all functions my MainForm. How to declare
> myDlg as global pointer?
Why do you need a global for this ? Why not just make a member ?
Outside any function, but inside the class :
DIALOG1* myDlg;
And then in the MainForm constructor :
myDlg=new DIALOG1();
Lupina - 10 Jun 2004 12:17 GMT
That's right.
Great Thanks :)