Ok I am doing some windows API programming that deals with two applications\windows. One window is my program, the other is a games window.
I am building my application to output the coordinates to my applications screen.
The coordinates are to be retrieved and are needs to be relative to the games windows, and not the entire desktop\screen of windows\my computer. I cannot find any functions for doing this.
So basically... When mouse is being moved in the games window whatever the coordinates are of the mouse in the games window is what I need. E.g I just need coords of the games window to wherever the mouse is on that games window only!
So I grab the handler to the games window.. all is good.. but I cant find a function where I can tie in that handler in order to get the coords I need.
POINT pt;
HWND myapplication; //this is usually just plain old hwnd or MY applictions handler
HWND GameScreen = FindWindow(0,"Title of the game");
HDC hMyApp = GetDC(myapplication);
HDC hGame = GetDC(GameScreen);
// I see the function GetCursorPosition(&pt); but theres no tie in of this function
// I can use for the handler GameScreen.
// I am looking for a way to GetCursorPosition(GameScreen, &pt); or something that
// takes the handler to the games screen and I can pass in &pt, and retrieve coords
// of the mouse relative ONLY to the GameScreen .. if there is such a function