Various changes for 16-bit compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ccd82cd130
commit
5260b1c582
@ -38,6 +38,7 @@
|
||||
#include <wx/textfile.h>
|
||||
#include <wx/config.h>
|
||||
#include <wx/fileconf.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ctype.h> // for isalnum()
|
||||
|
||||
|
@ -87,10 +87,11 @@ unsigned char wxDataStream::Read8()
|
||||
return (unsigned char)buf;
|
||||
}
|
||||
|
||||
// Must be at global scope for VC++ 5
|
||||
extern "C" double ConvertFromIeeeExtended(const unsigned char *bytes);
|
||||
|
||||
double wxDataStream::ReadDouble()
|
||||
{
|
||||
extern "C" double ConvertFromIeeeExtended(const unsigned char *bytes);
|
||||
|
||||
#if USE_APPLE_IEEE
|
||||
char buf[10];
|
||||
|
||||
@ -159,9 +160,11 @@ void wxDataStream::WriteLine(const wxString& line)
|
||||
m_ostream->write((const char *) tmp_string, tmp_string.Length());
|
||||
}
|
||||
|
||||
// Must be at global scope for VC++ 5
|
||||
extern "C" void ConvertToIeeeExtended(double num, unsigned char *bytes);
|
||||
|
||||
void wxDataStream::WriteDouble(double d)
|
||||
{
|
||||
extern "C" void ConvertToIeeeExtended(double num, unsigned char *bytes)
|
||||
char buf[10];
|
||||
|
||||
if (!m_ostream)
|
||||
|
@ -496,6 +496,7 @@ public:
|
||||
|
||||
// menu callbacks
|
||||
void OnClose(wxCommandEvent& event);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
void OnSave (wxCommandEvent& event);
|
||||
void OnClear(wxCommandEvent& event);
|
||||
|
||||
@ -521,7 +522,7 @@ BEGIN_EVENT_TABLE(wxLogFrame, wxFrame)
|
||||
EVT_MENU(Menu_Save, wxLogFrame::OnSave)
|
||||
EVT_MENU(Menu_Clear, wxLogFrame::OnClear)
|
||||
|
||||
EVT_CLOSE(wxLogFrame::OnClose)
|
||||
EVT_CLOSE(wxLogFrame::OnCloseWindow)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxLogFrame::wxLogFrame(const char *szTitle)
|
||||
@ -563,6 +564,12 @@ void wxLogFrame::OnClose(wxCommandEvent& event)
|
||||
Show(FALSE);
|
||||
}
|
||||
|
||||
void wxLogFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
// just hide the window
|
||||
Show(FALSE);
|
||||
}
|
||||
|
||||
void wxLogFrame::OnSave(wxCommandEvent& event)
|
||||
{
|
||||
// get the file name
|
||||
|
@ -884,6 +884,7 @@ void * operator new (size_t size, char * fileName, int lineNum)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !( defined (_MSC_VER) && (_MSC_VER <= 800) )
|
||||
void * operator new[] (size_t size, char * fileName, int lineNum)
|
||||
{
|
||||
#ifdef NO_DEBUG_ALLOCATION
|
||||
@ -892,6 +893,7 @@ void * operator new[] (size_t size, char * fileName, int lineNum)
|
||||
return wxDebugAlloc(size, fileName, lineNum, FALSE, TRUE);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void operator delete (void * buf)
|
||||
{
|
||||
@ -902,6 +904,7 @@ void operator delete (void * buf)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !( defined (_MSC_VER) && (_MSC_VER <= 800) )
|
||||
void operator delete[] (void * buf)
|
||||
{
|
||||
#ifdef NO_DEBUG_ALLOCATION
|
||||
@ -910,6 +913,7 @@ void operator delete[] (void * buf)
|
||||
wxDebugFree(buf, TRUE);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -436,7 +436,7 @@ void wxGenericGrid::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
{
|
||||
wxPaintDC paintDC(this);
|
||||
wxMemoryDC dc(& paintDC);
|
||||
dc.SelectObject(m_doubleBufferingBitmap);
|
||||
dc.SelectObject(* m_doubleBufferingBitmap);
|
||||
|
||||
PaintGrid(dc);
|
||||
|
||||
|
@ -140,7 +140,6 @@ MSWOBJS = \
|
||||
$(MSWDIR)\font.obj \
|
||||
$(MSWDIR)\fontdlg.obj \
|
||||
$(MSWDIR)\frame.obj \
|
||||
$(MSWDIR)\gauge.obj \
|
||||
$(MSWDIR)\gauge95.obj \
|
||||
$(MSWDIR)\gaugemsw.obj \
|
||||
$(MSWDIR)\gdiobj.obj \
|
||||
|
@ -151,7 +151,7 @@ MSWOBJS = \
|
||||
$(MSWDIR)\listctrl.obj \
|
||||
$(MSWDIR)\main.obj \
|
||||
$(MSWDIR)\mdi.obj \
|
||||
$(MSWDIR)\menu.obj \
|
||||
$(MSWDIR)\menu.obj\
|
||||
$(MSWDIR)\menuitem.obj \
|
||||
$(MSWDIR)\metafile.obj \
|
||||
$(MSWDIR)\minifram.obj \
|
||||
@ -178,6 +178,7 @@ MSWOBJS = \
|
||||
$(MSWDIR)\timer.obj \
|
||||
$(MSWDIR)\treectrl.obj \
|
||||
$(MSWDIR)\utils.obj \
|
||||
$(MSWDIR)\utilsexc.obj \
|
||||
$(MSWDIR)\wave.obj \
|
||||
$(MSWDIR)\window.obj \
|
||||
$(OLEDIR)\droptgt.obj \
|
||||
@ -585,6 +586,11 @@ $(MSWDIR)/utils.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(MSWDIR)/utilsexc.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
<<
|
||||
|
||||
$(MSWDIR)/wave.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
@ -815,7 +821,7 @@ $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
|
||||
|
||||
$(COMMDIR)/extended.obj: $*.c
|
||||
cl @<<
|
||||
$(CPPFLAGS) /Fo$@ /c /Tp $*.c
|
||||
$(CPPFLAGS2) /Fo$@ /c /Tp $*.c
|
||||
<<
|
||||
|
||||
$(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
|
||||
|
@ -894,7 +894,7 @@ $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
|
||||
$(COMMDIR)/extended.obj: $*.c
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.c /Fo$@
|
||||
$(CPPFLAGS2) /c /Tp $*.c /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/y_tab.obj: $*.c $(COMMDIR)/lex_yy.c
|
||||
|
@ -28,6 +28,10 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include <wx/defs.h>
|
||||
|
||||
#ifdef __WIN32__
|
||||
|
||||
#include <wx/log.h>
|
||||
#include <wx/msw/ole/oleutils.h>
|
||||
#include <wx/msw/ole/dataobj.h>
|
||||
@ -400,3 +404,6 @@ static const char *GetTymedName(DWORD tymed)
|
||||
return s_szBuf;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -162,7 +162,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
||||
if ( IsCheckable() && !m_bmpChecked.Ok() ) {
|
||||
if ( st & wxODChecked ) {
|
||||
// using native APIs for performance and simplicity
|
||||
#ifdef O_DRAW_NATIVE_API
|
||||
#ifdef O_DRAW_NATIVE_API
|
||||
// what goes on: DrawFrameControl creates a b/w mask,
|
||||
// then we copy it to screen to have right colors
|
||||
|
||||
@ -179,10 +179,10 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt
|
||||
BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight,
|
||||
hdcMem, 0, 0, SRCCOPY);
|
||||
DeleteDC(hdcMem);
|
||||
#else
|
||||
#else
|
||||
// #### to do: perhaps using Marlett font (create equiv. font under X)
|
||||
wxFAIL("not implemented");
|
||||
#endif //O_DRAW_NATIVE_API
|
||||
// wxFAIL("not implemented");
|
||||
#endif //O_DRAW_NATIVE_API
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -100,7 +100,7 @@ bool wxScrollBar::Create(wxWindow *parent, const wxWindowID id,
|
||||
::SetScrollPos(scroll_bar, SB_CTL, 0, FALSE);
|
||||
ShowWindow(scroll_bar, SW_SHOW);
|
||||
|
||||
SetFont(parent->GetFont());
|
||||
SetFont(* parent->GetFont());
|
||||
|
||||
m_hWnd = (WXHWND)scroll_bar;
|
||||
|
||||
|
@ -63,6 +63,10 @@
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler)
|
||||
|
||||
|
||||
#define wxEXECUTE_WIN_MESSAGE 10000
|
||||
|
||||
struct wxExecuteData {
|
||||
@ -72,6 +76,8 @@ struct wxExecuteData {
|
||||
char state;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __WIN32__
|
||||
static DWORD wxExecuteThread(wxExecuteData *data)
|
||||
{
|
||||
WaitForSingleObject(data->process, INFINITE);
|
||||
@ -81,6 +87,8 @@ static DWORD wxExecuteThread(wxExecuteData *data)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
LRESULT APIENTRY _EXPORT wxExecuteWindowCbk(HWND hWnd, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
|
Loading…
Reference in New Issue
Block a user