Jump to content
Software FX Community

adding event handler for custom command


User (Legacy)
 Share

Recommended Posts

Hi Avri

In order to catch the messages, before they are processed you need to

implement an EVENT_SINK_MAP into your programm. If you have the CFX example

you can find out how to looking at CfxMouse. You can find the enums for the

message somewhere in the .tlh or .tli file. Be careful, the enums are not

always in the right order (at least not when you use ActiveX). You might

have to just try out which one is right. They are called somethink like

CN_MOUSEMOVE, CN_LEFTBUTTONDBLCLK, etc.

By the way, do you know how to put a picture in the background or onto a

bar? I'm using the ActiveX, but DLL would also help me.

inside class declaration:

afx_msg void OnMouseMovingChart1(short x, short y, short FAR* nRes);

DECLARE_EVENTSINK_MAP()

inside class implementation:

BEGIN_EVENTSINK_MAP(CCfxMouse, CDialog)

//{{AFX_EVENTSINK_MAP(CCfxMouse)

ON_EVENT(CCfxMouse, IDC_CHART1, 25 /* MouseMoving */, OnMouseMovingChart1,

VTS_I2 VTS_I2 VTS_PI2)

//}}AFX_EVENTSINK_MAP

END_EVENTSINK_MAP()

ChrisJ

"Avri" <avri@metalink.co.il> schrieb im Newsbeitrag

news:GUOHK7AfBHA.1268@webserver1.softwarefx.com...

> Hi,

> Does any one knows how to catch the event handler for a user custom

command

> ?

>

> (I'm using chartfx server dll with mfc)

>

> 10x,

>

> Avri.

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...