If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Event handler wizard question

I'm wondering what I have set that's causing mine not to comply with the line 6, 2nd and 3rd sentences of the above link.

Mine does not show the EDIT CODE in the wizard when there is already an event handler. On mine there is no EDIT CODE, and if there's already a handler for that class, the ADD & EDIT is simply grayed out (disabled). I.e. I have to go hunt it down to find what's already there.

Re: Event handler wizard question

No it's the Pro Version, bought and paid for, albeit I got it late, about 3 yrs ago at a discount price. But it's a registered bonafide package.

It's not a big problem anyhow cause there really is no composite Class Wizard in this version like there was in VC 6, but it's rather spreadout over a few scenarios of right clicks. The specific scenario I'm referring to is when I have the resource up in the editor, in this case the MainFrame menu. I select a menu item, and right click, a drop down appears and one of the choices is "Add Event Handler". If I select this choice, I'm then taken to the Wizard popup where I can add an event handler to any Class in the list at right, by clicking "Add/Edit" code after selecting handler name etc. However if the class already has a handler for the selected msg etc, then the "Add/Edit" is grayed out (disbabled). There is no provision for only "Edit code" as said in the MSDN paper.

I suspect there is none in my version and MS has changed the wizard scenario so many times until they finally brought back in (2010 ??) that MSDN simply loss track of the situation.

Anyhow, just wondered if anyone else out there using VC 2005 had experienced this. Probably ain't that many of us using that version anymore. It's a good solid version though for a great price if you can still find um for sale.

Re: Event handler wizard question

You add event handlers by opening the resource editor and click on the control you wish to add the handler to. Next open the properties view (you can right clcik on the control and choose properties). In the properties view above the properties, you'll see about 4 icons and one of these ico s will be a little lightning bolt. Click on this icon and you get a list of all the events for the control. Select the event you want and follow the instructions for you to add a handler for you (I think you double-click in the handler column and it creates the handler). The event view is context based so the events will change based on the control that is highlighted. If you put the focus on the dialog, dialog events will be shown.

Try this out on a new project first to make sure it works. Then try it out on your project.