Results 1 to 2 of 2

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

  1. #1
    Join Date
    Jul 2011
    Location
    Scotland
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    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?

    Regards,
    Kaylx

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,011
    Thanks
    233
    Thanked 636 Times in 626 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 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, 14:35
  2. Receiving COM event with QAxObject
    By ronald in forum Qt Programming
    Replies: 0
    Last Post: 7th January 2010, 20:38
  3. Replies: 0
    Last Post: 23rd October 2008, 12: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, 07:19
  5. function to stop receiving event
    By babu198649 in forum Qt Programming
    Replies: 11
    Last Post: 19th November 2007, 08:45

Tags for this Thread

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.