The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Bug in GetGraphPoints::GetCursorPos() Method?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

TreeNode

64 Posts

Posted - 10/18/2010 :  12:29:10 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release: Origin 8G, SR6
Operating System: Win XP

Hi,

I think the GetGraphPoints::GetCursorPos() Method does not work well.
I want to override the virtual function GetGraphPoints::OnDisplay().
For that reason I derived a class from GetGraphPoints, and implemented the
virtual function OnDisplay() like listed below:

void My_GetGraphPoints::OnDisplay(string& str, int nPoint)
{
    double dX, dY;
    int nIndex;
    
    if( !GetCursorPos(dX, dY, &nIndex) )
    	return;
    
    string strMessage, strLabel;
	strLabel = "Data Display";
	strMessage.Format("X: %f\tY: %f\tIndex: %d", dX, dY, nIndex);
	MessageBox( GetWindow(), strMessage, strLabel);
}


Now when I start selecting points, after calling GetGraphPoints::GetPoints( int nPts, ...)
Lets imagine I selected a point with x-Value = 128.35 ; y-Value = 13.46 and index: 2372
The upcoming MessageBox shows a Message like this: X: 13.460000 Y: 0.000000 Index: 2372

What happened? The y-Value of selected point is stored in the variable dX, variable dY got the value 0.0,
only value of nIndex is correct.
Could someone take a look at this please? Thank you.


|-- TreeNode
...|-- a??
...|-- ha!!

Penn

China
644 Posts

Posted - 10/19/2010 :  01:57:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi TreeNode,

Thank you for reporting this. However, we have fixed this problem since Origin 8.1.

Currently, our latest version is Origin 8.5, you can download a free demo from this page to have a try.

Penn
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000