![]() |
GetRange crash |
Post Reply ![]() |
Author | |
yangyanhui ![]() Senior Member ![]() Joined: 20 August 2020 Status: Offline Points: 131 |
![]() ![]() ![]() ![]() ![]() Posted: 08 December 2020 at 12:55am |
CXTPChartContent* pContent = GetContent(); CXTPChartSeriesCollection* pCollection = pContent->GetSeries(); CXTPChartDiagram2D* pDiagram = DYNAMIC_DOWNCAST(CXTPChartDiagram2D, pCollection->GetAt(0)->GetDiagram()); double internalValueX = ((CXTPChartDiagram2DAxisView*)pDiagram->GetAxisX()->GetAxisView())->PointToValue(pt.x); I use these code in mousemove event. It crashes after I move my mouse several times. What may cause it? thanks
|
|
![]() |
|
yangyanhui ![]() Senior Member ![]() Joined: 20 August 2020 Status: Offline Points: 131 |
![]() ![]() ![]() ![]() ![]() |
I can confirm that the coordinate is in the area of the chartctrl. PointToValue crashes.
|
|
![]() |
|
yangyanhui ![]() Senior Member ![]() Joined: 20 August 2020 Status: Offline Points: 131 |
![]() ![]() ![]() ![]() ![]() |
when I move slowly.It works well,when I move the mouse fast,it will crash which is very strange
|
|
![]() |
|
yangyanhui ![]() Senior Member ![]() Joined: 20 August 2020 Status: Offline Points: 131 |
![]() ![]() ![]() ![]() ![]() |
I add sleep(50) after PointToValue. It works but there is a track shows where the mouse moved as it is not validated in time.
|
|
![]() |
|
yangyanhui ![]() Senior Member ![]() Joined: 20 August 2020 Status: Offline Points: 131 |
![]() ![]() ![]() ![]() ![]() |
I find the reason. It is because I execute pDiagram->GetAxisX()->GetRange()->GetViewMaxValue(); when I move the mouse. I now need to disable onmousemove when I zoom the range because I need to exeute PointToValue in mousemove event.How can i realize it,mutex does not work
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |