Windows messages to Qt window
-
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;
}@- Is this correctly implemented? It does compile.
- 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]