Solved

MFC VC6++ ActiveX create (new)

Posted on 2000-04-10
2
374 Views
Last Modified: 2010-04-10
What I am trying to do, is: I am creating a custom ActiveX, with 2 main classes, CEMDELAXCtrl (control class of ActiveX) and my own dialog class CDlgEmb. Now, this class (the latter) generates (fires) an event at some point, and I need to transfer this 'firing' to the ActiveX control class (CEMDELAXCtrl), because I have named 2 events in this class, which will eventually be available to the user. How do I do it?
0
Comment
Question by:patrickz
[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 Comments
 
LVL 3

Expert Comment

by:mnewton022700
ID: 2702696
Does your dialog have access to your control class. If so, you could simply call FireEvent on your control class.

If not, is your control the parent of your dialog? If so, you can get a pointer to it by casting GetParent().
0
 

Accepted Solution

by:
yuxiliu earned 50 total points
ID: 2720500
way 1.when you insert ACX to our project, wrapper class derived from CWnd, you just need to using:
DECLARE_MASSAGE_MAP() in class declaration
and
BEGINE_MESSAGE_MAP()
// put your message here
END_MESSAGE_MAP()
then call SendMessage or Posmessge to that control

way 2. put ON_MESSAGE(YOURMESSAGE, MESSAGEHANDLER) in when you write your activex Control
then send message to your control

0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

734 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