View previous topic :: View next topic |
Author |
Message |
rkm
Joined: 21 Nov 2012 Posts: 27
|
Posted: Mon Dec 17, 2012 12:14 pm Post subject: What function fills DPLOT_PLOTMETRICS structure? |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
DPlotAdmin Site Admin
![](images/avatars/12798672406543ad048b04c.png)
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Dec 17, 2012 1:26 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
rkm
Joined: 21 Nov 2012 Posts: 27
|
Posted: Mon Dec 17, 2012 4:39 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
DPlotAdmin Site Admin
![](images/avatars/12798672406543ad048b04c.png)
Joined: 24 Jun 2003 Posts: 2310 Location: Vicksburg, Mississippi
|
Posted: Mon Dec 17, 2012 5:41 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
|