PDA

View Full Version : Getting messages sent by PostMessage



Luc4
18th May 2010, 16:37
Hi! I have a IVideoWindow which sends messages of mouse down to the handle of a window, which is a QFrame. I reimplemented mousePressEvent but I get no events in there. I even tried to listen to messages in the event(QEvent*) and winEvent(...) fanction of my QFrame, but I see nothing. Is it possible to get the messages sent from the IVideoWindow to the handle of the QFrame somwhow?
Thanks!

squidge
18th May 2010, 18:40
Sure, winEvent should do that for you when you subclass the QFrame. If it doesn't you can always use QCoreApplication::winEventFilter

Luc4
18th May 2010, 19:05
winEvent was not getting any message. As soon as I can I'll try QCoreApplication::winEventFilter. Thanks!

Luc4
19th May 2010, 08:28
It seems nothing at all arrives as well in QCoreApplication::winEventFilter... Is it possible message is posted and I'm not, for some reason, able to get the message?

squidge
19th May 2010, 09:17
You can use Spy++ from the Windows SDK to see if you are actually receiving a message before stepping through the Qt message pump system.

Luc4
19th May 2010, 16:13
Indeed the message was not sent. I fixed and now I get it in the event method.
Thanks!