Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

cwgraph 6.0 annotation problem

I've been using MS for years, got version 6 last spring for the annotation feature. I have an app which uses arrow annotations as well as panning and zooming. I also have added a popup menu to the annotation mouse down event to allow the user to change annotation properties via popup menu event. Problem is that the annotation will no longer move or size when the chart track event property is set back to annotations. Even odder is that chart zooming stops working as well, though panning does work. Just downloaded the 7.0 update, no difference. Problem happens even if I do not select an item in the popup menu. If I remove the popup menu invocation from the annotation mouse down event, then all track modes keep on working. Seems like calli
ng an menu (which processes an event) from the annotation mouse down event is what is the problem here. Any help here or hints of something I'm doing wrong would be appreciated.

David
0 Kudos
Message 1 of 5
(6,435 Views)
David,

Let me see if I got this right; you have some annotations and when the user right-clicks on it, the user gets the popup menu, after that you are not able to move anotations or zoom in the graph?

I would highly appreciate if you could post some snipet of code to replicate this. It would make some sense that the graph stops reponding while the tracking loop for the popup menu is up; but once the menu selection is done the tracking loop should allow the graph to keep working as usual.

I would appreciate any further details to work on this.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 5
(6,435 Views)
David,

I've been doing some research on this and looks like this issue has been reported before in Visual C++ with the ActiveX controls. It seems that the tracking loop for the popup menu is not returning the capture to graph properly (so after the popup menu the graph does not have the focus for the mouse), causing the graph to ignore the mouse events. There is a MNSD document here that explains how the TrackPopupMenu() (required to get the popup menu) will not work properly with dialog based applications.

Using Spy++ I was able to see that the mouse capture in set to NULL after the call to show the menu.
I'll do some more research here to see if I can find a workaround.

I'll keep you posted.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 3 of 5
(6,435 Views)
Juan,

Sounds like you are on the right track. In my case, the pop up menus allows the user to modify arrow width, point and color, or delete the annotation alltogether. So I am two deep in events. What is also odd, is that once track annotations is re-established, if the arrow is clicked on, it gets it's handles, it just won't move.

I have implemented a work around, I put the code to popup the menu in a timer which is always disabled. The annotation event just enables the timer and returns. 10 ms later the menu pops up, and the timer disables itself. This works fine, but the original problem should be fixed.

If you still need an example, let me know.

David
0 Kudos
Message 4 of 5
(6,435 Views)
Hi,

I have the same problem. I would appreciate it if you could produce a sample code.

Thanks
0 Kudos
Message 5 of 5
(6,435 Views)