How to Show Mouse Cursor without losing mouse capture?

I met this problem,and I didn’t resolve it.
So I just check if the mouse position close to the screen edge.
If mouse is at the edge I’ll add a constant movement to the camera.