On 22/03/2016 at 00:16, xxxxxxxx wrote:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
what and where is the correct place for handling a change in mouse icon when you're just wanting to hover over something?
I've only been trying in BFM_GETCURSORINFO (example below), but the icon change doesn't stay.
CursorX = MB.GetLong(BFM_INPUT_X);
CursorY = MB.GetLong(BFM_INPUT_Y);
if(Check_TimeIndicator(CursorX,CursorY) == TRUE)
I'm not sure where else I can put it, or how to implement this kind of 'hover' thing correctly. Cheers,
On 22/03/2016 at 05:10, xxxxxxxx wrote:
in general and as mentioned in the documentation, GeShowMouse() can be used from the main thread only. Not telling this, because you did it wrong, but just for completeness.
So the most common use case for GeShowMouse is, when you are having a longer lasting calculation/loop, then you'd use it before this calculation to show a busy pointer and afterwards to turn back to normal.
I guess, that's the trivial part and you'd probably already known all of that already.
Now, the message BFM_GETCURSORINFO is a bit different and actually doesn't need the use of GeShowMouse at all, though obviously touching a similar topic.
If you want to change the cursor in BFM_GETCURSORINFO, you will have to return/fill the message container.
Just as an example, there are Pick Sessions in Cinema 4D (where you click the round question mark icon next to a linkbox in order to pick the link target). If you want to have your dialog providing proper visual feedback, then you'd do something like this:
BaseDocument* const doc = GetActiveDocument();
if (doc && doc->GetPickSession())
result = msg;
With msg being the incoming container passed to the message function and result obviously being the result container.
On 23/03/2016 at 00:31, xxxxxxxx wrote:
Aha, thanks Andreas. I've got this working now.
I've used GeShowMouse in while loops in InputEvent() at times but never could get it working as a mouse over feature. Now it makes sense.