#! these files don't compile with SC++ 6
next if $file =~ /^(joystick|pnghand)\./;
- next if $wxGeneric{$file} =~ /\b16\b/;
+ next if $wxMSW{$file} =~ /\b16\b/;
my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
$file =~ s/cp?p?$/obj/;
DEBUG=0
-LIBTARGET = $(LIBDIR)\wx.lib
+LIBTARGET = $(LIBDIR)\wx$(SC_SUFFIX).lib
OPTIONS=
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
-all: $(LIBTARGET)
+all: MAKEARCHDIR $(LIBTARGET)
+
+MAKEARCHDIR:
+ @if not exist $(MSWINCDIR)\setup.h copy $(MSWINCDIR)\setup0.h $(MSWINCDIR)\setup.h
+ @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)
+ @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)\wx
+ @if not exist $(ARCHINCDIR)\wx\setup.h copy $(MSWINCDIR)\setup.h $(ARCHINCDIR)\wx\setup.h
$(LIBTARGET): $(OBJECTS)
-del $(LIBTARGET)
*lib /PAGESIZE:512 $(LIBTARGET) y $(OBJECTS), nul;
clean:
+ -del $(COMMDIR)\*.obj
+ -del $(MSWDIR)\*.obj
+ -del $(GENDIR)\*.obj
-del *.obj
-del $(LIBTARGET)
-$(COMMDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
-
-$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
- copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
-
-$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
- copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
-
-# $(COMMDIR)\cmndata.obj: $(COMMDIR)\cmndata.cpp
-# *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $(COMMDIR)\cmndata.cpp -o$(COMMDIR)\cmndata.obj
+## $(COMMDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
+##
+## $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
+## copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
+##
+## $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
+## copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
+##
+### $(COMMDIR)\cmndata.obj: $(COMMDIR)\cmndata.cpp
+### *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $(COMMDIR)\cmndata.cpp -o$(COMMDIR)\cmndata.obj
MFTYPE=sc
makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
#elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
// Watcom 11+ supports bool
#define HAVE_BOOL
+ #elif defined(__DIGITALMARS__)
+ // DigitalMars supports bool
+ #define HAVE_BOOL
#elif defined(__GNUWIN32__) || defined(__MINGW32__) || defined(__CYGWIN__)
// Cygwin supports bool
#define HAVE_BOOL
// deprecated methods, don't use any more
// --------------------------------------
+#ifndef __DIGITALMARS__
wxString GetPath( bool withSep, wxPathFormat format = wxPATH_NATIVE ) const
{ return GetPath(withSep ? wxPATH_GET_SEPARATOR : 0, format); }
-
+#endif
wxString GetPathWithSep(wxPathFormat format = wxPATH_NATIVE ) const
{ return GetPath(wxPATH_GET_SEPARATOR, format); }
wxBitmap(const char bits[], int width, int height, int depth = 1);
// Initialize with XPM data
+#ifndef __DIGITALMARS__
wxBitmap(const char **data) { CreateFromXpm(data); }
+#endif
wxBitmap(char **data) { CreateFromXpm((const char **)data); }
// Load a file or resource
// from raw data
wxIcon(const char bits[], int width, int height);
// from XPM data
+#ifndef __DIGITALMARS__
wxIcon(const char **data) { CreateIconFromXpm(data); }
+#endif
wxIcon(char **data) { CreateIconFromXpm((const char **)data); }
// from resource/file
wxIcon(const wxString& name,
#endif
#endif
-#if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__) || defined (__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
+#if ((defined(__WATCOMC__) && __WATCOMC__ >= 1200) || defined(__GNUWIN32__) || defined(__DIGITALMARS__) || defined (__BORLANDC__)) && !defined(HDN_GETDISPINFOW)
#define HDN_GETDISPINFOW (HDN_FIRST-29)
#if !wxCHECK_W32API_VERSION(2, 2)
typedef struct {
#define wxCHECK_W32API_VERSION(maj, min) (0)
#endif
+#ifdef __SC__
+ #ifdef __DMC__
+ #define __DIGITALMARS__
+ #endif
+#endif
+
#endif /* _WX_PLATFORM_H_ */
include $(WXDIR)\src\makesc.env
-minimal.exe: minimal.obj $(DEFFILE) minimal.res
- *$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
- *$(RC) -k minimal.res
+minimal.exe: minimal.obj
+ link $(LDFLAGS) $*, $@, $*, $(LIBS)
+
sc32.def:
echo EXETYPE NT > sc32.def
HBITMAP hbmpOld = (HBITMAP)SelectObject(hdcMem, hbmpCheck);
// then draw a check mark into it
-#if defined(__WIN32__) && !defined(__SC__)
+
RECT rect;
rect.left = 0;
rect.top = 0;
rect.bottom = nCheckHeight;
DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
-#else
- // In WIN16, draw a cross
- HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
- HPEN whiteBrush = (HPEN)GetStockObject(WHITE_BRUSH);
- HPEN hPenOld = (HPEN)::SelectObject(hdcMem, blackPen);
- HPEN hBrushOld = (HPEN)::SelectObject(hdcMem, whiteBrush);
- ::SetROP2(hdcMem, R2_COPYPEN);
- Rectangle(hdcMem, 0, 0, nCheckWidth, nCheckHeight);
- MoveTo(hdcMem, 0, 0);
- LineTo(hdcMem, nCheckWidth, nCheckHeight);
- MoveTo(hdcMem, nCheckWidth, 0);
- LineTo(hdcMem, 0, nCheckHeight);
- ::SelectObject(hdcMem, hPenOld);
- ::SelectObject(hdcMem, hBrushOld);
- ::DeleteObject(blackPen);
-#endif
// finally copy it to screen DC and clean up
BitBlt(hdc, x, y, nCheckWidth - 1, nCheckHeight,
return TRUE;
}
+
#endif // wxUSE_DRAG_AND_DROP
#endif // wxUSE_ENH_METAFILE
long WXUNUSED(flags),
int desiredWidth, int desiredHeight)
{
+#ifdef __DIGITALMARS__
+//FIXME __DIGITALMARS__ April 2003 CE
+ // why no ExtractIcon in library
+ wxLogTrace(_T("iconload"),
+ _T("Returning false from wxICOFileHandler::Load because of DigitalMars compiler bug"));
+
+ return false;
+#else
icon->UnRef();
// actual size
icon->SetSize(size.x, size.y);
return icon->Ok();
+#endif // Digitalmars
}
bool wxICOResourceHandler::LoadIcon(wxIcon *icon,
DEBUG=0
-LIBTARGET = $(LIBDIR)\wx.lib
+LIBTARGET = $(LIBDIR)\wx$(SC_SUFFIX).lib
OPTIONS=
$(MSWDIR)\helpchm.obj \
$(MSWDIR)\helpwin.obj \
$(MSWDIR)\icon.obj \
+ $(MSWDIR)\imaglist.obj \
$(MSWDIR)\iniconf.obj \
$(MSWDIR)\listbox.obj \
+ $(MSWDIR)\listctrl.obj \
$(MSWDIR)\main.obj \
$(MSWDIR)\mdi.obj \
$(MSWDIR)\menu.obj \
$(MSWDIR)\msgdlg.obj \
$(MSWDIR)\mslu.obj \
$(MSWDIR)\nativdlg.obj \
+ $(MSWDIR)\notebook.obj \
$(MSWDIR)\ole\oleutils.obj \
$(MSWDIR)\ownerdrw.obj \
$(MSWDIR)\palette.obj \
$(MSWDIR)\scrolbar.obj \
$(MSWDIR)\settings.obj \
$(MSWDIR)\slider95.obj \
- $(MSWDIR)\slidrmsw.obj \
$(MSWDIR)\snglinst.obj \
$(MSWDIR)\spinbutt.obj \
$(MSWDIR)\spinctrl.obj \
$(MSWDIR)\tabctrl.obj \
$(MSWDIR)\taskbar.obj \
$(MSWDIR)\tbar95.obj \
- $(MSWDIR)\tbarmsw.obj \
$(MSWDIR)\textctrl.obj \
$(MSWDIR)\tglbtn.obj \
$(MSWDIR)\thread.obj \
# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
-all: $(LIBTARGET)
+all: MAKEARCHDIR $(LIBTARGET)
+
+MAKEARCHDIR:
+ @if not exist $(MSWINCDIR)\setup.h copy $(MSWINCDIR)\setup0.h $(MSWINCDIR)\setup.h
+ @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)
+ @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)\wx
+ @if not exist $(ARCHINCDIR)\wx\setup.h copy $(MSWINCDIR)\setup.h $(ARCHINCDIR)\wx\setup.h
$(LIBTARGET): $(OBJECTS)
-del $(LIBTARGET)
*lib /PAGESIZE:512 $(LIBTARGET) y $(OBJECTS), nul;
clean:
+ -del $(COMMDIR)\*.obj
+ -del $(MSWDIR)\*.obj
+ -del $(GENDIR)\*.obj
-del *.obj
-del $(LIBTARGET)
-$(COMMDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
-
-$(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
- copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
-
-$(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
- copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
-
-# $(COMMDIR)\cmndata.obj: $(COMMDIR)\cmndata.cpp
-# *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $(COMMDIR)\cmndata.cpp -o$(COMMDIR)\cmndata.obj
+## $(COMMDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c
+##
+## $(COMMDIR)\y_tab.c: $(COMMDIR)\dosyacc.c
+## copy $(COMMDIR)\dosyacc.c $(COMMDIR)\y_tab.c
+##
+## $(COMMDIR)\lex_yy.c: $(COMMDIR)\doslex.c
+## copy $(COMMDIR)\doslex.c $(COMMDIR)\lex_yy.c
+##
+### $(COMMDIR)\cmndata.obj: $(COMMDIR)\cmndata.cpp
+### *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $(COMMDIR)\cmndata.cpp -o$(COMMDIR)\cmndata.obj
MFTYPE=sc
makefile.$(MFTYPE) : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
if ( exflags )
{
-#if !defined(__WIN16__) && !defined(__SC__)
+#if !defined(__WIN16__)
if ( !(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) )
{
if ( style & wxFRAME_TOOL_WINDOW )
// shouldn't use winsock.dll (a.k.a. ws2_32.dll) at all so only use this
// code if we link with it anyhow
#if wxUSE_SOCKETS
+ //FIXME __DIGITALMARS__ why is using sockets not properly turned off in setup.h ??
+ // find which library should contain sockets for Digital Mars CE April 2003
+#ifndef __DIGITALMARS__
WSADATA wsa;
if ( WSAStartup(MAKEWORD(1, 1), &wsa) == 0 )
{
return TRUE;
}
}
+#endif //__DIGITALMARS__
+
#endif // wxUSE_SOCKETS
#endif // Win32
int wxGetOsVersion(int *majorVsn, int *minorVsn)
{
-#if defined(__WIN32__) && !defined(__SC__)
+#if defined(__WIN32__)
static int ver = -1, major = -1, minor = -1;
if ( ver == -1 )
// drag and drop
// ---------------------------------------------------------------------------
-#if wxUSE_DRAG_AND_DROP
+//FIXME __DIGITALMARS__ does not honor drag drop in setup.h
+#if wxUSE_DRAG_AND_DROP
void wxWindowMSW::SetDropTarget(wxDropTarget *pDropTarget)
{
+#ifndef __DIGITALMARS__
if ( m_dropTarget != 0 ) {
m_dropTarget->Revoke(m_hWnd);
delete m_dropTarget;
m_dropTarget = pDropTarget;
if ( m_dropTarget != 0 )
m_dropTarget->Register(m_hWnd);
+#endif // __DIGITALMARS__
}
-
#endif // wxUSE_DRAG_AND_DROP
// old style file-manager drag&drop support: we retain the old-style
// DragAcceptFiles in parallel with SetDropTarget.
void wxWindowMSW::DragAcceptFiles(bool accept)
{
+#ifndef __DIGITALMARS__
HWND hWnd = GetHwnd();
if ( hWnd )
::DragAcceptFiles(hWnd, (BOOL)accept);
+#endif
}
// ----------------------------------------------------------------------------
long wxWindowMSW::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
if ( m_oldWndProc )
+#ifdef __DIGITALMARS__
+ return ::CallWindowProc( (FARPROC) m_oldWndProc, GetHwnd(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
+#else
return ::CallWindowProc(CASTWNDPROC m_oldWndProc, GetHwnd(), (UINT) nMsg, (WPARAM) wParam, (LPARAM) lParam);
+#endif
else
return ::DefWindowProc(GetHwnd(), nMsg, wParam, lParam);
}
bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
{
-#ifndef __WXMICROWIN__
+//FIX ME __DIGITALMARS__
+#if defined (__WXMICROWIN__) || defined (__DIGITALMARS__)
+ return FALSE;
+#else // __WXMICROWIN__
HDROP hFilesInfo = (HDROP) wParam;
// Get the total number of files dropped
event.m_pos.y = dropPoint.y;
return GetEventHandler()->ProcessEvent(event);
-#else // __WXMICROWIN__
- return FALSE;
#endif
}