Hey everyone,
i'm having, a hopefully simple, problem with DirectX and the Coördinates of the mouse cursor. I would like to set the screen resolution to 800x600.
This is my CreateWindow function:
hWnd = CreateWindowEx( WS_EX_APPWINDOW, "Program1", "Program 1", WS_POPUP, 0, 0,
GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN),
NULL, NULL, GetModuleHandle(NULL), NULL );
And here my backbuffer settings: (Not sure if they are important anyway)
d3dpp.BackBufferWidth = 800;
d3dpp.BackBufferHeight = 600;
This is the code where I set my cursor
g_pd3dDevice->SetCursorProperties(0, 0, g_pMouseSurface)
This is the code I use to retreive the current mouse coordinates
g_lpMouse->GetDeviceState( sizeof(DIMOUSESTATE2), &MouseState )
Now when I check de coordinates the GetDeviceState function gets they don't match the range of [0,800] and [0,600] instead they seem to use my default computer resolution settings. If I change my CreateWindow settings to use 800x600 the application wont run fullscreen and instead just uses a part of the entire screen.
Any help is appreciated,
Thanks in Advance...