Solved

ActiveX Events

Posted on 1997-12-19
4
887 Views
Last Modified: 2013-11-19
How do I get the ActiveX Events on a CView, NOT A DIALOG box? I have a control that sends click events(VB) and I need to trap them and process, but I can't get click events without ClassWiz and ClassWiz does not show ActiveX events on CView
0
Comment
Question by:SirThomas
  • 2
4 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1312681
You'll need to do these by hand. If you take a look at the generated maps for the dialog, you can pretty much copy them directly into your view. Look for DECLARE_EVENTSINK_MAP() in your .h, and BEGIN_EVENTSINK_MAP() in your .cpp files.

0
 

Author Comment

by:SirThomas
ID: 1312682
I thought of that when I copy the lines from the dlg to my CView class I get the following errors:

D:\ActiveX Test1\ActiveX Test1View.cpp(131) : error C2509: '_GetBaseEventSinkMap' : member function not declared in 'CActiveXTest1View'
D:\ActiveX Test1\ActiveX Test1View.cpp(131) : error C2509: 'GetEventSinkMap' : member function not declared in 'CActiveXTest1View'
D:\ActiveX Test1\ActiveX Test1View.cpp(131) : warning C4273: 'protected: static struct AFX_EVENTSINKMAP const  CCmdTarget::eventsinkMap' : inconsistent dll linkage.  dllexport assumed.
D:\ActiveX Test1\ActiveX Test1View.cpp(131) : error C2491: 'CActiveXTest1View::CView::CWnd::CCmdTarget::eventsinkMap' : definition of dllimport static data member not allowed

I looked in the ON-Line help and these functions GetEventSinkMap are not even defind.

Next Guess
0
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1312683
It seems that you didn't copy the part in the header file.
0
 

Author Comment

by:SirThomas
ID: 1312684
You were correct. I must have been missing one line. It took 5 time to get it to work. I wish the MS product was complete.
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Smart Camera scanning and reading information 3 106
FizzBuzz challenge 9 81
fix34  challenge 9 121
scoreUp challenge 14 63
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question