heard of that happening, even when DirectInput happens to be initialized in the same app, because it's one of those functions that's always safe to call. Are you positive
that it's GetCursorPos that's causing the crash?
This is the code I've used to get the mouse position relative to the origin of my game window's client area:
// this bit just gets the mouse position in screen coordinates
// hwnd is the handle to my game's main window
// this function will transform the screen coordinates of the mouse to window coordinates
That should do it right there, and it should always be safe to do, assuming that your window has been created prior to the call and you give ScreenToClient a valid window handle.
If you're still having problems, perhaps you could post some code?
Edited by - merlin9x9 on July 12, 2001 3:53:13 PM