Getting various compilers to work with wxWin again

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-06-09 18:16:38 +00:00
parent 4286a5b595
commit 25889d3c43
28 changed files with 180 additions and 51 deletions

View File

@@ -316,7 +316,8 @@ Here are the steps required:
socket-related files in src/msw/makefile.g95. socket-related files in src/msw/makefile.g95.
- Set your WXWIN variable to where wxWindows is installed. - Set your WXWIN variable to where wxWindows is installed.
For Cygwin/Mingw32, use forward slashes in the path, not backslashes. *** IMPORTANT: For Cygwin/Mingw32, use forward slashes in the path, not
backslashes.
- Use the makefile.g95 files for compiling wxWindows and samples, - Use the makefile.g95 files for compiling wxWindows and samples,
e.g.: e.g.:

View File

@@ -158,7 +158,7 @@ class WXDLLEXPORT wxPrintData: public wxObject
void operator=(const wxPrintSetupData& setupData); void operator=(const wxPrintSetupData& setupData);
#endif #endif
#ifdef __WXMSW__ #if defined(__WXMSW__)
// Convert to/from the DEVMODE structure // Convert to/from the DEVMODE structure
void ConvertToNative(); void ConvertToNative();
void ConvertFromNative(); void ConvertFromNative();

View File

@@ -72,6 +72,7 @@ enum
// Windows using PostScript print/preview) // Windows using PostScript print/preview)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_POSTSCRIPT
class WXDLLEXPORT wxGenericPrintDialog : public wxDialog class WXDLLEXPORT wxGenericPrintDialog : public wxDialog
{ {
DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog) DECLARE_DYNAMIC_CLASS(wxGenericPrintDialog)
@@ -150,6 +151,8 @@ public:
wxPrintData& GetPrintData() { return m_printData; } wxPrintData& GetPrintData() { return m_printData; }
#endif // wxUSE_POSTSCRIPT #endif // wxUSE_POSTSCRIPT
}; };
#endif
// wxUSE_POSTSCRIPT
class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog class WXDLLEXPORT wxGenericPageSetupDialog : public wxDialog
{ {

View File

@@ -59,7 +59,7 @@ public:
void Resume() { m_state = Continue; } void Resume() { m_state = Continue; }
/// Callback for optional abort button /// Callback for optional abort button
void OnCancel(wxEvent& WXUNUSED(event)) { m_state = Canceled; } void OnCancel(wxCommandEvent& WXUNUSED(event)) { m_state = Canceled; }
/// callback to disable "hard" window closing /// callback to disable "hard" window closing
void OnClose(wxCloseEvent& event); void OnClose(wxCloseEvent& event);

View File

@@ -33,7 +33,7 @@ public:
// ctor & dtor // ctor & dtor
wxDataObject(); wxDataObject();
~wxDataObject(); virtual ~wxDataObject();
// pure virtuals to override // pure virtuals to override
// get the best suited format for our data // get the best suited format for our data
@@ -114,9 +114,9 @@ public:
virtual bool IsSupportedFormat(wxDataFormat format) const virtual bool IsSupportedFormat(wxDataFormat format) const
{ return format == wxDF_BITMAP; } { return format == wxDF_BITMAP; }
virtual size_t GetDataSize() const virtual size_t GetDataSize() const
{ wxASSERT(false); return 0; } // BEMIMP { wxASSERT(FALSE); return 0; } // BEMIMP
virtual void GetDataHere(void *pBuf) const virtual void GetDataHere(void *pBuf) const
{ wxASSERT(false); } // BEMIMP { wxASSERT(FALSE); } // BEMIMP
private: private:
wxBitmap m_bitmap; wxBitmap m_bitmap;

View File

@@ -9,8 +9,12 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
/* THIS SHOULD NOT BE USED since you might include it once e.g. in window.h,
* then again _AFTER_ you've included windows.h, in which case it won't work
* a 2nd time -- JACS
#ifndef _WX_WINUNDEF_H_ #ifndef _WX_WINUNDEF_H_
#define _WX_WINUNDEF_H_ #define _WX_WINUNDEF_H_
*/
// windows.h #defines the following identifiers which are also used in wxWin // windows.h #defines the following identifiers which are also used in wxWin
@@ -117,7 +121,7 @@
#ifdef StartDoc #ifdef StartDoc
#undef StartDoc #undef StartDoc
#ifdef __MINGW32__ #ifdef __GNUWIN32__
#define DOCINFOW DOCINFO #define DOCINFOW DOCINFO
#define DOCINFOA DOCINFO #define DOCINFOA DOCINFO
#endif #endif
@@ -196,4 +200,5 @@
// #undef GetNextChild // #undef GetNextChild
//endif //endif
#endif // _WX_WINUNDEF_H_ // #endif // _WX_WINUNDEF_H_

View File

@@ -43,6 +43,28 @@ private:
typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&); typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
// Truncation in 16-bit BC++ means we need to define these differently
#if defined(__BORLANDC__) && defined(__WIN16__)
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
{ \
wxEVT_COMMAND_NB_PAGE_CHANGED, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
NULL \
},
#define EVT_NOTEBOOK_PAGE_CHANGING(id, fn) \
{ \
wxEVT_COMMAND_NB_PAGE_CHANGING, \
id, \
-1, \
(wxObjectEventFunction)(wxEventFunction)(wxNotebookEventFunction) &fn, \
NULL \
},
#else
#define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \ #define EVT_NOTEBOOK_PAGE_CHANGED(id, fn) \
{ \ { \
wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \ wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, \
@@ -61,6 +83,8 @@ typedef void (wxEvtHandler::*wxNotebookEventFunction)(wxNotebookEvent&);
NULL \ NULL \
}, },
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxNotebook class itself // wxNotebook class itself
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -195,6 +195,10 @@ typedef _TUCHAR wxUChar;
#endif #endif
#elif defined(__GNUWIN32__) && !defined(__MINGW32__) // Cygwin (not Mingw32) doesn't have wcslen.h, needed in buffer.h #elif defined(__GNUWIN32__) && !defined(__MINGW32__) // Cygwin (not Mingw32) doesn't have wcslen.h, needed in buffer.h
#define wxUSE_WCHAR_T 0 #define wxUSE_WCHAR_T 0
#elif defined(__BORLANDC__) // WIN16 BC++
#define wxUSE_WCHAR_T 0
#elif defined(__WATCOMC__)
#define wxUSE_WCHAR_T 0
#else #else
// add additional compiler checks if this fails // add additional compiler checks if this fails
#define wxUSE_WCHAR_T 1 #define wxUSE_WCHAR_T 1
@@ -319,7 +323,50 @@ typedef unsigned char wxUChar;
#define wxSetlocale setlocale #define wxSetlocale setlocale
// string.h functions // string.h functions
#define wxStricmp strcasecmp // #define wxStricmp strcasecmp
// Taken from string.h since it tests for platform more correctly
// portable strcasecmp/_stricmp
inline int WXDLLEXPORT wxStricmp(const char *psz1, const char *psz2)
{
#if defined(__VISUALC__) || ( defined(__MWERKS__) && defined(__INTEL__) )
return _stricmp(psz1, psz2);
#elif defined(__SC__)
return _stricmp(psz1, psz2);
#elif defined(__SALFORDC__)
return stricmp(psz1, psz2);
#elif defined(__BORLANDC__)
return stricmp(psz1, psz2);
#elif defined(__WATCOMC__)
return stricmp(psz1, psz2);
#elif defined(__UNIX__) || defined(__GNUWIN32__)
return strcasecmp(psz1, psz2);
#elif defined(__MWERKS__) && !defined(__INTEL__)
register char c1, c2;
do {
c1 = tolower(*psz1++);
c2 = tolower(*psz2++);
} while ( c1 && (c1 == c2) );
return c1 - c2;
#else
// almost all compilers/libraries provide this function (unfortunately under
// different names), that's why we don't implement our own which will surely
// be more efficient than this code (uncomment to use):
/*
register char c1, c2;
do {
c1 = tolower(*psz1++);
c2 = tolower(*psz2++);
} while ( c1 && (c1 == c2) );
return c1 - c2;
*/
#error "Please define string case-insensitive compare for your OS/compiler"
#endif // OS/compiler
}
// #define wxStrtok strtok_r // this needs a configure check // #define wxStrtok strtok_r // this needs a configure check
// leave the rest to defaults below // leave the rest to defaults below

View File

@@ -225,8 +225,9 @@ wxPrintData::~wxPrintData()
#endif #endif
} }
#if defined(__WXMSW__) && defined(__WIN32__) #if defined(__WXMSW__) // && defined(__WIN32__)
#ifdef __WIN32__
static wxString wxGetPrintDlgError() static wxString wxGetPrintDlgError()
{ {
DWORD err = CommDlgExtendedError(); DWORD err = CommDlgExtendedError();
@@ -259,8 +260,7 @@ static wxString wxGetPrintDlgError()
} }
return msg; return msg;
} }
#endif
void wxPrintData::ConvertToNative() void wxPrintData::ConvertToNative()
{ {
@@ -331,8 +331,10 @@ void wxPrintData::ConvertToNative()
//// Collation //// Collation
#ifndef __WIN16__
devMode->dmCollate = (m_printCollate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE); devMode->dmCollate = (m_printCollate ? DMCOLLATE_TRUE : DMCOLLATE_FALSE);
devMode->dmFields |= DM_COLLATE; devMode->dmFields |= DM_COLLATE;
#endif
//// Number of copies //// Number of copies
@@ -451,6 +453,7 @@ void wxPrintData::ConvertFromNative()
//// Collation //// Collation
#ifndef __WIN16__
if (devMode->dmFields & DM_COLLATE) if (devMode->dmFields & DM_COLLATE)
{ {
if (devMode->dmCollate == DMCOLLATE_TRUE) if (devMode->dmCollate == DMCOLLATE_TRUE)
@@ -458,6 +461,7 @@ void wxPrintData::ConvertFromNative()
else else
m_printCollate = FALSE; m_printCollate = FALSE;
} }
#endif
//// Number of copies //// Number of copies
@@ -734,8 +738,8 @@ void wxPrintDialogData::ConvertToNative()
#ifdef __GNUWIN32__ #ifdef __GNUWIN32__
pd->lStructSize = 66 ; pd->lStructSize = 66 ;
#else #else
#endif
pd->lStructSize = sizeof(PRINTDLG); pd->lStructSize = sizeof(PRINTDLG);
#endif
pd->hwndOwner = (HWND)NULL; pd->hwndOwner = (HWND)NULL;
pd->hDevMode = NULL; // Will be created by PrintDlg pd->hDevMode = NULL; // Will be created by PrintDlg
pd->hDevNames = NULL; // Ditto pd->hDevNames = NULL; // Ditto

View File

@@ -1146,7 +1146,11 @@ void wxTrace(const wxChar *fmt ...)
} }
else else
#ifdef __WXMSW__ #ifdef __WXMSW__
#ifdef __WIN32__
OutputDebugString((LPCTSTR)buffer) ; OutputDebugString((LPCTSTR)buffer) ;
#else
OutputDebugString((const char*) buffer) ;
#endif
#else #else
fprintf(stderr, buffer); fprintf(stderr, buffer);
#endif #endif
@@ -1178,7 +1182,11 @@ void wxTraceLevel(int level, const wxChar *fmt ...)
} }
else else
#ifdef __WXMSW__ #ifdef __WXMSW__
#ifdef __WIN32__
OutputDebugString((LPCTSTR)buffer) ; OutputDebugString((LPCTSTR)buffer) ;
#else
OutputDebugString((const char*) buffer) ;
#endif
#else #else
fprintf(stderr, buffer); fprintf(stderr, buffer);
#endif #endif

