Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Windows messages to Qt window
Forum Updated to NodeBB v4.3 + New Features

Windows messages to Qt window

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 3.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Megadime
    wrote on last edited by
    #1

    I'm trying to set up a message transfer from a windows dll to a qt gui window. The dll sends windows messages and my first approach was to use winEventFilter(). I'm kind of a newbie but it seemed to me that this is not the way to go because the library needs a window handle to send the message to. So I tried winEvent() in my main window. Messages arrive, at least the windows system messages. But I can't seem to get the ones from the library.

    This is my source code (rtC3d_Client_Test is the main window):

    @bool rtC3d_Client_Test::winEvent(MSG * msg, long * result){

    switch(msg->message){
    case(MSG_CLIENT_ARRIVED_EMPTY): return false;
    ... all the other cases
    }

    return false;
    }@

    1. Is this correctly implemented? It does compile.
    2. I use this->winId() in my main window as parameter for the function of the library, which sets the target of the library messages. Is this correct?

    I'm just trying to eliminate possible errors because I'm not really familiar with qt programming.

    EDIT: added @ tags by vcsala
    [EDIT: it's Qt not QT :-) Volker]

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved