CheckCoreMessage returns always false

On 23/04/2018 at 01:47, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R18 
Platform:   Windows  ;   
Language(s) :     C++  ;


In a custom thread, I call SpecialEventAdd(id, p1, p2) and I have a dialog that is supposed to process this event. 
The problem is that for some reason CheckCoreMessage returns false even thought the event has not been already processed. 
What can I do to properly handle the special event ?

Thank you.

On 24/04/2018 at 07:36, xxxxxxxx wrote:


hard to say, but maybe it helps to provide some background info.

SpecialEventAdd() posts an event into a queue. In certain intervals in the main thread these events will be processed and distributed. When doing so, the events get a timestamp (a counter in BFM_CORE_UNIQUEID). This timestamp is identical for all events distributed in one interval.

CheckCoreMessage() checks a timestamp of the event and stores it in a member variable of the GeDialog (if ownlastcoremsg parameter is not provided).
This might already be an issue in your case. For example, if a bunch of events pile up, only the first would pass CheckCoreMessage() as all following would have the same timestamp (even though the events are of different type).

A solution may be to do CheckCoreMessage() based on event type and store the last timestamp on your own (via ownlastcoremsg parameter).

Let me know, if this helped.