View File

@@ -31,6 +31,7 @@
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/icon.h"
#include "wx/generic/dirdlgg.h" #include "wx/generic/dirdlgg.h"

View File

@@ -31,7 +31,7 @@
#include <wx/log.h> #include <wx/log.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/generic/imaglist.h> #include <wx/generic/imaglist.h>
#include <wx/generic/notebook.h> #include <wx/notebook.h>
#include <wx/dcclient.h> #include <wx/dcclient.h>
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -479,7 +479,7 @@ bool wxNotebook::RefreshLayout(bool force)
m_tabView->SetViewRect(rect); m_tabView->SetViewRect(rect);
m_tabView->Layout(); m_tabView->LayoutTabs();
// Need to do it a 2nd time to get the tab height with // Need to do it a 2nd time to get the tab height with
// the new view width, since changing the view width changes the // the new view width, since changing the view width changes the
@@ -492,7 +492,7 @@ bool wxNotebook::RefreshLayout(bool force)
m_tabView->SetViewRect(rect); m_tabView->SetViewRect(rect);
m_tabView->Layout(); m_tabView->LayoutTabs();
if (!force && (rect == oldRect)) if (!force && (rect == oldRect))
return FALSE; return FALSE;

View File

@@ -65,18 +65,21 @@
// wxWin macros // wxWin macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if !USE_SHARED_LIBRARY
#if wxUSE_POSTSCRIPT #if wxUSE_POSTSCRIPT
#if !USE_SHARED_LIBRARY
IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog) IMPLEMENT_CLASS(wxGenericPrintDialog, wxDialog)
IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog) IMPLEMENT_CLASS(wxGenericPrintSetupDialog, wxDialog)
IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog)
BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog) BEGIN_EVENT_TABLE(wxGenericPrintDialog, wxDialog)
EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK) EVT_BUTTON(wxID_OK, wxGenericPrintDialog::OnOK)
EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup) EVT_BUTTON(wxPRINTID_SETUP, wxGenericPrintDialog::OnSetup)
EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange) EVT_RADIOBOX(wxPRINTID_RANGE, wxGenericPrintDialog::OnRange)
END_EVENT_TABLE() END_EVENT_TABLE()
#endif
IMPLEMENT_CLASS(wxGenericPageSetupDialog, wxDialog)
BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxDialog) BEGIN_EVENT_TABLE(wxGenericPageSetupDialog, wxDialog)
EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter) EVT_BUTTON(wxPRINTID_SETUP, wxGenericPageSetupDialog::OnPrinter)
@@ -89,6 +92,8 @@
extern wxPrintPaperDatabase *wxThePrintPaperDatabase; extern wxPrintPaperDatabase *wxThePrintPaperDatabase;
#if wxUSE_POSTSCRIPT
// ============================================================================ // ============================================================================
// implementation // implementation
// ============================================================================ // ============================================================================

