1) Always draw the mouse cursor itself to the front buffer.
2) Use dirty rectangle when you draw it. That means before you blt, you capture the pixels that you're about to overwrite. You blt the saved pixels back down to erase the image.
3) Use a "front buffer changed" flag; every time you Flip(), you set the flag (using InterLockedIncrement(), for thread safety). When you go to erase the mouse, if the flag is set, you don't Blt the saved pixels back down (they're old). Whenever you're done drawing the mouse, if the flag is set, you clear it (InterlockedDecrement).
4) The mouse drawing thread sits and waits for 2 things to happen - either an incoming WM_MOUSEMOVE, or a flag set by the primary thread, telling him that the backbuffer's just been Flip()ed. You need the flag because without it, when your FPS is high, your mouse cursor will vanish whenever it stops moving.
This is just off the top of my head (haven't written any code yet), so if it doesn't work, save me some time and tell me why.
Mason McCuskey
Spin Studios
www.spin-studios.com
[This message has been edited by mason (edited October 05, 1999).]