DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What function fills DPLOT_PLOTMETRICS structure?

 
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C#
View previous topic :: View next topic  
Author Message
rkm



Joined: 21 Nov 2012
Posts: 27

PostPosted: Mon Dec 17, 2012 12:14 pm    Post subject: What function fills DPLOT_PLOTMETRICS structure? Reply with quote

I have been using DPLOTLIB.LIB to create a dialog box to display a variety of plots from a data set. The dialog is based on CTEST2.C and during most of the development has been successfully handling the WM_MOUSEMOVE messages. As the capability of the dialog expands, so does the code so it is now well over 2K lines. After one new code iteration the mouse-movement mapping display suddenly stopped working. The debugger showed the cause to be that all the members of the DPLOT_PLOTMETRICS structure DPM (except the size) were zero at the time the WM_MOUSEMOVE message is processed. The result is that the cursor position is always found to lie outside the plot rectangle region defined by DPM.hll, DPM.hur, DPM.vur and DPM.vll and thus writes an empty string to the control where the coordinates are displayed.

My question is what function is responsible for filling in the values in the DPM structure? Is it DPlot_GetBitmapEx()?.

-rob
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Dec 17, 2012 1:26 pm    Post subject: Reply with quote

Quote:
My question is what function is responsible for filling in the values in the DPM structure? Is it DPlot_GetBitmapEx()?.


Yes.

You'll want to make sure that DPM is static. Other than that I'm not sure what might be going wrong with a call to DPlot_GetBitmapEx. If this is no help you may want to try DPlot_SetErrorMethod(2) to display dplotlib errors in a MessageBox.
_________________
Visualize Your Data
support@dplot.com


Last edited by DPlotAdmin on Mon Dec 17, 2012 5:42 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rkm



Joined: 21 Nov 2012
Posts: 27

PostPosted: Mon Dec 17, 2012 4:39 pm    Post subject: Reply with quote

Thanks. At least I know I'm looking in the right place.

The structure is static.
DPlot_SetErrorMethod(2) is being used and does not report any error.
DPlot_GetBitmapEx() is returning what appears to be a valid bitmap handle.
The bitmap handle changes each time the same data set is replotted (which I assume is normal).
The plot is being properly displayed in the intended dialog control.

BUT
I just noticed that the DocNum is not being changed on successive plots of the same quantities, might be a clue?

Will report back if and when I locate the problem.

-rob
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Dec 17, 2012 5:41 pm    Post subject: Reply with quote

If DocNum isn't changing then the plot is being closed after creation. That's fine for 2D data, but for 3D data (whether plotted in 2D or 3D) you need to leave it open in DPlot. Otherwise you won't be able to interpolate Z given X and Y.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> C, C++, C# All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group