View File

@@ -31,11 +31,7 @@
#ifdef __WXMSW__ #ifdef __WXMSW__
#include <windows.h> #include <windows.h>
#include "wx/msw/winundef.h"
#ifdef DrawText
#undef DrawText
#endif
#endif #endif
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY

View File

@@ -926,7 +926,7 @@ bool wxTreeCtrl::TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem
size_t count = children.Count(); size_t count = children.Count();
for (size_t n=(size_t)(index+1); n<count; ++n) for (size_t n=(size_t)(index+1); n<count; ++n)
if (TagAllChildrenUntilLast(children[n], last_item, select)) return true; if (TagAllChildrenUntilLast(children[n], last_item, select)) return TRUE;
return TagNextChildren(parent, last_item, select); return TagNextChildren(parent, last_item, select);
} }
@@ -936,17 +936,17 @@ bool wxTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, wxGenericT
crt_item->SetHilight(select); crt_item->SetHilight(select);
RefreshLine(crt_item); RefreshLine(crt_item);
if (crt_item==last_item) return true; if (crt_item==last_item) return TRUE;
if (crt_item->HasChildren()) if (crt_item->HasChildren())
{ {
wxArrayTreeItems& children = crt_item->GetChildren(); wxArrayTreeItems& children = crt_item->GetChildren();
size_t count = children.Count(); size_t count = children.Count();
for ( size_t n = 0; n < count; ++n ) for ( size_t n = 0; n < count; ++n )
if (TagAllChildrenUntilLast(children[n], last_item, select)) return true; if (TagAllChildrenUntilLast(children[n], last_item, select)) return TRUE;
} }
return false; return FALSE;
} }
void wxTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, wxGenericTreeItem *item2) void wxTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, wxGenericTreeItem *item2)
@@ -988,8 +988,8 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId,
// to keep going anyhow !!! // to keep going anyhow !!!
if (is_single) if (is_single)
{ {
unselect_others=true; unselect_others=TRUE;
extended_select=false; extended_select=FALSE;
} }
wxGenericTreeItem *item = itemId.m_pItem; wxGenericTreeItem *item = itemId.m_pItem;
@@ -1029,7 +1029,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId,
} }
else else
{ {
bool select=true; // the default bool select=TRUE; // the default
// Check if we need to toggle hilight (ctrl mode) // Check if we need to toggle hilight (ctrl mode)
if (!unselect_others) if (!unselect_others)

View File

@@ -60,10 +60,14 @@ int wxCaretBase::GetBlinkTime()
//static //static
void wxCaretBase::SetBlinkTime(int milliseconds) void wxCaretBase::SetBlinkTime(int milliseconds)
{ {
#ifdef __WIN16__
::SetCaretBlinkTime(milliseconds) ;
#else
if ( !::SetCaretBlinkTime(milliseconds) ) if ( !::SetCaretBlinkTime(milliseconds) )
{ {
wxLogLastError("SetCaretBlinkTime"); wxLogLastError("SetCaretBlinkTime");
} }
#endif
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -77,6 +81,10 @@ bool wxCaret::MSWCreateCaret()
if ( !m_hasCaret ) if ( !m_hasCaret )
{ {
#ifdef __WIN16__
::CreateCaret(GetWinHwnd(GetWindow()), 0, m_width, m_height) ;
m_hasCaret = TRUE;
#else
if ( !::CreateCaret(GetWinHwnd(GetWindow()), 0, m_width, m_height) ) if ( !::CreateCaret(GetWinHwnd(GetWindow()), 0, m_width, m_height) )
{ {
wxLogLastError("CreateCaret"); wxLogLastError("CreateCaret");
@@ -85,6 +93,7 @@ bool wxCaret::MSWCreateCaret()
{ {
m_hasCaret = TRUE; m_hasCaret = TRUE;
} }
#endif
} }
return m_hasCaret; return m_hasCaret;
@@ -112,10 +121,14 @@ void wxCaret::OnKillFocus()
{ {
m_hasCaret = FALSE; m_hasCaret = FALSE;
#ifdef __WIN16__
::DestroyCaret() ;
#else
if ( !::DestroyCaret() ) if ( !::DestroyCaret() )
{ {
wxLogLastError("DestroyCaret"); wxLogLastError("DestroyCaret");
} }
#endif
} }
} }
@@ -133,20 +146,28 @@ void wxCaret::DoShow()
(void)MSWCreateCaret(); (void)MSWCreateCaret();
} }
#ifdef __WIN16__
::ShowCaret(GetWinHwnd(GetWindow())) ;
#else
if ( !::ShowCaret(GetWinHwnd(GetWindow())) ) if ( !::ShowCaret(GetWinHwnd(GetWindow())) )
{ {
wxLogLastError("ShowCaret"); wxLogLastError("ShowCaret");
} }
#endif
} }
void wxCaret::DoHide() void wxCaret::DoHide()
{ {
if ( m_hasCaret ) if ( m_hasCaret )
{ {
#ifdef __WIN16__
::HideCaret(GetWinHwnd(GetWindow())) ;
#else
if ( !::HideCaret(GetWinHwnd(GetWindow())) ) if ( !::HideCaret(GetWinHwnd(GetWindow())) )
{ {
wxLogLastError("HideCaret"); wxLogLastError("HideCaret");
} }
#endif
} }
} }
@@ -158,10 +179,14 @@ void wxCaret::DoMove()
{ {
if ( m_hasCaret ) if ( m_hasCaret )
{ {
#ifdef __WIN16__
::SetCaretPos(m_x, m_y) ;
#else
if ( !::SetCaretPos(m_x, m_y) ) if ( !::SetCaretPos(m_x, m_y) )
{ {
wxLogLastError("SetCaretPos"); wxLogLastError("SetCaretPos");
} }
#endif
} }
//else: we don't have caret right now, nothing to do (this does happen) //else: we don't have caret right now, nothing to do (this does happen)
} }

