Event handler wizard question
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Event handler wizard question

  1. #1
    Join Date
    Jun 2011
    Posts
    30

    Event handler wizard question

    For 2005 Visual Studio (v.8) in the wizard for adding an event handler, I found info at this link
    http://msdn.microsoft.com/en-us/libr...(v=vs.80).aspx
    that is not the case with my 2005 VS ?

    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.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,249

    Re: Event handler wizard question

    Are you using the Visual Studio Express version?

  3. #3
    Join Date
    Jun 2011
    Posts
    30

    Re: Event handler wizard question

    Quote Originally Posted by Arjay View Post
    Are you using the Visual Studio Express version?
    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.

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,249

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center