jamesjk wrote:
but nothing special happened... no event in the message receiving control was fired.. am I missing anything ?
The code was not to fire the events. It was to help you find the right message sequence and the lParam and wParam values to pass (read msdn documentation of those messages to find out the correct values to pass). You send the messages using SendMessage. So I guess the sequence would be sending, WM_LBUTTONDOWN in mousedown event WM_MOUSEMOVE in mousemove WM_MOUSEHOVER in mousehover (just in case the covered control uses it for something, i don't know. the same applies to WM_MOUSELEAVE) WM_LBUTTONUP in mouseup I don't know anything about WM_COMMAND nor 0xc206 (I couldn't find anything about it, maybe it's an undocumented message, i don't know). I think you shouldn't use WM_SETFOCUS and WM_KILLFOCUS. WM_CAPTURECHANGED, i don't know, maybe you should send it right after WM_MOUSEUP in mouseup event. P.S. I've never tried to simulate something like dragging before but I did try sending simple messages before. I don't know much so you should experiment more. And study sequences generated from cases like mousedown, move, leave the control, re-enter the control, move, mouse up... (cases like that) to ensure you get the desired result in both normal cases and extreme cases. And you're welcome.
Eslam Afifi