Page 1 of 1

Error in CreateCompatibleBitmap 0x00000057

Posted: Mon Jan 12, 2009 9:49 am
by highlycaffeinated
Hello-

I am running into an problem trying to call dplot.DPlot_GetBitmap(docNum, 200, 50) from my C# program. The error message I am getting is "Error in CreateCompatibleBitmap=0x00000057, size=2089890447w x 570h. Obviously I don't really want a bitmap that is 2 billion pixels wide...I only asked for 200! I verified that my docNum parameter is valid and looking at DPlot, the plot appears to be correct. Any ideas why this might be happening?

Thanks,
David

Posted: Mon Jan 12, 2009 11:39 pm
by DPlotAdmin
David,
What version of DPlot are you running? Another user had a very strange problem with DPlot not correctly interpreting values sent by DDE. It turned out to be a weird interaction between compressing dplot.exe with UPX and... well, something. I could never duplicate the problem on any of my systems but he has seen this on several XP systems. Version 2.2.2.5 doesn't use UPX, and his problem went away.

(I'm glad to hear you don't want a 2 billion pixel-wide bitmap. I actually have had stranger requests :-))

Posted: Tue Jan 13, 2009 8:26 am
by highlycaffeinated
Hi David,

Thanks for your response. I am (now) using DPlot Jr v2.2.2.5 having just updated from 2.1.9.x. Unfortunately, I'm still seeing the same error. I suspect it is something specific to the plot I've created as I'm able to get bitmaps of other plots just fine. Any other ideas of where to look?

Thanks
David

Posted: Tue Jan 13, 2009 10:54 am
by DPlotAdmin
Just one: Try using [SetImageCrop(0)] to see if that makes a difference.

If it doesn't... if you can send your source to me please do that.

Posted: Tue Jan 13, 2009 4:35 pm
by highlycaffeinated
Thanks for the suggestion. I tried the SetImageCrop command and it didn't solve the problem. I've e-mailed you the relevant source. Hopefully you'll find some clues in there.

Thanks again,
David

Posted: Tue Jan 13, 2009 5:11 pm
by DPlotAdmin
File received, thanks. Will get to the bottom of this tonight. For now... soccer time.