Hiding the mouse cursor

I’ve got some old code (originally built back in 2007, IIRC) that I’ve rebuilt using the latest version of Juce from Git. The method I used to hide the mouse cursor doesn’t seem to be working now. Sample code:

That should still be sufficient to hide the cursor, right?

Forgot to mention that I’m using Win 7, 64 bit. Not sure if that matters or not, but it might.

That’ll hide the cursor for that particular component… Were you expecting it to get rid of the mouse cursor from the entire screen?

My app consists of 1 component, which takes up the entire screen. Not sure if it was clear or not, but this was working as expected when I originally wrote the program.

Ah, sorry, looks like I must have broken that recently - try this, in juce_win32_Windowing.cpp:

[code]void MouseCursor::showInWindow (ComponentPeer*) const
{
HCURSOR c = (HCURSOR) getHandle();

if (c == 0 && cursorHandle == 0)
    c = LoadCursor (0, IDC_ARROW);

[/code]

I tried that, made sure to do full rebuilds of Juce and my app, but it still didn’t work for me.

Ok, I’ll take a look and sort it out…

Thanks Jules. For now, I’ve just removed the cursor changing code and replaced it with direct calls to ShowCursor(), which seems to do the trick.

I’ve got a fix, will check something in tomorrow.