From: Julian Smart <julian@anthemion.co.uk>
Date: Thu, 16 Mar 2006 11:03:26 +0000 (+0000)
Subject: Mobile 5 Smartphone fixes
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c1dfa9eb8e1d31e514d52cb8dd7b27d03126dd33

Mobile 5 Smartphone fixes


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/docs/msw/wince/readme.txt b/docs/msw/wince/readme.txt
index 44035fca3a..17cefa6e69 100644
--- a/docs/msw/wince/readme.txt
+++ b/docs/msw/wince/readme.txt
@@ -112,8 +112,8 @@ use the same directory and library names, so for the moment
 these builds cannot co-exist simultaneously.
 
 To use Visual Studio 2005, you need to allow VS to convert the projects
-first, and then you need to adjust the library settings of
-each wxWidgets and sample project.
+first (but install all the SDKs you need to _before_ converting), and then
+you need to adjust the library settings of each wxWidgets and sample project.
 
 Edit the configuration properties for each configuration and in the Librarian,
 add a relative path ..\..\lib to each library path. For example:
diff --git a/include/wx/msw/wince/libraries.h b/include/wx/msw/wince/libraries.h
index 953e356b84..22e5347fdf 100644
--- a/include/wx/msw/wince/libraries.h
+++ b/include/wx/msw/wince/libraries.h
@@ -22,9 +22,13 @@
 //     including libraries in project files.
 
 #if defined(__VISUALC__) && defined(__WXWINCE__)
+
 #if (_WIN32_WCE >= 400) || defined(__POCKETPC__)
+    // No commdlg.lib in Mobile 5.0 Smartphone
+#if !(defined(__SMARTPHONE__) && _WIN32_WCE >= 1200)
     #pragma comment(lib,"commdlg.lib")
 #endif
+#endif
 
 #if (_WIN32_WCE >= 400) && !defined(wxNO_RTTI)
     #pragma comment(lib,"ccrtrtti.lib")
diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp
index 9249d8c35c..95ce39da52 100644
--- a/src/msw/dragimag.cpp
+++ b/src/msw/dragimag.cpp
@@ -297,9 +297,14 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS
 #else
         if (!m_hCursorImageList)
         {
+#ifndef SM_CXCURSOR
+			// Smartphone may not have these metric symbol
+			int cxCursor = 16;
+            int cyCursor = 16;
+#else
             int cxCursor = ::GetSystemMetrics(SM_CXCURSOR);
             int cyCursor = ::GetSystemMetrics(SM_CYCURSOR);
-
+#endif
             m_hCursorImageList = (WXHIMAGELIST) ImageList_Create(cxCursor, cyCursor, ILC_MASK, 1, 1);
         }
 
diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp
index a9b58c8a35..97c7d9f9eb 100644
--- a/src/msw/settings.cpp
+++ b/src/msw/settings.cpp
@@ -309,8 +309,12 @@ static const int gs_metricsMap[] =
 
     SM_CXBORDER,
     SM_CYBORDER,
-    SM_CXCURSOR,
+#ifdef SM_CXCURSOR
+	SM_CXCURSOR,
     SM_CYCURSOR,
+#else
+	-1, -1,
+#endif
     SM_CXDOUBLECLK,
     SM_CYDOUBLECLK,
 #if defined(__WIN32__) && defined(SM_CXDRAG)