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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Bug in GetGraphPoints::GetCursorPos() Method?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
TreeNode Posted - 10/18/2010 : 12:29:10 PM
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!!
1   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 10/19/2010 : 01:57:42 AM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000