Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Jan : SendMessage wParam woes

www.cryer.info
Managed Newsgroup Archive

SendMessage wParam woes

Subject:SendMessage wParam woes
Posted by:"Mark Williams" (mark@{removethis}.skwirel.com)
Date:Wed, 18 Jan 2006 22:34:39

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

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive