summaryrefslogtreecommitdiffstats
path: root/src/activeqt/control
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-08-03 15:18:44 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-08-03 15:20:15 (GMT)
commit3d5ffba1a183bbe3d930158e87f65f858b78559c (patch)
tree8f838b28e4d89bfe4f08199277d9a249b9e97fcb /src/activeqt/control
parentfb622fa47ef81dfa95b9351d87b3415b9e03a368 (diff)
downloadQt-3d5ffba1a183bbe3d930158e87f65f858b78559c.zip
Qt-3d5ffba1a183bbe3d930158e87f65f858b78559c.tar.gz
Qt-3d5ffba1a183bbe3d930158e87f65f858b78559c.tar.bz2
Fix compile error on WinCE.
Reviewed-by: TrustMe
Diffstat (limited to 'src/activeqt/control')
-rw-r--r--src/activeqt/control/qaxserverbase.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp
index e482c60..e7ddb47 100644
--- a/src/activeqt/control/qaxserverbase.cpp
+++ b/src/activeqt/control/qaxserverbase.cpp
@@ -3605,15 +3605,26 @@ HRESULT WINAPI QAxServerBase::TranslateAcceleratorW(MSG *pMsg)
return S_FALSE;
bool resetUserData = false;
// set server type in the user-data of the window.
+#ifdef GWLP_USERDATA
LONG_PTR serverType = QAX_INPROC_SERVER;
+#else
+ LONG serverType = QAX_INPROC_SERVER;
+#endif
if (qAxOutProcServer)
serverType = QAX_OUTPROC_SERVER;
+#ifdef GWLP_USERDATA
LONG_PTR oldData = SetWindowLongPtr(pMsg->hwnd, GWLP_USERDATA, serverType);
+#else
+ LONG oldData = SetWindowLong(pMsg->hwnd, GWL_USERDATA, serverType);
+#endif
HRESULT hres = controlSite->TranslateAcceleratorW(pMsg, dwKeyMod);
controlSite->Release();
// reset the user-data for the window.
+#ifdef GWLP_USERDATA
SetWindowLongPtr(pMsg->hwnd, GWLP_USERDATA, oldData);
-
+#else
+ SetWindowLong(pMsg->hwnd, GWL_USERDATA, oldData);
+#endif
return hres;
}