Results 1 to 6 of 6

Thread: Getting messages sent by PostMessage

  1. #1
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Getting messages sent by PostMessage

    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!

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Getting messages sent by PostMessage

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

  3. The following user says thank you to squidge for this useful post:

    Luc4 (18th May 2010)

  4. #3
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Getting messages sent by PostMessage

    winEvent was not getting any message. As soon as I can I'll try QCoreApplication::winEventFilter. Thanks!

  5. #4
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Getting messages sent by PostMessage

    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?

  6. #5
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Getting messages sent by PostMessage

    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.

  7. The following user says thank you to squidge for this useful post:

    Luc4 (19th May 2010)

  8. #6
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Getting messages sent by PostMessage

    Indeed the message was not sent. I fixed and now I get it in the event method.
    Thanks!

Similar Threads

  1. PostMessage
    By sonuani in forum Qt Programming
    Replies: 2
    Last Post: 14th March 2008, 12:22
  2. qt3 to qt4 conversion: debug messages
    By hugo vanwoerkom in forum Qt Programming
    Replies: 3
    Last Post: 15th October 2007, 19:08
  3. PostMessage() across process boundaries equivalent
    By TheKedge in forum Qt Programming
    Replies: 9
    Last Post: 27th January 2006, 00:02
  4. Qt4 no debug messages
    By TheKedge in forum Newbie
    Replies: 3
    Last Post: 23rd January 2006, 17:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.