View File

@@ -559,7 +559,7 @@ void wxDC::DoDrawRoundedRectangle(long x, long y, long width, long height, doubl
long y2 = (y+height); long y2 = (y+height);
(void)RoundRect(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2), (void)RoundRect(GetHdc(), XLOG2DEV(x), YLOG2DEV(y), XLOG2DEV(x2),
YLOG2DEV(y2), 2*XLOG2DEV(radius), 2*YLOG2DEV(radius)); YLOG2DEV(y2), (int) (2*XLOG2DEV(radius)), (int)( 2*YLOG2DEV(radius)));
CalcBoundingBox(x, y); CalcBoundingBox(x, y);
CalcBoundingBox(x2, y2); CalcBoundingBox(x2, y2);

View File

@@ -79,7 +79,7 @@ static PAINTSTRUCT g_paintStruct;
// created in resopnse to WM_PAINT message - doing this from elsewhere is a // created in resopnse to WM_PAINT message - doing this from elsewhere is a
// common programming error among wxWindows programmers and might lead to // common programming error among wxWindows programmers and might lead to
// very subtle and difficult to debug refresh/repaint bugs. // very subtle and difficult to debug refresh/repaint bugs.
extern bool g_isPainting = FALSE; bool g_isPainting = FALSE;
#endif // __WXDEBUG__ #endif // __WXDEBUG__
// =========================================================================== // ===========================================================================

