This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Setup query for Gary: InSendMessage/ReplyMessage

Gary R. Van Sickle wrote:
>> Gary,
>> If I understand the Microsoft Docs, this is only necessary if a WndProc
>> receive SendMessages from other threads in the same app. None of our
>> secondary threads call SendMessage  -  are you just adding it on a
>> safe than sorry" basis, or is there something I've overlooked?
>> Max.
> ... I ran across the InSendMessage()
> docs in the SDK so I figured it couldn't hurt.  It doesn't, and since we
> have other threads that post messages, it'll probably only be a matter of
> time before we're sending them too, so I'd recommend keeping this.

I haven't actually tested this, but looking at the ReplyMessage docs, it
looks like the value passed is the return value of SendMessage, and thus
should be individually considered for each message.

Given that the most common reason for SendMessage rather than PostMessage is
to get the return value, I don't think it is wise to simply return a generic

I think we should defer adding this code to setup until there is code in a
secondary thread that will actually make use of it, and take care to set a
correct return value at that time.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]