[Help] C# SendMessage()

05/11/2010 16:24 shimo diaz#16
Quote:
Originally Posted by SigmaD View Post
I have no idea how to use that lol but thanks anyways. I'll look for info on it =p

I didn't know they had forums lol thanks
You are welcome, btw did you get anything from this code:confused:
Code:
#define MAKELONG(a, b) ((LONG)(((WORD)(((DWORD_PTR)(a)) & 0xffff)) | ((DWORD)((WORD)(((DWORD_PTR)(b)) & 0xffff))) << 16))
And do you know what WParam and Iparam is? (Because I obviously don't :confused:)
05/11/2010 16:37 SigmaD#17
Quote:
Originally Posted by Nullable View Post
Code:
MK_RBUTTON

    The SHIFT key is down.
I don't think it matters but isn't MK_RBUTTON right mouse click?

@shimo
According to nullable the wParam is the virtual key. The values for virtual keys are on MSDN. Since I'm sending a right click I'm using 2(the value of right click) as wParam for the keydown message and IntPtr.Zero for the keyup message. As for the lParam he said it was the coordinates for the mouse click but I have no idea how to use 2 values for a single parameter.
05/11/2010 16:46 shimo diaz#18
Quote:
Originally Posted by SigmaD View Post
According to nullable the wParam is the virtual key. The values for virtual keys are on MSDN. Since I'm sending a right click I'm using 2(the value of right click) as wParam for the keydown message and IntPtr.Zero for the keyup message.
I am using SendInput it works but still I can't specify the window that I want to click on and about the Keydown and Keyup
Code:
    public enum MouseFlag : uint
    {
        MOVE = 0x0001,
        LEFTDOWN = 0x0002,
        LEFTUP = 0x0004,
        RIGHTDOWN = 0x0008,
        RIGHTUP = 0x0010,
        MIDDLEDOWN = 0x0020,
        MIDDLEUP = 0x0040,
        XDOWN = 0x0080,
        XUP = 0x0100,
        WHEEL = 0x0800,
        VIRTUALDESK = 0x4000,
        ABSOLUTE = 0x8000,
    }
Why are you giving Keyup IntPtr.Zero ?
05/11/2010 16:59 SigmaD#19
Because I don't need a virtual key for keyup. The keyup message doesn't do anything, it just tells the program that the key is no longer down.
05/11/2010 22:38 shimo diaz#20
Quote:
Originally Posted by SigmaD View Post
Because I don't need a virtual key for keyup. The keyup message doesn't do anything, it just tells the program that the key is no longer down.
I am getting tired if you found any answer please share :D
btw in case you haven't found it yet here
Code:
        private static IntPtr MakeLParam(int LoWord, int HiWord)
        {
            return (IntPtr)((HiWord << 16) | (LoWord & 0xffff));
        }
This is how you insert two values into 1 parameter
And if you managed in this please share your code :handsdown: