Mouse flicker

I creates an OpenGL window but when I move the mouse over it I get an annoying flicker. Is there any way to get rid of this?

The window is done in MS VC++ 6 by creating a win32 app then linking in MFC (See tutorial at I have expanded on the code and am using it as a child window. Its double buffered and refreshed continuously (hence I suspect the flicker).

I tried using SetCursor to hide the mouse and draw it myself with opengl. However, I can’t get a fast enough refresh rate to make the mouse respond smoothly.

Does anyone have any solutions?

I think it is much better to let windows handle the mouse drawing. Do you get flicker even then?

I get the flicker when windows draws the mouse. When I draw the mouse I don’t get any flicker, but the frame rate is so slow it hampers mouse responsiveness.

If you go to Settings-ControlPanel-MouseProperties-Pointers and uncheck Enable pointer shadow this will fix that problem.

I just realised that the mouse flicker only happens when the mouse is in a child window which uses OpenGl and double buffering (my other test programs don’t cause the mouse to flicker). So guessing that this was the cause I set the child window to capture the mouse. This stops the flicker, but now the main window won’t respond. Any suggestions how to get around this problem?

Note: I called the SetCapture command from the child window’s OnSetCursor message handler. I also tried doing the same thing from the parent’s OnSetCursor command but it still doesn’t respond. I’m new to using windows messages so I suspect I am not using the correct ones to shift capture from the parent window to child window and back.

PS: The program is designed for Win95 and Win98 clients. Win95 does not have the remove shadow option in mouse properties.

My suggestion to mouse use is learn DirectInput. Its not hard and its great.
It wont flicker and has smooth input and extra functions