CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    3

    any experience with ON_EVENT_RANGE?

    is there any tricks in using ON_EVENT_RANGE ? for example, if i have a dialog box with 2 activex controls, i can do
    ON_EVENT(CTestView, 1113, 3 /* Change */, OnChangeTest, VTS_NONE)
    ON_EVENT(CTestView, 1114, 3 /* Change */, OnChangeTest, VTS_NONE)

    but
    ON_EVENT_RANGE(CTestView, 1113,1114, 3 /* Change */, OnChangeTest, VTS_NONE)
    doesn't seem to work.

    thanks in advance
    heidi


  2. #2
    Join Date
    May 1999
    Location
    MD
    Posts
    4

    Re: any experience with ON_EVENT_RANGE?

    The function that gets called by ON_EVENT_RANGE takes an additional parameter that contains the ID of the control that fired the event. You should change your ON_EVENT_RANGE to the following:
    ON_EVENT_RANGE(CTestView, 1113, 1114, 3, OnChangeTest, VTS_I4)
    You will also need to modify the OnChangeTest method to take in a long.

    Hope this helps,
    Brad


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured