Link to home
Start Free TrialLog in
Avatar of DBTechnique
DBTechnique

asked on

Windows messages : How to find the sender of of WM_USER message

Hello everyone,
I am having trouble with one function of my view.
This function is called on a windows message WM_USER + 100.
My problem is that my view is receiving the message again and again.
I can't find what part of the software is sending that message.
I used Spy++, but I don't know if I can use it to find the sender of the message.
It tells me correctly that my view is receiving the message but not who sent it.
Is Spy++ able to do that ? How can I find the sender ? Do you know another tool to use for that purpose ?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of DanRollins
DanRollins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DBTechnique
DBTechnique

ASKER

Thanks for your reply !
Actually, I have found the cause of my problem (who was the sender).
My log was like that :

Log : Message sent
Log : Message sent
Log : ... // Lot of this again
Log : Message received
Log : Message received
And so on and so on.
At first I didn't look at the first part of the log and since I was logging every access to my "message reception" function, it didn't make sense. But I found out that my function was called so many times because just before I sent the message a lot of time and the message queue didn't have time to process them. So then, when the sender had finished its stuff, windows processed all the previous message one after another and made me think that there were some "ghost sender" behind that :)
Too bad though that it is not possible to let the receiver knows who was the sender, even if they want to communicate directly. I wonder if another IPC can achieve that. That might be my next question on Expert-exchange :)
Anyway, thanks !