Handle WM_USER message in QT
-
Hello Everyone,
I'm new to Qt.
I would like to create sample Qt c++ program to read barcode with zebra scanner.
I have sample MFC c++ zebra scanner code, I could able to get barcode with that sample. this MFC C++ code uses PeekMessage and DispatchMessage to read barcode information(WM_USER type). I would like to replicate same kind of Message handling in Qt.
Please help me to handle WM_USER message in QT. -
Hello Everyone,
I'm new to Qt.
I would like to create sample Qt c++ program to read barcode with zebra scanner.
I have sample MFC c++ zebra scanner code, I could able to get barcode with that sample. this MFC C++ code uses PeekMessage and DispatchMessage to read barcode information(WM_USER type). I would like to replicate same kind of Message handling in Qt.
Please help me to handle WM_USER message in QT.Use QCoreApplication::installNativeEventFilter() and you will get all windows messages.
-
Use QCoreApplication::installNativeEventFilter() and you will get all windows messages.
@Christian-Ehrlicher Thank you.
I tried with QCoreApplication::installNativeEventFilter() , but i could not see the WM_USER message in nativeEventFilter() function. I could able to see other messages.
What I'm missing here?
-
Use QCoreApplication::installNativeEventFilter() and you will get all windows messages.
@Christian-Ehrlicher What param should I pass to installNativeEventFilter() to receive WM_USER message ?
-
@Christian-Ehrlicher What param should I pass to installNativeEventFilter() to receive WM_USER message ?
@Karuppu said in Handle WM_USER message in QT:
What param should I pass to installNativeEventFilter() to receive WM_USER message ?
I don't understand this question - you have to pass a pointer to an event handler.
-
@Karuppu said in Handle WM_USER message in QT:
What param should I pass to installNativeEventFilter() to receive WM_USER message ?
I don't understand this question - you have to pass a pointer to an event handler.
@Christian-Ehrlicher
Thank you, I could able to receive WM_USER message in native event filter with the help of MFC class.