I'm trying to send a message from a thread to my main thread.
I have the handle of my main window and am sending the message as follows:
SendMessage(AppHandle, 402, id, 0);
Where id is an integer value
My main application will not register this unless I set wParam to 0.
I can set lParam to anything I like including a variable, but no matter what
the main application receives the message, but always reads lParam as
1242784 (which I assume is the max for the lParam type although haven't
checked this out).
I use the same procedure throughout my application with various threads and
I don't get this problem anywhere else.
I'm really at a loss to understand this.
I've tried PostMessage in place of SendMessage, but it makes no difference
(ie same effect).
Has anyone got any ide what might be causing this?
Thanks,
Mark