views:

54

answers:

1

Hi, How do you remove a MFC command handler like ON_UPDATE_COMMAND_UI from a C++ file? I can't seem to find a way to do it thru Dev Studio. If you know how, please explain.

I am using VS 2008.

Thanks, Mike

+2  A: 

To create a handler, you used the drop-down list in the Messages list of the properties pane. When you didn't have a handler, the list had an entry something like <add> OnXxxUpdate. If you already have a handler, dropping down the same list will show a <delete> OnXxxUpdate -- click that. That just removes the entry in the message map -- you have to delete the function body manually.

Jerry Coffin
Just to clarify: You can do this from the Class View. AFAIK there is now way to remove a handler from the Resource View.
Dani van der Meer
Thanks both to Jerry and Dani for your answers. I see what you mean. I hope you have a great day!!!
Mike S