Fixes for 16-bit compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f3d5d2b5b9
commit
788722ac5c
@ -159,7 +159,7 @@ imagtiff.cpp C 32
|
||||
imagpcx.cpp C 32
|
||||
imagpng.cpp C 32
|
||||
imagpnm.cpp C 32
|
||||
imagxpm.cpp C 32
|
||||
imagxpm.cpp C
|
||||
init.cpp B
|
||||
intl.cpp C B
|
||||
ipcbase.cpp C B
|
||||
|
@ -102,14 +102,6 @@ public:
|
||||
wxPathFormat format = wxPATH_NATIVE)
|
||||
{ Assign(path, name, ext, format); }
|
||||
|
||||
// assorted assignment operators
|
||||
|
||||
wxFileName& operator=(const wxFileName& filename)
|
||||
{ Assign(filename); return *this; }
|
||||
|
||||
wxFileName& operator=(const wxString& filename)
|
||||
{ Assign(filename); return *this; }
|
||||
|
||||
// the same for delayed initialization
|
||||
|
||||
// VZ: wouldn't it be better to call this Create() for consistency with
|
||||
@ -128,6 +120,14 @@ public:
|
||||
void AssignDir(const wxString& dir, wxPathFormat format = wxPATH_NATIVE)
|
||||
{ Assign(dir, _T(""), format); }
|
||||
|
||||
// assorted assignment operators
|
||||
|
||||
wxFileName& operator=(const wxFileName& filename)
|
||||
{ Assign(filename); return *this; }
|
||||
|
||||
wxFileName& operator=(const wxString& filename)
|
||||
{ Assign(filename); return *this; }
|
||||
|
||||
// reset all components to default, uninitialized state
|
||||
void Clear();
|
||||
|
||||
@ -191,15 +191,15 @@ public:
|
||||
|
||||
// Comparison
|
||||
|
||||
// compares with the rules of this platform
|
||||
bool SameAs(const wxFileName &filepath,
|
||||
wxPathFormat format = wxPATH_NATIVE);
|
||||
|
||||
// uses the current platform settings
|
||||
bool operator==(const wxFileName& filename) { return SameAs(filename); }
|
||||
bool operator==(const wxString& filename)
|
||||
{ return *this == wxFileName(filename); }
|
||||
|
||||
// compares with the rules of this platform
|
||||
bool SameAs(const wxFileName &filepath,
|
||||
wxPathFormat format = wxPATH_NATIVE);
|
||||
|
||||
// Tests
|
||||
static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE );
|
||||
bool IsRelative( wxPathFormat format = wxPATH_NATIVE );
|
||||
|
@ -187,6 +187,9 @@ class WXDLLEXPORT wxListBase : public wxObject
|
||||
{
|
||||
friend class wxNodeBase; // should be able to call DetachNode()
|
||||
friend class wxHashTableBase; // should be able to call untyped Find()
|
||||
private:
|
||||
// common part of all ctors
|
||||
void Init(wxKeyType keyType = wxKEY_NONE); // Must be declared before it's used (for VC++ 1.5)
|
||||
public:
|
||||
// default ctor & dtor
|
||||
wxListBase(wxKeyType keyType = wxKEY_NONE) { Init(keyType); }
|
||||
@ -308,8 +311,6 @@ protected:
|
||||
|
||||
private:
|
||||
// helpers
|
||||
// common part of all ctors
|
||||
void Init(wxKeyType keyType = wxKEY_NONE);
|
||||
// common part of copy ctor and assignment operator
|
||||
void DoCopy(const wxListBase& list);
|
||||
// common part of all Append()s
|
||||
|
@ -122,11 +122,7 @@ public:
|
||||
//!code: | -1 0 0 |
|
||||
//!code: matrix' = | 0 -1 0 | x matrix
|
||||
//!code: | 0 0 1 |
|
||||
#if defined(__WXPM__)
|
||||
wxTransformMatrix& Mirror(bool x=TRUE, bool y=FALSE);
|
||||
#else
|
||||
wxTransformMatrix& Mirror(bool x=true, bool y=false);
|
||||
#endif
|
||||
// Translate by dx, dy:
|
||||
//!ex:
|
||||
//!code: | 1 0 dx |
|
||||
|
@ -194,7 +194,11 @@ static const wxDateTime::wxDateTime_t gs_cumulatedDays[2][MONTHS_IN_YEAR] =
|
||||
|
||||
// in the fine tradition of ANSI C we use our equivalent of (time_t)-1 to
|
||||
// indicate an invalid wxDateTime object
|
||||
#ifdef __WIN16__
|
||||
static const wxDateTime gs_dtDefault;
|
||||
#else
|
||||
static const wxDateTime gs_dtDefault = wxLongLong((long)ULONG_MAX, ULONG_MAX);
|
||||
#endif
|
||||
|
||||
const wxDateTime& wxDefaultDateTime = gs_dtDefault;
|
||||
|
||||
|
@ -222,7 +222,11 @@ wxImage wxXPMDecoder::ReadFile(wxInputStream& stream)
|
||||
wxImage img = ReadData(xpm_lines);
|
||||
|
||||
delete[] xpm_buffer;
|
||||
#ifdef __WIN16__
|
||||
delete[] (char**) xpm_lines;
|
||||
#else
|
||||
delete[] xpm_lines;
|
||||
#endif
|
||||
return img;
|
||||
}
|
||||
#endif // wxUSE_STREAMS
|
||||
|
@ -316,7 +316,11 @@ int setdrive(int drive)
|
||||
newdrive[1] = ':';
|
||||
newdrive[2] = '\0';
|
||||
#if defined(__WXMSW__)
|
||||
#ifdef __WIN16__
|
||||
if (wxSetWorkingDirectory(newdrive))
|
||||
#else
|
||||
if (SetCurrentDirectory((LPSTR)newdrive))
|
||||
#endif
|
||||
#else
|
||||
// VA doesn't know what LPSTR is and has its own set
|
||||
if (DosSetCurrentDir((PSZ)newdrive))
|
||||
|
@ -339,9 +339,16 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||
}
|
||||
|
||||
WXHBRUSH wxChoice::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||
#if wxUSE_CTL3D
|
||||
WXUINT message,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam
|
||||
#else
|
||||
WXUINT WXUNUSED(message),
|
||||
WXWPARAM WXUNUSED(wParam),
|
||||
WXLPARAM WXUNUSED(lParam))
|
||||
WXLPARAM WXUNUSED(lParam)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if wxUSE_CTL3D
|
||||
if ( m_useCtl3D )
|
||||
|
@ -142,9 +142,16 @@ LRESULT APIENTRY _EXPORT wxComboEditWndProc(HWND hWnd,
|
||||
}
|
||||
|
||||
WXHBRUSH wxComboBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||
#if wxUSE_CTL3D
|
||||
WXUINT message,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam
|
||||
#else
|
||||
WXUINT WXUNUSED(message),
|
||||
WXWPARAM WXUNUSED(wParam),
|
||||
WXLPARAM WXUNUSED(lParam))
|
||||
WXLPARAM WXUNUSED(lParam)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if wxUSE_CTL3D
|
||||
if ( m_useCtl3D )
|
||||
|
@ -224,9 +224,16 @@ void wxControl::OnEraseBackground(wxEraseEvent& event)
|
||||
}
|
||||
|
||||
WXHBRUSH wxControl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||
#if wxUSE_CTL3D
|
||||
WXUINT message,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam
|
||||
#else
|
||||
WXUINT WXUNUSED(message),
|
||||
WXWPARAM WXUNUSED(wParam),
|
||||
WXLPARAM WXUNUSED(lParam))
|
||||
WXLPARAM WXUNUSED(lParam)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if wxUSE_CTL3D
|
||||
if ( m_useCtl3D )
|
||||
|
@ -192,8 +192,10 @@ wxCursor::wxCursor(int cursor_type)
|
||||
switch (cursor_type)
|
||||
{
|
||||
case wxCURSOR_ARROWWAIT:
|
||||
#ifndef __WIN16__
|
||||
refData->m_hCursor = (WXHCURSOR) LoadCursor((HINSTANCE) NULL, IDC_APPSTARTING);
|
||||
break;
|
||||
#endif
|
||||
case wxCURSOR_WAIT:
|
||||
refData->m_hCursor = (WXHCURSOR) LoadCursor((HINSTANCE) NULL, IDC_WAIT);
|
||||
break;
|
||||
|
@ -130,6 +130,7 @@ COMMONOBJS1 = \
|
||||
$(COMMDIR)\imagbmp.obj \
|
||||
$(COMMDIR)\image.obj \
|
||||
$(COMMDIR)\imaggif.obj \
|
||||
$(COMMDIR)\imagxpm.obj \
|
||||
$(COMMDIR)\intl.obj \
|
||||
$(COMMDIR)\ipcbase.obj \
|
||||
$(COMMDIR)\layout.obj \
|
||||
@ -963,6 +964,11 @@ $(COMMDIR)/imaggif.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(COMMDIR)/imagxpm.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(COMMDIR)/intl.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
|
@ -1266,7 +1266,10 @@ static void MDISetMenu(wxWindow *win, HMENU hmenuFrame, HMENU hmenuWindow)
|
||||
wxWindow *parent = win->GetParent();
|
||||
wxCHECK_RET( parent, wxT("MDI client without parent frame? weird...") );
|
||||
|
||||
#ifndef __WIN16__
|
||||
::SendMessage(GetWinHwnd(win), WM_MDIREFRESHMENU, 0, 0L);
|
||||
#endif
|
||||
|
||||
::DrawMenuBar(GetWinHwnd(parent));
|
||||
}
|
||||
|
||||
|
@ -837,9 +837,16 @@ long wxRadioBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
}
|
||||
|
||||
WXHBRUSH wxRadioBox::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||
#if wxUSE_CTL3D
|
||||
WXUINT message,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam
|
||||
#else
|
||||
WXUINT WXUNUSED(message),
|
||||
WXWPARAM WXUNUSED(wParam),
|
||||
WXLPARAM WXUNUSED(lParam))
|
||||
WXLPARAM WXUNUSED(lParam)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if wxUSE_CTL3D
|
||||
if ( m_useCtl3D )
|
||||
|
@ -173,9 +173,16 @@ void wxRadioButton::Command (wxCommandEvent & event)
|
||||
}
|
||||
|
||||
WXHBRUSH wxRadioButton::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||
#if wxUSE_CTL3D
|
||||
WXUINT message,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam
|
||||
#else
|
||||
WXUINT WXUNUSED(message),
|
||||
WXWPARAM WXUNUSED(wParam),
|
||||
WXLPARAM WXUNUSED(lParam))
|
||||
WXLPARAM WXUNUSED(lParam)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if wxUSE_CTL3D
|
||||
if ( m_useCtl3D )
|
||||
|
@ -968,9 +968,16 @@ bool wxTextCtrl::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
|
||||
}
|
||||
|
||||
WXHBRUSH wxTextCtrl::OnCtlColor(WXHDC pDC, WXHWND WXUNUSED(pWnd), WXUINT WXUNUSED(nCtlColor),
|
||||
#if wxUSE_CTL3D
|
||||
WXUINT message,
|
||||
WXWPARAM wParam,
|
||||
WXLPARAM lParam
|
||||
#else
|
||||
WXUINT WXUNUSED(message),
|
||||
WXWPARAM WXUNUSED(wParam),
|
||||
WXLPARAM WXUNUSED(lParam))
|
||||
WXLPARAM WXUNUSED(lParam)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#if wxUSE_CTL3D
|
||||
if ( m_useCtl3D )
|
||||
|
@ -81,6 +81,10 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id,
|
||||
m_backgroundColour = parent->GetBackgroundColour();
|
||||
m_foregroundColour = parent->GetForegroundColour();
|
||||
|
||||
#ifndef BS_PUSHLIKE
|
||||
#define BS_PUSHLIKE 0x00001000L
|
||||
#endif
|
||||
|
||||
long msStyle = BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP | WS_CHILD | WS_VISIBLE;
|
||||
#ifdef __WIN32__
|
||||
if(m_windowStyle & wxBU_LEFT)
|
||||
|
@ -463,6 +463,16 @@ bool wxDirExists(const wxString& dir)
|
||||
|
||||
bool wxGetEnv(const wxString& var, wxString *value)
|
||||
{
|
||||
#ifdef __WIN16__
|
||||
const wxChar* ret = wxGetenv(var);
|
||||
if (ret)
|
||||
{
|
||||
*value = ret;
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
#else
|
||||
// first get the size of the buffer
|
||||
DWORD dwRet = ::GetEnvironmentVariable(var, NULL, 0);
|
||||
if ( !dwRet )
|
||||
@ -478,6 +488,7 @@ bool wxGetEnv(const wxString& var, wxString *value)
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool wxSetEnv(const wxString& var, const wxChar *value)
|
||||
@ -1034,14 +1045,20 @@ void wxDisplaySizeMM(int *width, int *height)
|
||||
|
||||
void wxClientDisplayRect(int *x, int *y, int *width, int *height)
|
||||
{
|
||||
#ifdef __WIN16__
|
||||
*x = 0; *y = 0;
|
||||
wxDisplaySize(width, height);
|
||||
#else
|
||||
// Determine the desktop dimensions minus the taskbar and any other
|
||||
// special decorations...
|
||||
RECT r;
|
||||
|
||||
SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0);
|
||||
if (x) *x = r.left;
|
||||
if (y) *y = r.top;
|
||||
if (width) *width = r.right - r.left;
|
||||
if (height) *height = r.bottom - r.top;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -228,6 +228,7 @@ void MyApp::GenerateSamples(const wxString& dir)
|
||||
GenerateSample("DynamicVC", "dynamic", dir + wxString("/samples/dynamic"), wxStringList("dynamic.cpp", 0));
|
||||
GenerateSample("DrawingVC", "drawing", dir + wxString("/samples/drawing"), wxStringList("drawing.cpp", 0));
|
||||
GenerateSample("ExecVC", "exec", dir + wxString("/samples/exec"), wxStringList("exec.cpp", 0));
|
||||
GenerateSample("EventVC", "event", dir + wxString("/samples/event"), wxStringList("event.cpp", 0));
|
||||
GenerateSample("GridVC", "grid", dir + wxString("/samples/grid"), wxStringList("grid.cpp", 0));
|
||||
GenerateSample("NewGridVC", "griddemo", dir + wxString("/samples/newgrid"), wxStringList("griddemo.cpp", 0));
|
||||
GenerateSample("HelpVC", "demo", dir + wxString("/samples/help"), wxStringList("demo.cpp", 0));
|
||||
|
Loading…
Reference in New Issue
Block a user