WinCE fixes from "Viktor Voroshylo" <viktor@voroshylo.com>

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-11-18 21:25:44 +00:00
parent 0fee8cc4fa
commit eae4425db6
10 changed files with 24 additions and 10 deletions

View File

@@ -15,8 +15,8 @@
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/string.h" #include "wx/string.h"
WXDLLIMPEXP_BASE int wxStringSortAscending(wxString*, wxString*); WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortAscending(wxString*, wxString*);
WXDLLIMPEXP_BASE int wxStringSortDescending(wxString*, wxString*); WXDLLIMPEXP_BASE int wxCMPFUNC_CONV wxStringSortDescending(wxString*, wxString*);
#if wxUSE_STL #if wxUSE_STL

View File

@@ -12,7 +12,7 @@
#ifndef _WX_CE_MISSING_H_ #ifndef _WX_CE_MISSING_H_
#define _WX_CE_MISSING_H_ #define _WX_CE_MISSING_H_
BOOL IsIconic( HWND hWnd ) inline BOOL IsIconic( HWND hWnd )
{ {
// Probably not right... // Probably not right...
#if 0 #if 0
@@ -22,6 +22,10 @@ BOOL IsIconic( HWND hWnd )
return FALSE; return FALSE;
} }
#ifdef WIN32_PLATFORM_PSPC
#define SM_CXCURSOR 13
#define SM_CYCURSOR 14
#endif
/* /*
Most of these are in MSVC++6.0 <wx\wince\winuser.h> Most of these are in MSVC++6.0 <wx\wince\winuser.h>

View File

@@ -2325,12 +2325,12 @@ bool wxArrayString::operator==(const wxArrayString& a) const
#endif // !wxUSE_STL #endif // !wxUSE_STL
int wxStringSortAscending(wxString* s1, wxString* s2) int wxCMPFUNC_CONV wxStringSortAscending(wxString* s1, wxString* s2)
{ {
return wxStrcmp(s1->c_str(), s2->c_str()); return wxStrcmp(s1->c_str(), s2->c_str());
} }
int wxStringSortDescending(wxString* s1, wxString* s2) int wxCMPFUNC_CONV wxStringSortDescending(wxString* s1, wxString* s2)
{ {
return -wxStrcmp(s1->c_str(), s2->c_str()); return -wxStrcmp(s1->c_str(), s2->c_str());
} }

View File

@@ -1389,7 +1389,7 @@ int isascii( int c )
} }
#endif #endif
#if defined(__WXWINCE__) #if defined(__WXWINCE__) && (_WIN32_WCE <= 211)
#if (_WIN32_WCE < 300) #if (_WIN32_WCE < 300)
void *calloc( size_t num, size_t size ) void *calloc( size_t num, size_t size )
{ {
@@ -1399,12 +1399,10 @@ void *calloc( size_t num, size_t size )
} }
#endif #endif
#if (_WIN32_WCE <= 211)
int isspace(int c) int isspace(int c)
{ {
return (c == ' '); return (c == ' ');
} }
#endif
#endif #endif

View File

@@ -361,7 +361,7 @@ bool wxIsDriveAvailable(const wxString& dirName)
// Function which is called by quick sort. We want to override the default wxArrayString behaviour, // Function which is called by quick sort. We want to override the default wxArrayString behaviour,
// and sort regardless of case. // and sort regardless of case.
static int LINKAGEMODE wxDirCtrlStringCompareFunction(wxString* strFirst, wxString* strSecond) static int wxCMPFUNC_CONV wxDirCtrlStringCompareFunction(wxString* strFirst, wxString* strSecond)
{ {
return strFirst->CmpNoCase(*strSecond); return strFirst->CmpNoCase(*strSecond);
} }

View File

@@ -51,6 +51,10 @@
#include "wx/msw/dragimag.h" #include "wx/msw/dragimag.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
#ifdef __WXWINCE__ // for SM_CXCURSOR and SM_CYCURSOR
#include "wx/msw/wince/missing.h"
#endif // __WXWINCE__
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) #if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
#include <commctrl.h> #include <commctrl.h>
#endif #endif

View File

@@ -49,6 +49,7 @@
#include <windowsx.h> #include <windowsx.h>
#include <tchar.h> #include <tchar.h>
#include <ole2.h> #include <ole2.h>
#include <shellapi.h>
#include <commctrl.h> #include <commctrl.h>
#include <aygshell.h> #include <aygshell.h>

View File

@@ -40,6 +40,10 @@
#include "wx/module.h" #include "wx/module.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
#ifdef __WXWINCE__ // for SM_CXCURSOR and SM_CYCURSOR
#include "wx/msw/wince/missing.h"
#endif // __WXWINCE__
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// private classes // private classes
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -250,6 +254,7 @@ wxFont wxCreateFontFromStockObject(int index)
wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
{ {
#ifdef __WXWINCE__
// this one is special: we don't get it from GetStockObject() // this one is special: we don't get it from GetStockObject()
if ( index == wxSYS_ICONTITLE_FONT ) if ( index == wxSYS_ICONTITLE_FONT )
{ {
@@ -257,6 +262,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0); SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0);
return wxCreateFontFromLogFont(&lf); return wxCreateFontFromLogFont(&lf);
} }
#endif // __WXWINCE__
// wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're
// called fairly often - this is why we cache this particular font // called fairly often - this is why we cache this particular font

View File

@@ -52,6 +52,7 @@
#include <windowsx.h> #include <windowsx.h>
#include <tchar.h> #include <tchar.h>
#include <ole2.h> #include <ole2.h>
#include <shellapi.h>
#include <commctrl.h> #include <commctrl.h>
#include <aygshell.h> #include <aygshell.h>

View File

@@ -173,7 +173,7 @@ time_t __cdecl time(time_t *t)
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
time_t __cdecl mktime(struct tm *t) time_t __cdecl mktime(struct tm *t)
{ {
return (common_tm_to_time(t->tm_mday, t->tm_mon, t->tm_year, t->tm_hour, t->tm_min, t->tm_sec)) ; return (common_tm_to_time(t->tm_mday, t->tm_mon+1, t->tm_year+1900, t->tm_hour, t->tm_min, t->tm_sec)) ;
} }