View File

@@ -27,6 +27,7 @@
#include "wx/dcmemory.h" #include "wx/dcmemory.h"
#include <windows.h> #include <windows.h>
#include "wx/msw/winundef.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC) IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)

View File

@@ -20,14 +20,6 @@
* This will produce a big PCH file. * This will produce a big PCH file.
*/ */
#if defined(__BORLANDC__)
#if !(defined(__WIN32__) || defined(__NT__) || defined(__WIN32__))
#pragma hdrfile "c:\wx\src\msw\wx.pch"
#endif
#pragma hdrstart
#endif
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__

View File

@@ -84,6 +84,7 @@ GENERICOBJS= \
COMMONOBJS = \ COMMONOBJS = \
$(COMMDIR)\config.obj \ $(COMMDIR)\config.obj \
$(COMMDIR)\cmndata.obj \ $(COMMDIR)\cmndata.obj \
$(COMMDIR)\dcbase.obj \
$(COMMDIR)\docview.obj \ $(COMMDIR)\docview.obj \
$(COMMDIR)\docmdi.obj \ $(COMMDIR)\docmdi.obj \
$(COMMDIR)\dynarray.obj \ $(COMMDIR)\dynarray.obj \
@@ -702,6 +703,11 @@ $(COMMDIR)/cmndata.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<< <<
$(COMMDIR)/dcbase.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/docview.obj: $*.$(SRCSUFF) $(COMMDIR)/docview.obj: $*.$(SRCSUFF)
cl @<< cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)

