Hello
I have application written in MFC using Microsoft Visual Studio .NET 2003 (version 7.1.3088 as reported by Help/About dialog box). I'm using Measurement Studio Version 7.1, especially Graph control by means of it's ActiveX interface (pure C++, no managed extensions). My CNiGraph
control is displayed within applications main window (something like my ownd "SDI" window). Recently I have added support for user interaction with plots, such as panning, zoomming etc. It turned out that all but zooming worked fine. Zoom functionality was disabled, i.e. I was unable to get "rubber band rectangle". Searching forums I found similar problem, althought post author expected this to be problem with MDI functionality:
http://forums.ni.com/ni/board/message?board.id=231&message.id=2458
I learned from this post that when I double click my CNiGraph I can zoom fine. I did some experiments and find out that problem is (I think) related to CNiGraph loosing DISPID_MOUSEDOWN events. When I display menu using DISPID_MOUSEDOWN event handler, mouse up event goes to menu and not to CNiGraph, so control "doesn't know" that mouse button is depressed. It seems to me that until this event (mouse up) reaches control it remains in some specific internal state in which it won't do zooming (thought panning works fine).
Simple solution is to display menu using DISPID_MOUSEUP event handler (anyway, this is how pop-up menu works in typical applications), but perhaps CNiGraph developers should modify control's code, in a way that would prevent control from loosing mouse-up events?
Best regards
Michal