   Mouse hidden but still can click 'X'
  I'm using C# to make a Managed DirectX game.  My problem is even though I have hidden the mouse, using Cursor.Hide, if while in the game i move the mouse towards the top left or top right corner it clicks on the little icons and exits the game.  I looked into restricting the mouse to the window area, but couldn't find a way.  Any ideas?Thanks   
  I'm not sure about C#, but the process should be similar for C++. In C++ you can just handle WM_CLOSE messages in your window procedure, and tell Windows not to close your window if you're not ready (E.g. you're in game rather than at the main menu).   