From: Julian Smart Date: Wed, 23 Feb 2000 16:54:18 +0000 (+0000) Subject: Misc small changes, some for VC++ 1.5 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e06b95691f1cc89509100700985101c34da7759e?ds=sidebyside Misc small changes, some for VC++ 1.5 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/distrib/msw/tmake/dos.t b/distrib/msw/tmake/dos.t index 592ab83d3e..893c214460 100644 --- a/distrib/msw/tmake/dos.t +++ b/distrib/msw/tmake/dos.t @@ -78,7 +78,7 @@ DUMMYOBJ=dummy.obj # This one overrides the others, to be consistent with the settings in wx_setup.h MINIMAL_WXWINDOWS_SETUP=0 -USE_XPM_IN_MSW=0 +USE_XPM_IN_MSW=1 USE_CTL3D=1 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1" @@ -95,7 +95,7 @@ PERIPH_CLEAN_TARGET= # !endif !if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS) +PERIPH_LIBS=$(WXDIR)\lib\xpm.lib $(PERIPH_LIBS) PERIPH_TARGET=xpm $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) !endif @@ -235,6 +235,8 @@ $(OBJECTS): $(WXDIR)/include/wx/setup.h # Peripheral components +$(WXDIR)\lib\xpm.lib: xpm + xpm: cd $(WXDIR)\src\xpm nmake -f makefile.dos FINAL=$(FINAL) diff --git a/docs/latex/wx/app.tex b/docs/latex/wx/app.tex index d501e696b6..e894a39d17 100644 --- a/docs/latex/wx/app.tex +++ b/docs/latex/wx/app.tex @@ -157,14 +157,12 @@ different visuals, FALSE otherwise. \helpref{SetUseBestVisual}{wxappsetusebestvisual} - -\membersection{wxApp::GetVendorName}\label{wxappvendorappname} +\membersection{wxApp::GetVendorName}\label{wxappgetvendorname} \constfunc{wxString}{GetVendorName}{\void} Returns the application's vendor name. - \membersection{wxApp::ExitMainLoop}\label{wxappexitmainloop} \func{void}{ExitMainLoop}{\void} @@ -468,7 +466,6 @@ wxWindows. \helpref{wxApp::GetVendorName}{wxappgetvendorname} - \membersection{wxApp::GetStdIcon}\label{wxappgetstdicon} \func{virtual wxIcon}{GetStdIcon}{\param{int }{which}} const @@ -498,3 +495,4 @@ This function currently only has effect under GTK. \wxheading{Parameters} \docparam{flag}{If TRUE, the app will use the best visual.} + diff --git a/docs/latex/wx/rect.tex b/docs/latex/wx/rect.tex index 79b426e339..9a8c6f106f 100644 --- a/docs/latex/wx/rect.tex +++ b/docs/latex/wx/rect.tex @@ -172,4 +172,3 @@ Equality operator. Inequality operator. - diff --git a/docs/msw/install.txt b/docs/msw/install.txt index 7c183ba75e..a9d40c714a 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -93,7 +93,8 @@ Using project files: Debug and Release configurations. If you have VC++ 4, use makefile.vc, but you may only have one set of object files at a time in use (debug or release versions). -4. Open a sample project file, choose a configuration using +4. Similarly for TIFF: use src/tiff/tiff.dsp. +5. Open a sample project file, choose a configuration using Build | Set Active Configuration..., and compile. The project files don't use precompiled headers, to save space, but you can switch PCH compiling on for greater speed. @@ -379,7 +380,7 @@ Here are the steps required: extra files to use the wxWindows makefiles. You can find these files in ports/mingw32 on the ftp site or CD-ROM, as extra.zip. These should be extracted to the Mingw32 directory. - If you have already have downloaded bison, flex, make, rm, mv + If you have already have downloaded bison, flex, make, rm, cp, mv from elsewhere, you won't need this. If using Mingw32 2.8.1, see also see mingw32.txt in this directory diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 07ae67a83d..5c8d6d4fed 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -484,7 +484,7 @@ #endif #endif -#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)) +#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) // Can't use OLE drag and drop in Windows 3.1 because we don't know how // to implement UUIDs // GnuWin32 doesn't have appropriate headers for e.g. IUnknown. diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 6ee198034a..9cd5c03895 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -788,7 +788,7 @@ void wxGridCellBoolEditor::Create(wxWindow* parent, void wxGridCellBoolEditor::SetSize(const wxRect& r) { // position it in the centre of the rectangle (TODO: support alignment?) - wxCoord w, h; + int w, h; m_control->GetSize(&w, &h); // the checkbox without label still has some space to the right in wxGTK, diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 440f6ae775..2e67abdff1 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -951,8 +951,8 @@ void wxListLineData::SetAttributes(wxDC *dc, void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG ) { - wxCoord dev_x = 0; - wxCoord dev_y = 0; + int dev_x = 0; + int dev_y = 0; m_owner->CalcScrolledPosition( m_bound_all.x, m_bound_all.y, &dev_x, &dev_y ); wxCoord dev_w = m_bound_all.width; wxCoord dev_h = m_bound_all.height; diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 9ec067f7e2..09a31f1449 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -2287,8 +2287,8 @@ void wxTreeCtrl::OnIdle( wxIdleEvent &WXUNUSED(event) ) void wxTreeCtrl::CalculateSize( wxGenericTreeItem *item, wxDC &dc ) { - int text_w = 0; - int text_h = 0; + wxCoord text_w = 0; + wxCoord text_h = 0; if (item->IsBold()) dc.SetFont(m_boldFont); diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index c6e79a219b..11d5f1aab8 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -428,8 +428,8 @@ void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1, // 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); + HPEN hPenOld = (HPEN)::SelectObject(GetHdc(), blackPen); + HPEN hBrushOld = (HPEN)::SelectObject(GetHdc(), whiteBrush); ::SetROP2(GetHdc(), R2_COPYPEN); Rectangle(GetHdc(), x1, y1, x2, y2); MoveTo(GetHdc(), x1, y1); diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index 536db8d0b5..8b00c315cc 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -26,7 +26,7 @@ DUMMYOBJ=dummy.obj # This one overrides the others, to be consistent with the settings in wx_setup.h MINIMAL_WXWINDOWS_SETUP=0 -USE_XPM_IN_MSW=0 +USE_XPM_IN_MSW=1 USE_CTL3D=1 !if "$(MINIMAL_WXWINDOWS_SETUP)" == "1" @@ -43,7 +43,7 @@ PERIPH_CLEAN_TARGET= # !endif !if "$(USE_XPM_IN_MSW)" == "1" -PERIPH_LIBS=$(WXDIR)\contrib\wxxpm\xpm.lib $(PERIPH_LIBS) +PERIPH_LIBS=$(WXDIR)\lib\xpm.lib $(PERIPH_LIBS) PERIPH_TARGET=xpm $(PERIPH_TARGET) PERIPH_CLEAN_TARGET=clean_xpm $(PERIPH_CLEAN_TARGET) !endif @@ -1305,6 +1305,8 @@ $(OBJECTS): $(WXDIR)/include/wx/setup.h # Peripheral components +$(WXDIR)\lib\xpm.lib: xpm + xpm: cd $(WXDIR)\src\xpm nmake -f makefile.dos FINAL=$(FINAL) diff --git a/src/xpm/makefile.dos b/src/xpm/makefile.dos new file mode 100644 index 0000000000..07f27168f6 --- /dev/null +++ b/src/xpm/makefile.dos @@ -0,0 +1,155 @@ +# +# File: makefile.vc +# Author: Julian Smart +# Created: 1997 +# Updated: +# Copyright: (c) 1997, Julian Smart +# +# "%W% %G%" +# +# Makefile : Builds xpm.lib for VC++ (16-bit) +# +!include <..\makemsc.env> + +THISDIR=$(WXWIN)\src\xpm + +LIBTARGET=$(WXDIR)\lib\xpm.lib + +XPMDIR=$(WXDIR)\src\xpm + +OBJECTS = $(XPMDIR)\attrib.obj\ + $(XPMDIR)\crbuffri.obj\ + $(XPMDIR)\crdatfri.obj\ + $(XPMDIR)\create.obj\ + $(XPMDIR)\crifrbuf.obj\ + $(XPMDIR)\crifrdat.obj\ + $(XPMDIR)\dataxpm.obj\ + $(XPMDIR)\imagexpm.obj\ + $(XPMDIR)\info.obj\ + $(XPMDIR)\hashtab.obj\ + $(XPMDIR)\misc.obj\ + $(XPMDIR)\parse.obj\ + $(XPMDIR)\rdftodat.obj\ + $(XPMDIR)\rdftoi.obj\ + $(XPMDIR)\rgb.obj\ + $(XPMDIR)\scan.obj\ + $(XPMDIR)\simx.obj\ + $(XPMDIR)\wrffrdat.obj\ + $(XPMDIR)\wrffri.obj + +all: $(LIBTARGET) + +$(LIBTARGET): $(OBJECTS) + -erase $(LIBTARGET) + lib /PAGESIZE:128 @<< +$(LIBTARGET) +y +$(OBJECTS) +nul +; +<< + +$(XPMDIR)\attrib.obj: $(XPMDIR)\attrib.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\crbuffri.obj: $(XPMDIR)\crbuffri.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\crdatfri.obj: $(XPMDIR)\crdatfri.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\create.obj: $(XPMDIR)\create.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\crifrbuf.obj: $(XPMDIR)\crifrbuf.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\crifrdat.obj: $(XPMDIR)\crifrdat.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\dataxpm.obj: $(XPMDIR)\dataxpm.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\imagexpm.obj: $(XPMDIR)\imagexpm.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\info.obj: $(XPMDIR)\info.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\hashtab.obj: $(XPMDIR)\hashtab.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\misc.obj: $(XPMDIR)\misc.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\parse.obj: $(XPMDIR)\parse.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\rdftodat.obj: $(XPMDIR)\rdftodat.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\rdftoi.obj: $(XPMDIR)\rdftoi.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\rgb.obj: $(XPMDIR)\rgb.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\scan.obj: $(XPMDIR)\scan.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\simx.obj: $(XPMDIR)\simx.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\wrffrdat.obj: $(XPMDIR)\wrffrdat.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +$(XPMDIR)\wrffri.obj: $(XPMDIR)\wrffri.c + cl @<< +$(CPPFLAGS2) /c $*.c /Fo$@ +<< + +clean: + -erase *.obj + -erase $(LIBTARGET) + -erase *.pdb + -erase *.sbr + -erase *.pch + +cleanall: clean + diff --git a/src/xpm/makefile.vc b/src/xpm/makefile.vc index 7d0949b076..7f2ad48277 100644 --- a/src/xpm/makefile.vc +++ b/src/xpm/makefile.vc @@ -1,5 +1,5 @@ # -# File: makefile.nt +# File: makefile.vc # Author: Julian Smart # Created: 1997 # Updated: diff --git a/src/xpm/xpmi.h b/src/xpm/xpmi.h index 05856fb75c..d171ecc1a4 100644 --- a/src/xpm/xpmi.h +++ b/src/xpm/xpmi.h @@ -44,8 +44,8 @@ #include "xpm.h" -// Added by JACS for Watcom C++/wxWindows compilation (no popen/pclose functions) -#ifdef __WATCOMC__ +// Added by JACS for some compilers (no popen/pclose functions) +#if defined(__WATCOMC__) || (!defined(WIN32) && defined(_MSC_VER)) #define NO_ZPIPE #endif diff --git a/utils/projgen/makeproj.cpp b/utils/projgen/makeproj.cpp index 21281082e8..fa66425fe4 100644 --- a/utils/projgen/makeproj.cpp +++ b/utils/projgen/makeproj.cpp @@ -289,7 +289,7 @@ void MyApp::GenerateSamples(const wxString& dir) GenerateSample("CaretVC", "caret", dir + wxString("/samples/caret"), wxStringList("caret.cpp", 0)); GenerateSample("DrawingVC", "drawing", dir + wxString("/samples/drawing"), wxStringList("drawing.cpp", 0)); GenerateSample("ScrollVC", "scroll", dir + wxString("/samples/scroll"), wxStringList("scroll.cpp", 0)); - GenerateSample("WizardVC", "wizard", dir + wxString("/samples/wizard"), wxStringList("wiztest.cpp", 0)); + GenerateSample("WizardVC", "wiztest", dir + wxString("/samples/wizard"), wxStringList("wiztest.cpp", 0)); GenerateSample("RotateVC", "rotate", dir + wxString("/samples/rotate"), wxStringList("rotate.cpp", 0)); GenerateSample("ExecVC", "exec", dir + wxString("/samples/exec"), wxStringList("exec.cpp", 0)); GenerateSample("FontVC", "font", dir + wxString("/samples/font"), wxStringList("font.cpp", 0));