Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ActiveX Events

Posted on 1997-12-19
4
Medium Priority
?
895 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

650 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