View File

@@ -65,7 +65,6 @@ COMMONOBJS = cmndata.obj &
gdicmn.obj & gdicmn.obj &
image.obj & image.obj &
imagpng.obj & imagpng.obj &
imagjpeg.obj &
intl.obj & intl.obj &
ipcbase.obj & ipcbase.obj &
helpbase.obj & helpbase.obj &
@@ -95,6 +94,7 @@ COMMONOBJS = cmndata.obj &
sckfile.obj & sckfile.obj &
sckipc.obj & sckipc.obj &
sckstrm.obj & sckstrm.obj &
sckint.obj &
url.obj & url.obj &
http.obj & http.obj &
protocol.obj & protocol.obj &
@@ -115,6 +115,7 @@ COMMONOBJS = cmndata.obj &
wxchar.obj wxchar.obj
# Can't compile these yet under Watcom C++ # Can't compile these yet under Watcom C++
# imagjpeg.obj &
# odbc.obj & # odbc.obj &
# db.obj & # db.obj &
# dbtable.obj & # dbtable.obj &
@@ -569,7 +570,7 @@ image.obj: $(COMMDIR)\image.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
imagpng.obj: $(COMMDIR)\imagpng.cpp imagpng.obj: $(COMMDIR)\imagpng.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) -i=..\png -i=..\zlib $(IFLAGS) $<
imagjpeg.obj: $(COMMDIR)\imagjpeg.cpp imagjpeg.obj: $(COMMDIR)\imagjpeg.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
@@ -655,6 +656,9 @@ string.obj: $(COMMDIR)\string.cpp
socket.obj: $(COMMDIR)\socket.cpp socket.obj: $(COMMDIR)\socket.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
sckint.obj: $(COMMDIR)\sckint.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
sckaddr.obj: $(COMMDIR)\sckaddr.cpp sckaddr.obj: $(COMMDIR)\sckaddr.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<

View File

