]> git.saurik.com Git - wxWidgets.git/commitdiff
Added wxWINDOWS_POCKETPC, wxWINDOWS_SMARTPHONE
authorJulian Smart <julian@anthemion.co.uk>
Wed, 16 Mar 2005 10:18:13 +0000 (10:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 16 Mar 2005 10:18:13 +0000 (10:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/function.tex
docs/latex/wx/wxmsw.tex
include/wx/defs.h
src/msw/app.cpp
src/msw/utils.cpp

index dcca717867279dbc43afac1dee8a4c8726e40894..1cc593dd6bed2233a4b2f6b943caed1fe73d0189 100644 (file)
@@ -1388,10 +1388,13 @@ Both {\it major} and {\it minor} have to be looked at as hexadecimal numbers. So
 \twocolitem{Motif}{Return value is wxMOTIF\_X, {\it major} is X version, {\it minor} is X revision.}
 \twocolitem{OS/2}{Return value is wxOS2\_PM.}
 \twocolitem{Windows 3.1}{Return value is wxWINDOWS, {\it major} is 3, {\it minor} is 1.}
-\twocolitem{Windows NT/2000}{Return value is wxWINDOWS\_NT, version is returned in {\it major} and {\it minor}}
+\twocolitem{Windows NT/2000}{Return value is wxWINDOWS\_NT, version is returned in {\it major} and {\it minor}.}
 \twocolitem{Windows 98}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 1 or greater.}
 \twocolitem{Windows 95}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 0.}
 \twocolitem{Win32s (Windows 3.1)}{Return value is wxWIN32S, {\it major} is 3, {\it minor} is 1.}
+\twocolitem{Windows PocketPC}{Return value is wxWINDOWS\_POCKETPC, version is returned in {\it major} and {\it minor}.}
+\twocolitem{Windows Smartphone}{Return value is wxWINDOWS\_SMARTPHONE, version is returned in {\it major} and {\it minor}.}
+\twocolitem{Windows CE (non-specific)}{Return value is wxWINDOWS\_CE, version is returned in {\it major} and {\it minor}.}
 \twocolitem{Watcom C++ 386 supervisor mode (Windows 3.1)}{Return value is wxWIN386, {\it major} is 3, {\it minor} is 1.}
 \end{twocollist}
 
index 027f1d5074b9820be5525ae2efec06126de2d818..637a048123eb5d9dc226a02b586693039cdf9fb4 100644 (file)
@@ -34,7 +34,7 @@ the amount of spacing used by sizers, for which you can
 use a macro such as this:
 
 \begin{verbatim}
-#if defined(__WXWINCE__
+#if defined(__WXWINCE__)
     #define wxLARGESMALL(large,small) small
 #else
     #define wxLARGESMALL(large,small) large
@@ -52,8 +52,17 @@ You can test the return value of wxSystemSettings::GetScreenType()
 for a qualitative assessment of what kind of display is available,
 or use wxGetDisplaySize() if you need more information.
 
+You can also use wxGetOsVersion to test for a version of Windows CE at
+run-time (see the next section). However, because different builds
+are currently required to target different kinds of device, these
+values are hard-wired according to the build, and you cannot
+dynamically adapt the same executable for different major Windows CE
+platforms. This would require a different approach to the way
+wxWidgets adapts its behaviour (such as for menubars) to suit the
+style of device.
+
 See the "Life!" example (demos/life) for an example of
-an application that has been tailored for Windows CE use.
+an application that has been tailored for PocketPC and Smartphone use.
 
 \subsubsection{Testing for WinCE SDKs}
 
@@ -70,6 +79,14 @@ Use these preprocessor symbols to test for the different types of device or SDK:
 \twocolitem{\_\_WINCE\_NET\_\_}{Microsoft-powered Windows CE .NET devices (\_WIN32\_WCE is 400 or greater)}
 \end{twocollist}
 
+wxGetOsVersion will return these values:
+
+\begin{twocollist}\itemsep=0pt
+\twocolitem{wxWINDOWS\_POCKETPC}{The application is running under PocketPC.}
+\twocolitem{wxWINDOWS\_SMARTPHONE}{The application is running under Smartphone.}
+\twocolitem{wxWINDOWS\_CE}{The application is running under Windows CE (built with the Standard SDK).}
+\end{twocollist}
+
 \subsubsection{Window sizing in wxWinCE}
 
 When creating frames and dialogs, create them with wxDefaultPosition and
index c06c812e445a1d10ea3f5d7eb6ec019d5abf3dfd..7d360b82fd61904301aa8b80a250c216fee19058 100644 (file)
@@ -604,7 +604,9 @@ enum
     wxWIN32S,                 /*  Windows 32S API */
     wxWIN95,                  /*  Windows 95 */
     wxWIN386,                 /*  Watcom 32-bit supervisor modus */
-    wxWINDOWS_CE,             /*  Windows CE */
+    wxWINDOWS_CE,             /*  Windows CE (generic) */
+    wxWINDOWS_POCKETPC,       /*  Windows CE PocketPC */
+    wxWINDOWS_SMARTPHONE,     /*  Windows CE Smartphone */
     wxMGL_UNIX,               /*  MGL with direct hardware access */
     wxMGL_X,                  /*  MGL on X */
     wxMGL_WIN32,              /*  MGL on Win32 */
index b399d62aaa7bb573d2b76fce8f1d6f2075506261..64ea13114310a536679e450663793536e052a346 100644 (file)
@@ -279,7 +279,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
     // program under Win9x w/o MSLU emulation layer - if so, abort right now
     // as it has no chance to work
 #if wxUSE_UNICODE && !wxUSE_UNICODE_MSLU
-    if ( wxGetOsVersion() != wxWINDOWS_NT && wxGetOsVersion() != wxWINDOWS_CE )
+    if ( wxGetOsVersion() != wxWINDOWS_NT && wxGetOsVersion() != wxWINDOWS_CE && wxGetOsVersion() != wxWINDOWS_SMARTPHONE && wxGetOsVersion() != wxWINDOWS_POCKETPC )
     {
         // note that we can use MessageBoxW() as it's implemented even under
         // Win9x - OTOH, we can't use wxGetTranslation() because the file APIs
index cb4eba01722b599012352ec58ac7d56369df5e8a..09cf9f13fef0f4ddeee9d75eb2c1d48cd9a4906c 100644 (file)
@@ -1210,6 +1210,11 @@ wxToolkitInfo& wxAppTraits::GetToolkitInfo()
             s_major = info.dwMajorVersion;
             s_minor = info.dwMinorVersion;
 
+#ifdef __SMARTPHONE__
+            s_ver = wxWINDOWS_SMARTPHONE;
+#elif defined(__POCKETPC__)
+            s_ver = wxWINDOWS_POCKETPC;
+#else
             switch ( info.dwPlatformId )
             {
                 case VER_PLATFORM_WIN32s:
@@ -1223,12 +1228,10 @@ wxToolkitInfo& wxAppTraits::GetToolkitInfo()
                 case VER_PLATFORM_WIN32_NT:
                     s_ver = wxWINDOWS_NT;
                     break;
-#ifdef __WXWINCE__
                 case VER_PLATFORM_WIN32_CE:
                     s_ver = wxWINDOWS_CE;
-                    break;
-#endif
             }
+#endif            
         }
     }