Original Post
I'm trying to write a program that drag files, draw pictures, and rename stuff without the need to use the cursor. I'm going this through Window Messages. Currently I'm experiamenting on an autoplaying proggy for an advanced minesweeper game. Here is what my code looks like.. This code doesn't work however. I've used Spy++ to make sure the HWND value and everything was working, and it was. Is there a problem with my code, or is it just that some programs handle messages different than others? (I've tried shifting the Post & send thingies around, no success. )
void sClickAndDrag(unsigned short intX,unsigned short intY,unsigned short intDestX,unsigned short intDestY)
{
SendMessage(hwndWindow, WM_LBUTTONDOWN, 0,fMakeLong(intX,intY));
PostMessage(hwndWindow, WM_MOUSEMOVE, MK_LBUTTON,fMakeLong(intDestX-5,intDestY-5));
SendMessage(hwndWindow, WM_LBUTTONUP, 0,fMakeLong(intDestX,intDestY));
}