G
Guest
I've managed to have my c++ CWinFormsDialog<...> class handle a standard
click event from my c# code as in:
http://msdn2.microsoft.com/en-us/library/af8w7d7d(VS.80).aspx
Is it possible to handle you own custom events with your own EventArgs in
the same way?
I get all sorts of strange compilation errors when I try:
GetControl()->MyEvent += MAKE_DELEGATE(System::EventHandler,
OnMyEventHandler);
void MyClass::OnMyEventHandler(System::Object^ pSender,
MYUSERCONTROL::MyEventArgs^ pEventArgs)
{
....
}
error C2870: 'MYNAMESPACE' : a namespace definition must appear either at
file scope or immediately within another namespace definition
error C4694: 'MYNAMESPACE::HelperFunctions': a sealed abstract class cannot
have a base-class 'System::MulticastDelegate'
click event from my c# code as in:
http://msdn2.microsoft.com/en-us/library/af8w7d7d(VS.80).aspx
Is it possible to handle you own custom events with your own EventArgs in
the same way?
I get all sorts of strange compilation errors when I try:
GetControl()->MyEvent += MAKE_DELEGATE(System::EventHandler,
OnMyEventHandler);
void MyClass::OnMyEventHandler(System::Object^ pSender,
MYUSERCONTROL::MyEventArgs^ pEventArgs)
{
....
}
error C2870: 'MYNAMESPACE' : a namespace definition must appear either at
file scope or immediately within another namespace definition
error C4694: 'MYNAMESPACE::HelperFunctions': a sealed abstract class cannot
have a base-class 'System::MulticastDelegate'