How to distinguish Posted message and Sent message? 
Author Message
 How to distinguish Posted message and Sent message?

Hi,

    Is there a way to distinguish Posted message and Sent message in my
message handler? e.g. I have a OnClose() message handler which deals with
wm_close message. I want to tell whether the message is sent or posted or
which windows or process sent this message to me. Can I do that?

Regards
Jeff



Thu, 17 Feb 2005 16:27:39 GMT  
 How to distinguish Posted message and Sent message?
Dont think you can for WM_* but custom messages you can do it in lParam and
wParam. Maybe some WM_* lParam and wParam have room form this.

I dont see why this is needed because handler should just handle msg when
they come.


Quote:
> Hi,

>     Is there a way to distinguish Posted message and Sent message in my
> message handler? e.g. I have a OnClose() message handler which deals with
> wm_close message. I want to tell whether the message is sent or posted or
> which windows or process sent this message to me. Can I do that?

> Regards
> Jeff



Thu, 17 Feb 2005 17:32:42 GMT  
 How to distinguish Posted message and Sent message?
You could use generic signs such as 0 means send and 1
means post when you send and post messages.

Kuphryn



Thu, 17 Feb 2005 17:35:31 GMT  
 How to distinguish Posted message and Sent message?
InSendMessage should work, but it is not at all clear that distinguishing these two cases
gives you anything useful. In fact, it may produce a program that is unusable in a real
environment. In any case, you cannot determine the sender.
                                joe

Quote:

>Hi,

>    Is there a way to distinguish Posted message and Sent message in my
>message handler? e.g. I have a OnClose() message handler which deals with
>wm_close message. I want to tell whether the message is sent or posted or
>which windows or process sent this message to me. Can I do that?

>Regards
>Jeff

Joseph M. Newcomer [MVP]

Web: http://www3.pgh.net/~newcomer
MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm


Thu, 17 Feb 2005 21:08:39 GMT  
 How to distinguish Posted message and Sent message?
But look at spy++. He can tell the message is posted or sent

Quote:
> InSendMessage should work, but it is not at all clear that distinguishing
these two cases
> gives you anything useful. In fact, it may produce a program that is
unusable in a real
> environment. In any case, you cannot determine the sender.
> joe


> >Hi,

> >    Is there a way to distinguish Posted message and Sent message in my
> >message handler? e.g. I have a OnClose() message handler which deals with
> >wm_close message. I want to tell whether the message is sent or posted or
> >which windows or process sent this message to me. Can I do that?

> >Regards
> >Jeff

> Joseph M. Newcomer [MVP]

> Web: http://www3.pgh.net/~newcomer
> MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm



Fri, 18 Feb 2005 03:03:00 GMT  
 How to distinguish Posted message and Sent message?
That's because Spy++ has hooked both API calls in addition to several others

Nish


Quote:
> But look at spy++. He can tell the message is posted or sent

> > InSendMessage should work, but it is not at all clear that
distinguishing
> these two cases
> > gives you anything useful. In fact, it may produce a program that is
> unusable in a real
> > environment. In any case, you cannot determine the sender.
> > joe



> > >Hi,

> > >    Is there a way to distinguish Posted message and Sent message in my
> > >message handler? e.g. I have a OnClose() message handler which deals
with
> > >wm_close message. I want to tell whether the message is sent or posted
or
> > >which windows or process sent this message to me. Can I do that?

> > >Regards
> > >Jeff

> > Joseph M. Newcomer [MVP]

> > Web: http://www3.pgh.net/~newcomer
> > MVP Tips: http://www3.pgh.net/~newcomer/mvp_tips.htm



Fri, 18 Feb 2005 06:10:51 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Exceeding the number of posted messages per message Queue under Win2K

2. Sending a message to the system message queue

3. how to distinguish messages from two dialog of the same type

4. how to distinguish messages from two dialog of the same type

5. Cross-posted messages to Java newsgroups

6. STA marshalling and posted messages

7. playing sounds(just a response from a previous posted message)

8. Posted Messages Lost

9. MS server doesn't display messages posted via AT&T Worldnet server

10. Search for a previous posted message.

11. Hey Friends I am Not Able To View the Messages Posted

12. OnOK() - what message is posted?

 

 
Powered by phpBB® Forum Software