@@ -967,7 +967,11 @@ BOOL PASCAL DrawCaption( HDC hDC, HWND hWnd, LPRECT lprc,
rgbText = SetTextColor( hDC, rgbText ) ; rgbText = SetTextColor( hDC, rgbText ) ;
SetBkMode( hDC, nBkMode ) ; SetBkMode( hDC, nBkMode ) ;
#ifdef __WIN16__
GlobalFreePtr( (unsigned int) lpsz ) ;
#else
GlobalFreePtr( lpsz ) ; GlobalFreePtr( lpsz ) ;
#endif
} }
} }

View File

@@ -668,7 +668,11 @@ bool ConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant)
case VT_BOOL: case VT_BOOL:
{ {
#if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) //GC #if defined(__WATCOMC__) || (defined(_MSC_VER) && (_MSC_VER <= 1000)) //GC
#ifndef HAVE_BOOL // Can't use bool operator if no native bool type
variant = (long) (oleVariant.bool != 0);
#else
variant = (bool) (oleVariant.bool != 0); variant = (bool) (oleVariant.bool != 0);
#endif
#else #else
variant = (bool) (oleVariant.boolVal != 0); variant = (bool) (oleVariant.boolVal != 0);
#endif #endif

View File

@@ -1183,6 +1183,7 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
void wxTextCtrl::AdjustSpaceLimit() void wxTextCtrl::AdjustSpaceLimit()
{ {
#ifndef __WIN16__
unsigned int len = ::GetWindowTextLength(GetHwnd()), unsigned int len = ::GetWindowTextLength(GetHwnd()),
limit = ::SendMessage(GetHwnd(), EM_GETLIMITTEXT, 0, 0); limit = ::SendMessage(GetHwnd(), EM_GETLIMITTEXT, 0, 0);
if ( len > limit ) if ( len > limit )
@@ -1198,6 +1199,7 @@ void wxTextCtrl::AdjustSpaceLimit()
else else
::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0); ::SendMessage(GetHwnd(), EM_LIMITTEXT, limit, 0);
} }
#endif
} }
// For Rich Edit controls. Do we need it? // For Rich Edit controls. Do we need it?

View File

@@ -534,11 +534,11 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
#endif // wxUSE_RESOURCES #endif // wxUSE_RESOURCES
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// helper functiosn for showing a "busy" cursor // helper functions for showing a "busy" cursor
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
extern HCURSOR gs_wxBusyCursor = 0; // new, busy cursor HCURSOR gs_wxBusyCursor = 0; // new, busy cursor
static HCURSOR gs_wxBusyCursorOld = 0; // old cursor HCURSOR gs_wxBusyCursorOld = 0; // old cursor
static int gs_wxBusyCursorCount = 0; static int gs_wxBusyCursorCount = 0;
// Set the cursor to the busy cursor for all windows // Set the cursor to the busy cursor for all windows

View File

@@ -1561,7 +1561,7 @@ void wxWindow::UnpackScroll(WXWPARAM wParam, WXLPARAM lParam,
void wxWindow::UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam, void wxWindow::UnpackCtlColor(WXWPARAM wParam, WXLPARAM lParam,
WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd) WXWORD *nCtlColor, WXHDC *hdc, WXHWND *hwnd)
{ {
*control = (WXHWND)LOWORD(lParam); *hwnd = (WXHWND)LOWORD(lParam);
*nCtlColor = (int)HIWORD(lParam); *nCtlColor = (int)HIWORD(lParam);
*hdc = (WXHDC)wParam; *hdc = (WXHDC)wParam;
} }
@@ -1945,7 +1945,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
break; break;
case WM_GETMINMAXINFO: case WM_GETMINMAXINFO:
processed = HandleGetMinMaxInfo((LPMINMAXINFO)lParam); processed = HandleGetMinMaxInfo((MINMAXINFO*)lParam);
break; break;
case WM_SETCURSOR: case WM_SETCURSOR:

View File

@@ -7,6 +7,7 @@
# Makefile : Builds PNG library for Watcom C++, WIN32 # Makefile : Builds PNG library for Watcom C++, WIN32
WXDIR = ..\.. WXDIR = ..\..
EXTRACPPFLAGS=-i=..\zlib
!include $(WXDIR)\src\makewat.env !include $(WXDIR)\src\makewat.env
@@ -34,7 +35,3 @@ clean: .SYMBOLIC
cleanall: clean cleanall: clean
#accel.obj: $(MSWDIR)\accel.cpp
# *$(CCC) $(CPPFLAGS) $(IFLAGS) $<