Sent Core Message with container
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/07/2004 at 06:14, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.207
Platform: Windows ;
Language(s) : C++ ;---------
I receive core messages with messagedata::coremessage. There I get the message id and a basecontainer.
Is it possible to sent my own core messages with basecontainer? EventAdd and SpecialEventAdd let me sent core message, but without a container ( whats done with the ulongs p1 and p2 of SpecialEventAdd? ). With SentCoreMessage I cannot sent my own message id... -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/07/2004 at 22:57, xxxxxxxx wrote:
The structure of the core message container seems to reflect these constants in gui.h:
BFM_SYNC_MESSAGE = 'sync', BFM_CORE_MESSAGE = 'MciM', BFM_CORE_ID = 'MciI', // CinemaMessageID BFM_CORE_UNIQUEID = 'Muid', // TimeStamp BFM_CORE_PAR1 = 'Mci1', // Parameter1 BFM_CORE_PAR2 = 'Mci2', // Parameter1 BFM_CORE_SPECIALCOREID = 'scid', // special managerid!!! for syncmessage
So if you do SpecialEventAdd(12345678, 42, 47) you will get:
id == 12345678; msg.GetLong(BFM_CORE_PAR1) == 42; msg.GetLong(BFM_CORE_PAR2) == 47;
Adventurous programmers can use the parameters to pass pointers cast to longs, though I wouldn't recommend it unless you know what you're doing. (LINKBOX_ACCEPT_MESSAGE_ELEMENT sets a precedent for this trick in the SDK, so you wouldn't be on totally uncharted territory.)