From 529b7f71bd62a79c79c91931729bdaa245489750 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Tue, 15 Jul 2003 13:15:48 +0000 Subject: [PATCH] Small tweaks for WinCE compatibility Use generic folder dialog for WinCE git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/wince.rsp | 3 +++ include/wx/dirdlg.h | 2 +- include/wx/hashmap.h | 4 +++- samples/calendar/calendar.cpp | 4 ++-- samples/caret/caret.cpp | 3 +-- samples/dialogs/dialogs.cpp | 4 ++++ src/common/appcmn.cpp | 4 ++-- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/distrib/msw/wince.rsp b/distrib/msw/wince.rsp index 2b4ab92bb7..99f020f17d 100644 --- a/distrib/msw/wince.rsp +++ b/distrib/msw/wince.rsp @@ -4,3 +4,6 @@ src/msw/wince/wxWindowsCE.vcw samples/minimal/minimalCE.vcp samples/minimal/minimalCE.vcw +samples/widgets/widgetsCE.vcp +samples/widgets/widgetsCE.vcw + diff --git a/include/wx/dirdlg.h b/include/wx/dirdlg.h index 738b1013cf..cee0581f21 100644 --- a/include/wx/dirdlg.h +++ b/include/wx/dirdlg.h @@ -43,7 +43,7 @@ public: */ #if defined(__WXMSW__) - #if defined(__WIN16__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) || defined(__SALFORDC__) || !wxUSE_OLE + #if defined(__WXWINCE__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) || defined(__SALFORDC__) || !wxUSE_OLE #include "wx/generic/dirdlgg.h" #define wxDirDialog wxGenericDirDialog #else diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h index 14d8684f54..23e685dd2d 100644 --- a/include/wx/hashmap.h +++ b/include/wx/hashmap.h @@ -75,7 +75,9 @@ protected: static void** AllocTable( size_t sz ) { #ifdef __WXWINCE__ - return (void **)malloc(sz * sizeof(void*)); + void** ptr = (void **)malloc(sz * sizeof(void*)); + memset( ptr, 0, sz * sizeof(void*)); + return ptr; #else return (void **)calloc(sz, sizeof(void*)); #endif diff --git a/samples/calendar/calendar.cpp b/samples/calendar/calendar.cpp index 710a20b00b..a19364dc5c 100644 --- a/samples/calendar/calendar.cpp +++ b/samples/calendar/calendar.cpp @@ -251,8 +251,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) _T("Allow changing the year in the calendar"), TRUE); menuCal->AppendSeparator(); - menuCal->Append(Calendar_Cal_SetDate, "SetDate()", "Set date to 2005-12-24."); - menuCal->Append(Calendar_Cal_Today, "Today()", "Set the current date."); + menuCal->Append(Calendar_Cal_SetDate, _T("SetDate()"), _T("Set date to 2005-12-24.")); + menuCal->Append(Calendar_Cal_Today, _T("Today()"), _T("Set the current date.")); // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar; diff --git a/samples/caret/caret.cpp b/samples/caret/caret.cpp index 6ca8f4a29c..4fbef96b2a 100644 --- a/samples/caret/caret.cpp +++ b/samples/caret/caret.cpp @@ -272,8 +272,7 @@ void MyFrame::OnSetFontSize(wxCommandEvent& WXUNUSED(event)) { long fontSize = wxGetNumberFromUser ( - _T("The font size also determines the caret size so\n" - "this demonstrates resizing the caret."), + _T("The font size also determines the caret size so\nthis demonstrates resizing the caret."), _T("Font size (in points):"), _T("wxCaret sample"), 12, 1, 100, diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 5d36625f14..5f20469d3a 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -25,6 +25,10 @@ #include "wx/wx.h" #endif +#ifdef __WXWINCE__ +#include "wx/msw/wince/time.h" +#endif + #include "wx/colordlg.h" #include "wx/filedlg.h" #include "wx/dirdlg.h" diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 164642f0f5..02643c08e5 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -250,8 +250,8 @@ bool wxAppBase::SendIdleEvents(wxWindow* win, wxIdleEvent& event) wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst(); while ( node ) { - wxWindow *win = node->GetData(); - if (SendIdleEvents(win, event)) + wxWindow *child = node->GetData(); + if (SendIdleEvents(child, event)) needMore = TRUE; node = node->GetNext(); -- 2.45.2