From 58a33cb4e6e2de9d6ea6da16b52e53d840797059 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 4 Apr 1999 11:24:51 +0000 Subject: [PATCH] Win16 corrections git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/prntdlgg.h | 6 +++--- src/common/cmndata.cpp | 5 +++-- src/msw/statbmp.cpp | 2 +- src/msw/utils.cpp | 16 ++++++++++++++++ 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h index 9b86b32965..24f69980e5 100644 --- a/include/wx/generic/prntdlgg.h +++ b/include/wx/generic/prntdlgg.h @@ -101,15 +101,15 @@ public: wxDC *GetPrintDC(); public: - wxStaticText* m_printerMessage; +// wxStaticText* m_printerMessage; wxButton* m_setupButton; - wxButton* m_helpButton; +// wxButton* m_helpButton; wxRadioBox* m_rangeRadioBox; wxTextCtrl* m_fromText; wxTextCtrl* m_toText; wxTextCtrl* m_noCopiesText; wxCheckBox* m_printToFileCheckBox; - wxCheckBox* m_collateCopiesCheckBox; +// wxCheckBox* m_collateCopiesCheckBox; wxPrintDialogData m_printDialogData; diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index fdb6f88075..ab9bc7b4e2 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -210,7 +210,7 @@ wxPrintData::~wxPrintData() #endif } -#ifdef __WXMSW__ +#if defined(__WXMSW__) && defined(__WIN32__) static wxString wxGetPrintDlgError() { @@ -282,7 +282,8 @@ void wxPrintData::ConvertToNative() GlobalFree(pd->hDevNames); pd->hDevMode = NULL; pd->hDevNames = NULL; -#ifdef __WXDEBUG__ + +#if defined(__WXDEBUG__) && defined(__WIN32__) wxString str("Printing error: "); str += wxGetPrintDlgError(); wxLogDebug(str); diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index e2b9f71daf..7c5c1397d6 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -88,7 +88,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id, int winstyle = m_isIcon ? SS_ICON : SS_BITMAP; #else // Win16 const char *classname = "BUTTON"; - int winstyle = BS_OWNERDRAWN; + int winstyle = BS_OWNERDRAW; #endif // Win32 m_hWnd = (WXHWND)::CreateWindow diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 1433988261..3dc34fdc7e 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -301,7 +301,23 @@ static wxTimer *wxTheSleepTimer = NULL; void wxUsleep(unsigned long milliseconds) { +#ifdef __WIN32__ ::Sleep(milliseconds); +#else + if (inTimer) + return; + + wxTheSleepTimer = new wxSleepTimer; + inTimer = TRUE; + wxTheSleepTimer->Start(milliseconds); + while (inTimer) + { + if (wxTheApp->Pending()) + wxTheApp->Dispatch(); + } + delete wxTheSleepTimer; + wxTheSleepTimer = NULL; +#endif } void wxSleep(int nSecs) -- 2.45.2