Results 1 to 2 of 2

Thread: Qt/MFC Event Loop - stop MFC receiving event?

  1. #1
    Join Date
    Jul 2011
    Qt products

    Default Qt/MFC Event Loop - stop MFC receiving event?

    Hey peeps,

    I'm currently using the Qt/MFC Migration Framework to get an existing MFC application to work with my new Qt (top-level modeless) window (running on a separate thread).

    It generally works ok except for, a window focusing bug, and the one i'm here to ask about which is Context Sensitive (F1) Help.

    Basically when the user hits F1 I want Qt to handle the event and bring up an online help file. I can get this working without issue, however MFC also receives the F1 (ID_HELP) event and wants to open help (using WinHelp) as well. I don't want MFC to receive that event, i only want Qt to handle it. I've tried installing an eventFilter and returning true as well as calling event->ignore()/event->accept() to no avail.

    Does anyone have any ideas how i can stop MFC receiving the F1 help message?


  2. #2
    Join Date
    Jan 2008
    Alameda, CA, USA
    Thanked 678 Times in 668 Posts
    Qt products
    Windows Android

    Default Re: Qt/MFC Event Loop - stop MFC receiving event?

    How about installing a handler on the MFC side to silently eat the message?

Similar Threads

  1. Replies: 10
    Last Post: 15th January 2010, 15:35
  2. Receiving COM event with QAxObject
    By ronald in forum Qt Programming
    Replies: 0
    Last Post: 7th January 2010, 21:38
  3. Replies: 0
    Last Post: 23rd October 2008, 13:43
  4. How to stop event loop of QDialog in Qt4
    By node_ex in forum Qt Programming
    Replies: 3
    Last Post: 8th July 2008, 08:19
  5. function to stop receiving event
    By babu198649 in forum Qt Programming
    Replies: 11
    Last Post: 19th November 2007, 09:45

Tags for this Thread


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.