diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2010-05-25 16:14:36 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2010-05-25 16:14:36 +0000 |
commit | a8f2a29dcc5fac905ef9a1d2305903cbb74b6b7c (patch) | |
tree | 0745bcf5563051ed74137fd7250ee0c41f79f47d /FaceTrackNoIR/FaceApp.cpp |
First release Version 1.0.0 of FaceTrackNoIR
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@1 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceApp.cpp')
-rw-r--r-- | FaceTrackNoIR/FaceApp.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/FaceTrackNoIR/FaceApp.cpp b/FaceTrackNoIR/FaceApp.cpp new file mode 100644 index 00000000..b993c5cf --- /dev/null +++ b/FaceTrackNoIR/FaceApp.cpp @@ -0,0 +1,33 @@ +#include "FaceApp.h"
+#include "windows.h"
+#include "FTTypes.h"
+#include <QDebug>
+
+//
+// Override the Application MessageFilter, to receive messages from the game(s)
+//
+bool FaceApp::winEventFilter( MSG * msg, long * result )
+{
+ int msgType = msg->message; // test line
+
+ if (msgType == msgID_FTClient) {
+ qDebug() << "FaceApp::winEventFilter says: game tickles me =" << msgType << "hwnd =" << msg->hwnd;
+ if (mainWindow != NULL) {
+ mainWindow->getGameProgramName();
+ }
+ }
+
+ return( false );
+}
+
+//
+// Setup the EventFilter
+//
+void FaceApp::SetupEventFilter( FaceTrackNoIR *window ) {
+
+ mainWindow = window;
+ msgID_FTClient = RegisterWindowMessageA ( FT_PROGRAMID );
+
+ qDebug() << "FaceApp::SetupEventFilter says: Message ID =" << msgID_FTClient;
+
+}
\ No newline at end of file |