Original Post
I have a directx8 app that I need to incorporate edge scrolling into with the mouse. I am using the standard windows message WM_MOUSEMOVE and then testing the lparam for x and y values. My question is: I can detect if the mouse moved to the edge but how do I get it to keep moving and updating the screen, because once I get to the edge the mouse stops moving, and windows no longer sends the WM_MOUSEMOVE message. my code is as follows -
switch(msg){
case WM_MOUSEMOVE:
{
int Xloc=LOWORD(lparam);
int Yloc=HIWORD(lparam);
if(Xloc>=g_width-1)
{
xpos++;
SetView(xpos,ypos,zoom,offset);
}
if(Xloc<=0)
{
xpos--;
SetView(xpos,ypos,zoom,offset);
}
if(Yloc>=g_height-1)
{
ypos--;
SetView(xpos,ypos,zoom,offset);
}
if(Yloc<=0)
{
ypos++;
SetView(xpos,ypos,zoom,offset);
}
break;
}
Is there any way to just find the x and y coords of the mouse without dealing with the message system? preferably without having to incorporate DirectInput(which I could do, but seems a little excessive when all I need is x,y coords)-Thanks
Use the WriteCoolGame() function
Works every time