XTYP_REQUEST fails in call to DPlot_GetBitmap

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
highlycaffeinated
Posts: 6
Joined: Fri Dec 12, 2008 9:43 pm

XTYP_REQUEST fails in call to DPlot_GetBitmap

Post by highlycaffeinated »

Hello-

I'm occasionally getting the following error when I try to call DPlot_GetBitmap():

In DPlot_GetHBITMAP, XTYP_REQUEST returned NULL

I checked my parameters and my docNum is valid and the sizes are reasonable. Any idea what the problem might be?

Thanks!
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

There should only be a couple of ways, one pretty obvious (there is no plot), and the other generally due to insufficient memory - either the bitmap dimensions are too large or you've created many bitmaps w/o deleting them with DeleteObject. The latter problem is easy to miss if you're calling DPlot_GetBitmap at a fairly high frequency and/or there is more than one path in your program that results in calling DPlot_GetBitmap.

If you aren't creating multiple bitmaps w/o deleting them, you might still have this problem if you've used [SetImageCrop(1)] with large bitmaps. In this case DPlot creates a larger bitmap initially, then makes a copy at the cropped size before deleting the original. If you're using [SetImageCrop(1)] you might want to try [SetImageCrop(0)] to see if that makes a difference.

One way you can test whether a lack of resources is the problem is with a resource monitoring program. I've used GuiResTracer from www.vbaccelerator.com with good success - on XP, unfortunately I've never got it working on Vista.

If none of this helps you are welcome to send me your app; I might be able to plug in some checks in DPlot to tell exactly what is happening and why.
Visualize Your Data
support@dplot.com
Post Reply