Is it possible to delete an event handler using .NET framework?

D

Daniel Kim

I'm using .NET VC++, and when I add an event handler, everything looks
good - it shows up in my class browser, etc.

But I could not figure out how to delete the EVENSINK!! The only way seems
to be if I go and remove the lines from the .h and .cpp code manually... I
am thinking that I must be missing something... Because in VC6, I was able
to delete the event handlers using the Class Wizard...

I would appreciate any help on this.

--Daniel
 
G

Gary Chang

Hi Daniel,
But I could not figure out how to delete the EVENSINK!! The only way seems
to be if I go and remove the lines from the .h and .cpp code manually... I
am thinking that I must be missing something... Because in VC6, I was able
to delete the event handlers using the Class Wizard...

yes, I am afraid that we don't have the "classic" VC6 Class Wizard under
the VS.NET IDE, now the new "Class Wizard" is splitted into sevaral places,
such as "Add Member Function Wizard" and "Add Member Variable Wizard" ...
however it still can delete the message event handlers in the VS.NET IDE.

I don't know how do you add an event handler in the VS.NET IDE, if you do
that by right clicking on the target class(Class View) and selectting the
"Properties" menu item and using "Messages"(the 5th button from the left)
button, you can find the "<Delete> On...." item in the entry of each
message handler which had been subclassed.


Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top