Hi!
Ok there we go…
I’ve made the simpliest exemple to show you what’s happening!
here’s the code that fits in .cpp file… it’s all you need in a news window
application project under windows XP and SDL SDL-1.2.7 release and VS .NET as a
compiler! Include the sdl lib to your project and add the sdl.dll in the root
folder of the new project. (you already known that!) 
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
#include <sdl.h>
#pragma comment(lib, “SDLmain.lib”)
#pragma comment(lib, “SDL.lib”)
int main(int in_argc, char **in_argv)
{
SDL_Init(SDL_INIT_VIDEO);
SDL_WM_SetCaption(“SDL Test”, NULL);
SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 32);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_Surface *l_screen;
l_screen = SDL_SetVideoMode(640, 480, 32, SDL_OPENGL | SDL_FULLSCREEN);
SDL_Event l_event;
l_event.type = SDL_NOEVENT;
int l_x, l_y;
static char l_position[16];
FILE *l_file = fopen("mousepos.txt", "w+");
//SDL_ShowCursor(SDL_DISABLE);
while (l_event.type != SDL_QUIT)
{
while(SDL_PollEvent(&l_event))
{
switch (l_event.type)
{
case SDL_KEYDOWN:
{
switch (l_event.key.keysym.sym)
{
case SDLK_ESCAPE:
{
fclose(l_file);
SDL_Quit();
return 0;
}
break;
}
}
break;
}
}
SDL_WarpMouse(320, 240);
SDL_GetMouseState(&l_x, &l_y);
sprintf(l_position, "X: %d, Y: %d\n ", l_x, l_y);
SDL_WM_SetCaption(l_position, NULL);
fwrite(l_position, 1, sizeof(l_position), l_file);
}
fclose(l_file);
SDL_Quit();
return 0;
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Now… run this and move the mouse… esc after 5 sec or so, cauze it will
filled up the .txt file pretty badly…
look at the mousepos.txt. You ll see that the mouse position change… it will
give you something like this:
…
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 238, Y: 316 ----- Here s the important one!!!
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
…
Next… uncomment SDL_ShowCursor(SDL_DISABLE); and run it again… open the
mousepos.txt and see the difference…
…
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
X: 320, Y: 240
…
The mouse never moved…
Hope you guys can figure this out! I’ve been as far as I could on this!
THX