THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/10/2007 at 02:29, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.5
Platform: Windows ;
Language(s) : C++ ;
---------
Hi!
I (desperately) try for some time now to get a working bitmapbutton in the active-object-manager.
xxxx.res -->
BITMAPBUTTON RETRO_TEST{ BORDER; BUTTON; } //// RETRO_TEST==9000900
<--xxxx.res
xxxx.h, xxxx.xpp------->
class T_retro_main : public ObjectData
{
........
Bool Init(GeListNode* node);
Bool Message(GeListNode* node, LONG type, void *ptr_data);
.........
}
Bool T_retro_main::Init(GeListNode* node)
{
BaseContainer *ptrcont = GETDATACONTAINER_INSTANCE(node);
BitmapButtonStruct *ptr_bbs = BitmapButtonStruct::Alloc();
if(ptr_bbs)
{
ptr_bbs->op = (BaseList2D* )node;
ptr_bbs->id.SetId( DescLevel(0x4711 , DTYPE_BUTTON /*?*/ , 0x00110011 ) );
GeData gedata2 = GeData(CUSTOMDATATYPE_BITMAPBUTTON,*ptr_bbs);
ptrcont->SetData(9000900,gedata2);// RETRO_TEST==9000900
};
return(TRUE);
};
Bool T_retro_main::Message(GeListNode* node, LONG type, void *ptr_data)
{
switch(...) ........
case MSG_DESCRIPTION_GETBITMAP: //<-------this does happen one or two times
{
DescriptionGetBitmap*dgb=(DescriptionGetBitmap* )ptr_data;
.......alloc/compute bitmap mybm etc...
dgb->bmp=mybm;
};
};
<------- xxxx.h, xxxx.xpp
that displays a bitmap in aom.
if the button is pressed nothing happens, no message nor something else except MSG_DESCRIPTION_GETBITMAP again.
Is this the way to detect a pressed button?
Somewhere there is a hint that there exist something like:
class BitmapButtonCustomGui : public BaseCustomGui<CUSTOMGUI_BITMAPBUTTON>
{
........
void SetCallback(const BitmapButtonCallback& cb);
};
which looks very promising. Unfortunately I cannot find a way to get this wonderful thing.
I cannot find any connection between a xyz..CustomDataType and the corresponding xyz..CustomGui.
(to be honest, I cannot even read that stuff without getting confused).