ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  mfc key press events with charts
Posted by vas on Feb-17-2014 18:07
hi
    i created an mfc mdi application . in that i added a dialogbar. in dialogbar i used picture
control(which is static) and drawn chart..the problem is i cant able to handle any key
pressed events, i tried to handle with pretranslatemessage and onkeydown functions also..
it is not working,,is there any solution for this problem?


Regards,
vas

  Re: mfc key press events with charts
Posted by Peter Kwan on Feb-18-2014 02:38
Hi vas,

Do you mean you are using a Picture Control to display the chart (instead of the
CChartViewer control), and you are overriding pretranslatemessage of the dialog?

The ChartDirector chart is just an image. It cannot affect whether you can press a button
or not. For your case, instead of a chart, may be you can try to load another image into
your Picture control to see if you can get the keyboard functions. If you cannot get
keyboard functions even with another image, it shows that the problem is not related to the
chart.

As far as I know, the dialog cannot have onKeyDown, because the key events are always
sent to the control that have focus. It is only possible for the dialog to receive onKeyDown
if there is no control in the dialog. I assume the dialog bar should behave similarly.

Regards
Peter Kwan