Jump to content
Software FX Community

RE: Custom Menu/Event Trapping

Software FX

Recommended Posts

You cannot trap the Menu event because this event is only fired when the programmer creates its own menu as opposed to customizing the chart menus through the commands interface. You will have to trap the UserCommand. We added some code that will let you know the point/series the user clicked on (-1 if the click was on the chart background) but you will have to wait for service pack

This is the code that you will need

<script language="javascript">


function CHART_HIWORD(lValue) {

nHi = (lValue & 0xFFFF0000) / 0x10000;





<script language="javascript">


function CHART_LOWORD(lValue) {

return(lValue & 0x0000FFFF);




<script language="javascript" for="Chart1" event="UserCommand(wParam, lParam, nRes)" >


lValue = Chart1.SendMsg(65,0,0);

nPoint = CHART_HIWORD(lValue);

nSer = CHART_LOWORD(lValue);

alert( "UserCommand ID = " + wParam + "\nnSeries = " + nSer + "\nnPoint = " + nPoint );




Juan Cegarra

Software FX, Inc.


-----Original Message-----

From: James Calder [mailto:jdcalder@e3corp.com]

Posted At: Wednesday, September 20, 2000 5:29 PM

Posted To: Client

Conversation: Custom Menu/Event Trapping

Subject: Custom Menu/Event Trapping


I am using CFxIE and we are creating client-side custom menus. I need

to know how to trap an event so that it will give me the wParam, nSerie and

nPoint elements. I can use the UserCommand() but it doesn't give me the

nSerie or nPoint. I can use RButtonDown() but it doesn't give me the

wParam. It would seem that Menu() would give me all the needed elements but

I cannot get it to work for me.

Any help with the use of Menu() would be greatly appreciated!

- JD

// * * * This Works * * * //

<script language="javascript" for="Chart1" event="UserCommand(wParam,

lParam, nRes)">

alert("Inside the UserCommand Event");

alert( "wParam = " + wParam + "\nlParam = " + lParam + "\nnRes = " + nRes );

Chart1.ReturnValue = 1;


// * * * This Does Not Work * * * //

<script language="javascript" for="Chart1" event="Menu(wParam, nSerie,

nPoint, nRes)">

alert("Inside the Menu Event");

alert( "wParam = " + wParam + "\nnSerie = " + nSerie + "\nnPoint = " +

nPoint + "\nnRes = " + nRes );

Chart1.ReturnValue = 1;


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.

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.


  • Create New...