THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/12/2012 at 21:54, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) :
---------
Hi All,
I'm trying to draw an image in the MSG_DESCRIPTION_GETBITMAP message area. Everything works until I try getting a bitmap from a GeClipMap. Cinema crashes. Code below.
DescriptionGetBitmap *dgb = static_cast<DescriptionGetBitmap*>(data);
AutoAlloc<GeClipMap> Map;
Map->Init(100,100,32);
Map->BeginDraw();
// drawing here... all seems to work fine when I display it in the picture viewer using ShowBitmap()...
Map->EndDraw();
AutoAlloc<BaseBitmap> Bitmap= Map->GetBitmap(); // seems to crash here...
Bitmap->Init(100,100,32,INITBITMAPFLAGS_0);
dgb->bmp = Bitmap->Release();
I was initially using AutoAlloc<BaseBitmap> to draw my image (which was all working as intended) but the drawing functions seem limited - i.e. no rectangle draws etc. Looking around led me to GeClipMap. I've tried some variations of manually allocating the bitmap also. But nothing seems to work without crashing.
Where am I going wrong here?
WP.