Solved

MFC VC6++ ActiveX create (new)

Posted on 2000-04-10
2
335 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
2 Comments
 
LVL 3

Expert Comment

by:mnewton022700
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now