From 2432b92dd7a837db13d3938a56c1959decd03203 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 7 Jan 1999 08:43:47 +0000 Subject: [PATCH] Doc & Symantec C++ fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/cw.rsp | 2 + docs/latex/wx/closeevt.tex | 2 +- docs/latex/wx/filetype.tex | 40 +++-- docs/latex/wx/helpinst.tex | 2 +- docs/latex/wx/image.tex | 2 - docs/latex/wx/menuitem.tex | 2 +- docs/latex/wx/mimetype.tex | 31 ++-- docs/latex/wx/mutexlck.tex | 9 +- docs/latex/wx/noteevt.tex | 4 +- docs/latex/wx/sashwin.tex | 3 - docs/latex/wx/tdnd.tex | 2 +- docs/msw/todo.txt | 132 ++++++-------- include/wx/defs.h | 4 +- include/wx/filefn.h | 4 + include/wx/list.h | 10 +- include/wx/memory.h | 5 +- include/wx/msw/dc.h | 1 + include/wx/msw/dirdlg.h | 2 + include/wx/msw/pen.h | 1 + include/wx/msw/private.h | 4 + include/wx/msw/region.h | 1 + include/wx/ownerdrw.h | 4 +- include/wx/propform.h | 2 +- include/wx/proplist.h | 6 +- include/wx/string.h | 2 + samples/proplist/test.cpp | 2 +- samples/proplist/test.h | 2 +- src/common/cmndata.cpp | 3 +- src/common/config.cpp | 9 +- src/common/docview.cpp | 4 +- src/common/event.cpp | 4 + src/common/fileconf.cpp | 3 +- src/common/filefn.cpp | 6 +- src/common/gdicmn.cpp | 4 +- src/common/image.cpp | 4 + src/common/log.cpp | 4 +- src/common/mimetype.cpp | 3 + src/common/prntbase.cpp | 2 +- src/common/resource.cpp | 14 +- src/common/string.cpp | 2 + src/generic/panelg.cpp | 3 + src/generic/proplist.cpp | 2 +- src/makesc.env | 16 +- src/msw/accel.cpp | 1 + src/msw/app.cpp | 6 +- src/msw/bitmap.cpp | 1 + src/msw/button.cpp | 1 + src/msw/checkbox.cpp | 5 + src/msw/checklst.cpp | 10 ++ src/msw/choice.cpp | 1 + src/msw/clipbrd.cpp | 2 + src/msw/colordlg.cpp | 2 + src/msw/control.cpp | 5 +- src/msw/dc.cpp | 4 +- src/msw/dcmemory.cpp | 1 + src/msw/dib.cpp | 9 +- src/msw/dibutils.cpp | 2 +- src/msw/filedlg.cpp | 2 + src/msw/frame.cpp | 2 +- src/msw/gaugemsw.cpp | 1 + src/msw/helpwin.cpp | 2 +- src/msw/icon.cpp | 2 +- src/msw/iniconf.cpp | 12 +- src/msw/listbox.cpp | 3 + src/msw/main.cpp | 1 + src/msw/makefile.b32 | 3 + src/msw/makefile.bcc | 8 + src/msw/makefile.dos | 8 + src/msw/makefile.g95 | 1 + src/msw/makefile.nt | 6 + src/msw/makefile.sc | 357 ++++++++++++++++++++++++------------- src/msw/makefile.wat | 4 + src/msw/menuitem.cpp | 4 + src/msw/minifram.cpp | 1 + src/msw/nativdlg.cpp | 4 +- src/msw/notebook.cpp | 4 +- src/msw/ownerdrw.cpp | 14 +- src/msw/penwin.cpp | 1 + src/msw/pnghand.cpp | 2 + src/msw/radiobox.cpp | 4 +- src/msw/radiobut.cpp | 1 + src/msw/regconf.cpp | 1 + src/msw/registry.cpp | 12 +- src/msw/settings.cpp | 9 +- src/msw/slidrmsw.cpp | 2 + src/msw/spinbutt.cpp | 2 +- src/msw/statbmp.cpp | 2 +- src/msw/statbr95.cpp | 9 +- src/msw/stattext.cpp | 2 + src/msw/tabctrl.cpp | 2 +- src/msw/tbar95.cpp | 2 +- src/msw/tbarmsw.cpp | 4 +- src/msw/textctrl.cpp | 7 +- src/msw/timer.cpp | 1 + src/msw/utils.cpp | 4 +- src/msw/utilsexc.cpp | 1 + src/msw/window.cpp | 1 + 97 files changed, 586 insertions(+), 336 deletions(-) diff --git a/distrib/msw/cw.rsp b/distrib/msw/cw.rsp index b24d9ed863..d032bd9478 100644 --- a/distrib/msw/cw.rsp +++ b/distrib/msw/cw.rsp @@ -1,4 +1,6 @@ src/make_cw.mcp +src/common/cwy_tab.c +src/common/cwlex_yy.c include/wx_cw.pch include/wx_cw.pch++ include/wx_cw_d.pch diff --git a/docs/latex/wx/closeevt.tex b/docs/latex/wx/closeevt.tex index 58bf4391f0..fac2e156c2 100644 --- a/docs/latex/wx/closeevt.tex +++ b/docs/latex/wx/closeevt.tex @@ -17,7 +17,7 @@ functions that take a wxCloseEvent argument. event applies to wxFrame and wxDialog classes.} \twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function. This event applies to wxApp only.} -\twocolitem{{\bf EVT\__END\_SESSION(func)}}{Process an end session event, supplying the member function. +\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function. This event applies to wxApp only.} \end{twocollist}% diff --git a/docs/latex/wx/filetype.tex b/docs/latex/wx/filetype.tex index 3b56bcdb6b..f4d52516a7 100644 --- a/docs/latex/wx/filetype.tex +++ b/docs/latex/wx/filetype.tex @@ -31,7 +31,7 @@ typically correspond to the extension ".txt", but may as well be associated with \wxheading{Required headers} -#include + \wxheading{Derived from} @@ -64,10 +64,10 @@ function, for example: \begin{verbatim} // provide the message parameters for the MIME type manager -class MailMessageParamaters : public wxFileType::MessageParameters +class MailMessageParameters : public wxFileType::MessageParameters { public: - MailMessageParamaters(const wxString& filename, + MailMessageParameters(const wxString& filename, const wxString& mimetype) : wxFileType::MessageParameters(filename, mimetype) { @@ -85,7 +85,7 @@ public: \end{verbatim} Now you only need to create an object of this class and pass it to, for example, -\helpref{GetOpenCommand}{wxfiletypegetopencommand} like this: +\rtfsp\helpref{GetOpenCommand}{wxfiletypegetopencommand} like this: \begin{verbatim} wxString command; @@ -99,7 +99,6 @@ else { // we don't know how to handle such files... } - \end{verbatim} {\bf Windows:} As only the file name is used by the program associated with the @@ -107,25 +106,28 @@ given extension anyhow (but no other message parameters), there is no need to ever derive from MessageParameters class for a Windows-only program. \membersection{wxFileType::wxFileType}\label{wxfiletypewxfiletype} + \func{}{wxFileType}{\void} The default constructor is private because you should never create objects of -this type: they are only returned by -\helpref{wxMimeTypesManager}{wxmimetypesmanager} methods. +this type: they are only returned by \helpref{wxMimeTypesManager}{wxmimetypesmanager} methods. \membersection{wxFileType::\destruct{wxFileType}}\label{wxfiletypedtor} -\func{}{\destruct{wxFileType}{\void} + +\func{}{\destruct{wxFileType}}{\void} The destructor of this class is not virtual, so it should not be derived from. \membersection{wxFileType::GetMimeType}\label{wxfiletypegetmimetype} -\func{bool}{GetMimeType}{\param{wxString *}{mimeType}} + +\func{bool}{GetMimeType}{\param{wxString*}{ mimeType}} If the function returns TRUE, the string pointed to by {\it mimeType} is filled with full MIME type specification for this file type: for example, "text/plain". \membersection{wxFileType::GetExtensions}\label{wxfiletypegetextensions} -\func{bool}{GetExtensions}{\param{wxArrayString \&}{extensions}} + +\func{bool}{GetExtensions}{\param{wxArrayString\&}{ extensions}} If the function returns TRUE, the array {\it extensions} is filled with all extensions associated with this file type: for example, it may @@ -139,7 +141,8 @@ by \helpref{GetFileTypeFromExtension}{wxmimetypesmanagergetfiletypefromextension function in the first place. \membersection{wxFileType::GetIcon}\label{wxfiletypegeticon} -\func{bool}{GetIcon}{\param{wxIcon *}{icon}} + +\func{bool}{GetIcon}{\param{wxIcon*}{ icon}} If the function returns TRUE, the icon associated with this file type will be created and assigned to the {\it icon} parameter. @@ -147,14 +150,16 @@ created and assigned to the {\it icon} parameter. {\bf Unix:} This function always returns FALSE under Unix. \membersection{wxFileType::GetDescription}\label{wxfiletypegetdescription} -\func{bool}{GetDescription}{\param{wxString *}{desc}} + +\func{bool}{GetDescription}{\param{wxString*}{ desc}} If the function returns TRUE, the string pointed to by {\it desc} is filled with a brief description for this file type: for example, "text document" for the "text/plain" MIME type. \membersection{wxFileType::GetOpenCommand}\label{wxfiletypegetopencommand} -\func{bool}{GetOpenCommand}{\param{wxString *}{command},\param{MessageParameters \&}{params}} + +\func{bool}{GetOpenCommand}{\param{wxString*}{ command}, \param{MessageParameters\&}{ params}} If the function returns TRUE, the string pointed to by {\it command} is filled with the command which must be executed (see \helpref{wxExecute}{wxexecute}) in @@ -162,7 +167,8 @@ order to open the file of the given type. The name of the file is retrieved from \helpref{MessageParameters}{wxfiletypemessageparameters} class. \membersection{wxFileType::GetPrintCommand}\label{wxfiletypegetprintcommand} -\func{bool}{GetPrintCommand}{\param{wxString *}{command},\param{MessageParameters \&}{params}} + +\func{bool}{GetPrintCommand}{\param{wxString*}{ command},\param{MessageParameters\&}{ params}} If the function returns TRUE, the string pointed to by {\it command} is filled with the command which must be executed (see \helpref{wxExecute}{wxexecute}) in @@ -170,13 +176,15 @@ order to print the file of the given type. The name of the file is retrieved from \helpref{MessageParameters}{wxfiletypemessageparameters} class. \membersection{wxFileType::ExpandCommand}\label{wxfiletypeexpandcommand} -\func{static wxString}{ExpandCommand}{\param{const wxString \&}{command},\param{MessageParameters \&}{params}} + +\func{static wxString}{ExpandCommand}{\param{const wxString\&}{ command}, \param{MessageParameters\&}{ params}} This function is primarly intended for GetOpenCommand and GetPrintCommand usage but may be also used by the application directly if, for example, you want to use some non default command to open the file. The function replaces all occurences of + \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt \twocolitem{format specificator}{with} @@ -184,6 +192,7 @@ The function replaces all occurences of \twocolitem{\%t}{the MIME type} \twocolitem{\%\{param\}}{the value of the parameter {\it param}} \end{twocollist} + using the MessageParameters object you pass to it. If there is no '\%s' in the command string (and the string is not empty), it is @@ -192,3 +201,4 @@ as "< \%s" were appended to the string. Unlike all other functions of this class, there is no error return for this function. + diff --git a/docs/latex/wx/helpinst.tex b/docs/latex/wx/helpinst.tex index 050aefdd2f..3f0265c1ae 100644 --- a/docs/latex/wx/helpinst.tex +++ b/docs/latex/wx/helpinst.tex @@ -19,7 +19,7 @@ appropriate class is aliased to the name wxHelpController for each platform. There are currently the following help controller classes defined: -\begin{itemize}\itemsep=0 +\begin{itemize}\itemsep=0pt \item wxWinHelpController, for controlling Windows Help. \item wxExtHelpController, for controlling external browsers under Unix. The default browser is Netscape Navigator. diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex index 6eac4c09cd..91e691bafa 100644 --- a/docs/latex/wx/image.tex +++ b/docs/latex/wx/image.tex @@ -419,8 +419,6 @@ Returns TRUE if the images were unequal, FALSE otherwise. \section{\class{wxImageHandler}}\label{wximagehandler} -\overview{Overview}{wximageoverview} - This is the base class for implementing image file loading/saving, and image creation from data. It is used within wxImage and is not normally seen by the application. diff --git a/docs/latex/wx/menuitem.tex b/docs/latex/wx/menuitem.tex index 00706c3f42..aaa192d866 100644 --- a/docs/latex/wx/menuitem.tex +++ b/docs/latex/wx/menuitem.tex @@ -11,7 +11,7 @@ wxOwnerDrawn (Windows only)\\ \wxheading{See also} -\helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu}, \helpref{wxOwnerDrawn}{wxownerdrawn} +\helpref{wxMenuBar}{wxmenubar}, \helpref{wxMenu}{wxmenu} \latexignore{\rtfignore{\wxheading{Members}}} diff --git a/docs/latex/wx/mimetype.tex b/docs/latex/wx/mimetype.tex index 263e124619..55b6315eef 100644 --- a/docs/latex/wx/mimetype.tex +++ b/docs/latex/wx/mimetype.tex @@ -24,7 +24,7 @@ but it will support modifying it as well in the future versions. \wxheading{Required headers} -#include + \wxheading{Derived from} @@ -46,18 +46,18 @@ program. \membersection{Query database} -These functions are the heart of this class: they allow to find a -\helpref{file type}{wxfiletype} object from either file extension or MIME type. +These functions are the heart of this class: they allow to find a \helpref{file type}{wxfiletype} object +from either file extension or MIME type. If the function is successful, it returns a pointer to the wxFileType object -which {\bf must be deleted by the caller}, otherwise NULL will be returned. +which {\bf must} be deleted by the caller, otherwise NULL will be returned. \helpref{GetFileTypeFromMimeType}{wxmimetypesmanagergetfiletypefrommimetype}\\ \helpref{GetFileTypeFromExtension}{wxmimetypesmanagergetfiletypefromextension} -\membersection{Initialization functions} +\membersection{Initialization functions}\label{wxmimetypesmanagerinit} -{\bf Unix:} These functions may be used to load additional (except for the -default ones which are loaded automatically) files containing MIME +{\bf Unix:} These functions may be used to load additional files (except for the +default ones which are loaded automatically) containing MIME information in either mailcap(5) or mime.types(5) format. \helpref{ReadMailcap}{wxmimetypesmanagerreadmailcap}\\ @@ -71,6 +71,7 @@ information in either mailcap(5) or mime.types(5) format. }} \membersection{wxMimeTypesManager::wxMimeTypesManager}\label{wxmimetypesmanagerctor} + \func{}{wxMimeTypesManager}{\void} Constructor puts the object in the "working" state, no additional initialization @@ -78,34 +79,40 @@ are needed - but \helpref{ReadXXX}{wxmimetypesmanagerinit} may be used to load additional mailcap/mime.types files. \membersection{wxMimeTypesManager::\destruct{wxMimeTypesManager}}\label{wxmimetypesmanagerdtor} -\func{}{\destruct{wxMimeTypesManager}{\void} + +\func{}{\destruct{wxMimeTypesManager}}{\void} Destructor is not virtual, so this class should not be derived from. \membersection{wxMimeTypesManager::GetFileTypeFromExtension}\label{wxmimetypesmanagergetfiletypefromextension} -\func{wxFileType *}{GetFileTypeFromExtension}{\param{const wxString \&}{extension}} + +\func{wxFileType*}{GetFileTypeFromExtension}{\param{const wxString\&}{ extension}} Gather information about the files with given extension and return the corresponding \helpref{wxFileType}{wxfiletype} object or NULL if the extension is unknown. \membersection{wxMimeTypesManager::GetFileTypeFromMimeType}\label{wxmimetypesmanagergetfiletypefrommimetype} -\func{wxFileType *}{GetFileTypeFromMimeType}{\param{const wxString \&}{mimeType}} + +\func{wxFileType*}{GetFileTypeFromMimeType}{\param{const wxString\&}{ mimeType}} Gather information about the files with given MIME type and return the corresponding \helpref{wxFileType}{wxfiletype} object or NULL if the MIME type is unknown. \membersection{wxMimeTypesManager::ReadMailcap}\label{wxmimetypesmanagerreadmailcap} -\func{\void}{ReadMailcap}{\param{const wxString \&}{filename}} + +\func{void}{ReadMailcap}{\param{const wxString\&}{ filename}} Load additional file containing information about MIME types and associated information in mailcap format. See metamail(1) and mailcap(5) for more information. \membersection{wxMimeTypesManager::ReadMimeTypes}\label{wxmimetypesmanagerreadmimetypes} -\func{\void}{ReadMimeTypes}{\param{const wxString \&}{filename}} + +\func{void}{ReadMimeTypes}{\param{const wxString\&}{ filename}} Load additional file containing information about MIME types and associated information in mime.types file format. See metamail(1) and mailcap(5) for more information. + diff --git a/docs/latex/wx/mutexlck.tex b/docs/latex/wx/mutexlck.tex index b0d565663c..1db3945ac8 100644 --- a/docs/latex/wx/mutexlck.tex +++ b/docs/latex/wx/mutexlck.tex @@ -13,24 +13,27 @@ None. \wxheading{See also} -\helpref{wxMutex}{wxmutex}, -\helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker} +\helpref{wxMutex}{wxmutex}, \helpref{wxCriticalSectionLocker}{wxcriticalsectionlocker} \latexignore{\rtfignore{\wxheading{Members}}} \membersection{wxMutexLocker::wxMutexLocker}\label{wxmutexlockerctor} + \func{}{wxMutexLocker}{\param{wxMutex *}{mutex}} Constructs a wxMutexLocker object associated with mutex which must be non NULL -and locks it. Call \helpref{IsOk}{wxmutexisok} to check if the mutex was +and locks it. Call \helpref{IsLocked}{wxmutexlockerisok} to check if the mutex was successfully locked. \membersection{wxMutexLocker::\destruct{wxMutexLocker}}\label{wxmutexlockerdtor} + \func{}{\destruct{wxMutexLocker}}{\void} Destuctor releases the mutex if it was successfully acquired in the ctor. \membersection{wxMutexLocker::IsOk}\label{wxmutexlockerisok} + \constfunc{bool}{IsOk}{\void} Returns TRUE if mutex was acquired in the constructor, FALSE otherwise. + diff --git a/docs/latex/wx/noteevt.tex b/docs/latex/wx/noteevt.tex index a8602c5688..04c72ddc8e 100644 --- a/docs/latex/wx/noteevt.tex +++ b/docs/latex/wx/noteevt.tex @@ -16,9 +16,9 @@ functions that take a wxNotebookEvent argument. \twocolwidtha{7cm} \begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_NOTEBOOK_PAGE_CHANGED(id, func)}}{The page selection was changed. Processes a +\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGED(id, func)}}{The page selection was changed. Processes a wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGED event.} -\twocolitem{{\bf EVT\_NOTEBOOK_PAGE_CHANGING(id, func)}}{The page selection is about to be changed. +\twocolitem{{\bf EVT\_NOTEBOOK\_PAGE\_CHANGING(id, func)}}{The page selection is about to be changed. Processes a wxEVT\_COMMAND\_NOTEBOOK\_PAGE\_CHANGING event.} \end{twocollist}% diff --git a/docs/latex/wx/sashwin.tex b/docs/latex/wx/sashwin.tex index 0956e0ea11..9094aeb729 100644 --- a/docs/latex/wx/sashwin.tex +++ b/docs/latex/wx/sashwin.tex @@ -182,9 +182,6 @@ Call this function to make a sash visible or invisible on a particular edge. \helpref{wxSashWindow::GetSashVisible}{wxsashwindowgetsashvisible} - // Set whether there's a border in this position - inline void SetSashBorder(wxSashEdgePosition edge, bool border) { m_sashes[edge].m_border = border; } - \membersection{wxSashWindow::SetSashBorder}\label{wxsashwindowsetsashborder} \func{void}{SetSashBorder}{\param{wxSashEdgePosition }{edge}, \param{bool}{ hasBorder}} diff --git a/docs/latex/wx/tdnd.tex b/docs/latex/wx/tdnd.tex index e2a15e65d2..bf805dec0d 100644 --- a/docs/latex/wx/tdnd.tex +++ b/docs/latex/wx/tdnd.tex @@ -92,7 +92,7 @@ this, \helpref{GetFormatCount}{wxdroptargetgetformatcount} and \helpref{GetForma used and if the format is supported (i.e. is one of returned by GetFormat()), then \helpref{OnDrop}{wxdroptargetondrop} is called. -Otherwise, \helpref{wxDragNone}{stdformat} is returned by DoDragDrop() and +Otherwise, wxDragNone is returned by DoDragDrop() and nothing happens. \item {\bf The end:} After processing the data, DoDragDrop() returns either diff --git a/docs/msw/todo.txt b/docs/msw/todo.txt index 2628b9ffb0..bb425cd9a4 100644 --- a/docs/msw/todo.txt +++ b/docs/msw/todo.txt @@ -5,73 +5,52 @@ Todo on wxWin 2.0, Windows platform HIGH PRIORITY ------------- -Find/add wxThread sample - Arthur T-D? - -Implement wxDC floating point transformations. - -Add wxDC::DeviceToLogical -> wxPoint etc (convenience accessors). - -Revamp Dialog Editor for new controls and properties (e.g. -window id). +Add further controls and properties to Dialog Editor. Update manual. - wxApp changes DONE - wxMenu changes DONE - wxModule DONE - wxRegion DONE - wxFile DONE wxTempFile - wxMask DONE - wxDC:Blit DONE - wxTaskBarIcon DONE wxMsgCatalog etc. - wxLog - wxConfig DONE wxRegKey - wxTabCtrl DONE - wxNotebook DONE (some more explanation required) - wxWave DONE - wxJoystick DONE wxStatusBar95 and wxFrame status bar functions wxListBox changes (for ownerdraw functionality) wxThread DONE (except for topic overview) - wxHelpController classes DONE (except for Unix ones) wxString PARTLY DONE Drag and drop (change API if required, e.g. const). - wxCheckListBox DONE - wxAcceleratorTable DONE wxBaseArray, other arrays (wxOwnerDrawn) Document the include file for each class - Macros, e.g. wxASSERT Stream classes + wxSocket topic overview Functions -Write tutorial. +Makefiles and/or IDE files for other compilers: Symantec C++, +Salford C++. IDE files for BC++. -A wxDC function (or two) for drawing 3D edges. +Check TODO entries in source and manual. -Makefiles for other compilers. Generic makefiles? -Rewrite makefiles to maintain simultaneous debug/release -objects. +Add centring, right justify styles to wxStaticText. -More wxSystemSettings (see comment in settings.cpp). +Extend wxSystemSettings to get symbols for current nationality, +e.g. ',' instead of '.' for decimal points. + +LOW PRIORITY (MEDIUM TERM) +-------------------------- + +Convert remaining utilities e.g. wxGraphLayout. -Convert remaining utilities e.g. (GLCanvas; wxGraphLayout) and samples +More wxSystemSettings (see comment in settings.cpp). -Check TODO entries. +Synchronize drawing functions on all platforms, using Chris's +code to test them. Shell function to invoke a document with open, print, whatever... -Make use of Vadim's gettext implementation throughout wxWin code. -Document it. +Write tutorial. -Retain callback functions; have semi-compatible callback function prototypes -for all controls, at least in WXWIN_COMPATIBLE mode, but -retain (Set)Callback for all compilations. This is following a -panicky response to losing callbacks. +Add wxDC::DeviceToLogical -> wxPoint etc (convenience accessors). -Merge dib.cpp, dibutils.cpp (see also some DIB code in bitmap.cpp). +Generic makefiles? Rewrite makefiles to maintain simultaneous debug/release +objects. Add a wxTabCtrl sample. @@ -81,16 +60,7 @@ printer characteristics) and more reliable printing framework. Add GetIcon, GetBitmap to wxImageList. Perhaps store bitmaps in image list so we can get them later. -Add centring, right justify styles to wxStaticText. - -Synchronize drawing functions on all platforms, using Chris's -code to test them. - -Extend wxSystemSettings to get symbols for current nationality, -e.g. ',' instead of '.' for decimal points. - -LOW PRIORITY ------------- +Merge dib.cpp, dibutils.cpp (see also some DIB code in bitmap.cpp). Debug PNG support in wxBitmap (no 4-bit support), and possibly add a convertor from PNG to HICON. We could perhaps also support inclusion of PNGs into @@ -100,46 +70,25 @@ Fonts: ability to enumerate them. Angled text. -Eliminate Set/GetDefaultBackgroundColour? Just take background -colour for child control instead. - Think about reimplementing wxBitmapButton, wxStaticBitmap using BS_BITMAP, SS_BITMAP - but this may not allow wxBitmap argument, so instead just allow controls loaded from native resource to deal with this style and call default processing. -Better clipboard support. +Better clipboard support (as per Robert's class). wxWizard class? Doc/view - have some standard views/docs e.g. wxTextView. -wxClassWizard for generating files, chunks of code. - Miscellaneous file/system function wrappers. -wxImage or replacement; further wxBitmap/wxIcon etc. functions -(load animated icos). - -Integrate existing multimedia classes. - -Rich text class? - -Look at WinCE stuff incl. database classes. - -Improve conversion guide, compatibility classes, tools? - Bug database. -ActiveX support? - -OpenGL integration. +OpenGL integration: check that wxGLCanvas works cross-platform. Menu bitmaps - document Vadim's enhancements. -Enhance Tex2RTF to generate Microsoft HTML help, perhaps Netscape -HTML help also. - wxCreateDynamicObject is apparently slow: ~ 2000 calls to strcmp. Need to use some kind of hash table scheme. @@ -149,8 +98,6 @@ to wxFrame to mirror the X situation (multiple displays). Write translator between old and new .wxr formats (including substituting static text for obsolete labels). -Improve and expand wxSizer classes. - Write more validators. Also, how do they work if loading the dialog from a .wxr? Could call SetValidator from within InitDialog for all controls, then call TransferDataToWindow. @@ -159,6 +106,30 @@ Classes for file/OS utility functions. Add support for more static controls e.g. wxStaticLine. +Perhaps rewrite wxFile to use FILE* descriptors, so Eof and Flush +can work. + +Find out how to set wxFileDialog position. + +Maybe bundle Andrew Tucker's DBWIN32 with wxWindows (it's only +26KB), for viewing debug messages without a debugger. + +Implement wxDC floating point transformations. + +A wxDC function (or two) for drawing 3D edges? + +LOW PRIORITY (LONG TERM) +------------------------ + +Improve and expand wxSizer classes. + +ActiveX support + +Look at porting to WinCE + +Enhance Tex2RTF to generate Microsoft HTML help, perhaps Netscape +HTML help also. + GDI objects could be optimised further in constructors by searching for a matching, pre-existing object, and assigning from that, thus sharing the internal handle. A problem with this @@ -181,10 +152,9 @@ needed to ensure that the operation was maximally efficient (creating a new object rather than searching may or may not be more efficient). -Perhaps rewrite wxFile to use FILE* descriptors, so Eof and Flush -can work. +Integrate Guilhem's multimedia classes: documentation, makefiles, +different platforms. + +Rich text class. -Find out how to set wxFileSelector position. -Maybe bundle Andrew Tucker's DBWIN32 with wxWindows (it's only -26KB), for viewing debug messages without a debugger. diff --git a/include/wx/defs.h b/include/wx/defs.h index 095cb07c4e..5195027e10 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -107,6 +107,8 @@ #if (__MWERKS__ < 0x1000) || !__option(bool) typedef unsigned int bool; #endif +#elif defined(__SC__) + typedef unsigned int bool; #elif defined(_MSC_VER) && (_MSC_VER <= 1000) typedef unsigned int bool; #elif defined(_MSC_VER) && (_MSC_VER == 1020) @@ -120,7 +122,7 @@ typedef unsigned char bool; #endif -#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) +#if ( defined(_MSC_VER) && (_MSC_VER <= 800) ) || defined(__GNUWIN32__) || (defined(__BORLANDC__) && defined(__WIN16__)) || defined(__SC__) #define byte unsigned char #endif diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 3ce7a54ac2..ba6b8c7f24 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -37,6 +37,10 @@ typedef long off_t; typedef long off_t; #endif +#if defined(__SC__) +typedef long off_t; +#endif + const off_t wxInvalidOffset = (off_t)-1; typedef enum { diff --git a/include/wx/list.h b/include/wx/list.h index 1533a1a336..aa90193540 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -127,6 +127,8 @@ private: // wxNodeBase class is a (base for) node in a double linked list // ----------------------------------------------------------------------------- +WXDLLEXPORT_DATA(extern wxListKey) wxDefaultListKey; + class WXDLLEXPORT wxNodeBase { friend class wxListBase; @@ -136,7 +138,7 @@ public: wxNodeBase *previous = (wxNodeBase *)NULL, wxNodeBase *next = (wxNodeBase *)NULL, void *data = NULL, - const wxListKey& key = wxListKey()); + const wxListKey& key = wxDefaultListKey); virtual ~wxNodeBase(); @@ -221,7 +223,7 @@ protected: // create a node for the list of this type virtual wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, void *data, - const wxListKey& key = wxListKey()) = 0; + const wxListKey& key = wxDefaultListKey) = 0; // ctors // from an array @@ -334,7 +336,7 @@ private: nodetype *previous = (nodetype *)NULL, \ nodetype *next = (nodetype *)NULL, \ T *data = (T *)NULL, \ - const wxListKey& key = wxListKey()) \ + const wxListKey& key = wxDefaultListKey) \ : wxNodeBase(list, previous, next, data, key) { } \ \ nodetype *GetNext() const \ @@ -408,7 +410,7 @@ private: protected: \ wxNodeBase *CreateNode(wxNodeBase *prev, wxNodeBase *next, \ void *data, \ - const wxListKey& key = wxListKey()) \ + const wxListKey& key = wxDefaultListKey) \ { \ return new nodetype(this, \ (nodetype *)prev, (nodetype *)next, \ diff --git a/include/wx/memory.h b/include/wx/memory.h index 8f4d7a1270..841ea9e410 100644 --- a/include/wx/memory.h +++ b/include/wx/memory.h @@ -17,6 +17,7 @@ #endif #include "wx/defs.h" +#include "wx/string.h" /* The macro which will be expanded to include the file and line number @@ -37,8 +38,6 @@ # endif #endif -#include "wx/string.h" - #ifdef __WXDEBUG__ void * wxDebugAlloc(size_t size, char * fileName, int lineNum, bool isObject, bool isVect = FALSE); @@ -83,7 +82,9 @@ void operator delete[](void *buf, char*, int); #endif #endif + // wxUSE_GLOBAL_MEMORY_OPERATORS #endif + // __WXDEBUG__ typedef unsigned int wxMarkerType; diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index 7d101628e6..7e3133f0c8 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -21,6 +21,7 @@ #include "wx/icon.h" #include "wx/font.h" #include "wx/gdicmn.h" +#include "wx/window.h" class WXDLLEXPORT wxDC: public wxObject { diff --git a/include/wx/msw/dirdlg.h b/include/wx/msw/dirdlg.h index 7f3a8dd5f9..5f8f7778ac 100644 --- a/include/wx/msw/dirdlg.h +++ b/include/wx/msw/dirdlg.h @@ -18,6 +18,8 @@ #include "wx/dialog.h" +WXDLLEXPORT_DATA(extern const char*) wxFileSelectorPromptStr; + class WXDLLEXPORT wxDirDialog: public wxDialog { DECLARE_DYNAMIC_CLASS(wxDirDialog) diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 79b162ecd1..6bfd8c646a 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -17,6 +17,7 @@ #endif #include "wx/gdiobj.h" +#include "wx/bitmap.h" typedef WXDWORD wxDash ; diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index 54d0d96e88..bef4c75a13 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -177,6 +177,10 @@ inline bool wxStyleHasBorder(long style) #define WS_EX_CLIENTEDGE 0 #endif +#if defined(__WIN32__) && !defined(WS_EX_CLIENTEDGE) + #define WS_EX_CLIENTEDGE 0x00000200L +#endif + #if defined(__WIN95__) && defined(__WXDEBUG__) && wxUSE_DBWIN32 #ifdef OutputDebugString #undef OutputDebugString diff --git a/include/wx/msw/region.h b/include/wx/msw/region.h index 4be8411eb5..54f91f6234 100644 --- a/include/wx/msw/region.h +++ b/include/wx/msw/region.h @@ -18,6 +18,7 @@ #include "wx/list.h" #include "wx/gdiobj.h" +#include "wx/gdicmn.h" class WXDLLEXPORT wxRect; class WXDLLEXPORT wxPoint; diff --git a/include/wx/ownerdrw.h b/include/wx/ownerdrw.h index 97b19a0e8f..7726a31f1e 100644 --- a/include/wx/ownerdrw.h +++ b/include/wx/ownerdrw.h @@ -59,8 +59,8 @@ public: m_bmpUnchecked = bmpUnchecked; m_bOwnerDrawn = TRUE; } - inline wxBitmap& GetBitmap(bool bChecked = TRUE) const - { return (wxBitmap &)(bChecked ? m_bmpChecked : m_bmpUnchecked); } + inline const wxBitmap& GetBitmap(bool bChecked = TRUE) const + { return (bChecked ? m_bmpChecked : m_bmpUnchecked); } // the height of the menu checkmark (or bitmap) is determined by the font // for the current item, but the width should be always the same (for the diff --git a/include/wx/propform.h b/include/wx/propform.h index c88c4bdbd5..b731da2d34 100644 --- a/include/wx/propform.h +++ b/include/wx/propform.h @@ -275,7 +275,7 @@ class wxPropertyFormFrame: public wxFrame public: wxPropertyFormFrame(wxPropertyFormView *v, wxFrame *parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"): + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): wxFrame(parent, -1, title, pos, size, style, name) { m_view = v; diff --git a/include/wx/proplist.h b/include/wx/proplist.h index 66f1a3c40c..59340b3977 100644 --- a/include/wx/proplist.h +++ b/include/wx/proplist.h @@ -57,7 +57,9 @@ #define wxPROP_PULLDOWN 64 #define wxPROP_SHOWVALUES 128 -#ifdef __XVIEW__ +// Show OK/Cancel buttons on X-based systems where window management is +// more awkward +#if defined(__WXMOTIF__) || defined(__WXGTK__) #define wxPROP_BUTTON_DEFAULT wxPROP_BUTTON_OK | wxPROP_BUTTON_CANCEL | wxPROP_BUTTON_CHECK_CROSS | wxPROP_PULLDOWN #else #define wxPROP_BUTTON_DEFAULT wxPROP_BUTTON_CHECK_CROSS | wxPROP_PULLDOWN | wxPROP_SHOWVALUES @@ -330,7 +332,7 @@ class wxPropertyListFrame: public wxFrame public: wxPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"): + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): wxFrame(parent, -1, title, pos, size, style, name) { m_view = v; diff --git a/include/wx/string.h b/include/wx/string.h index c54084e268..81c856c9e3 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -90,6 +90,8 @@ inline int WXDLLEXPORT Stricmp(const char *psz1, const char *psz2) { #if defined(_MSC_VER) return _stricmp(psz1, psz2); +#elif defined(__SC__) + return _stricmp(psz1, psz2); #elif defined(__BORLANDC__) return stricmp(psz1, psz2); #elif defined(__WATCOMC__) diff --git a/samples/proplist/test.cpp b/samples/proplist/test.cpp index 267dfdab74..484b59e22e 100644 --- a/samples/proplist/test.cpp +++ b/samples/proplist/test.cpp @@ -46,7 +46,7 @@ bool MyApp::OnInit(void) RegisterValidators(); // Create the main frame window - m_mainFrame = new MyFrame(NULL, "wxPropertySheet Demo", wxPoint(0, 0), wxSize(300, 400), wxDEFAULT_FRAME); + m_mainFrame = new MyFrame(NULL, "wxPropertySheet Demo", wxPoint(0, 0), wxSize(300, 400), wxDEFAULT_FRAME_STYLE); // Make a menubar wxMenu *file_menu = new wxMenu; diff --git a/samples/proplist/test.h b/samples/proplist/test.h index 44998f21e6..955a8456bf 100644 --- a/samples/proplist/test.h +++ b/samples/proplist/test.h @@ -61,7 +61,7 @@ class PropListFrame: public wxPropertyListFrame public: PropListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME, const wxString& name = "frame"): + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): wxPropertyListFrame(v, parent, title, pos, size, style, name) { } diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 83ca461048..91eb71f5a5 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -38,7 +38,8 @@ #include #endif -#if defined(__WATCOMC__) +#if defined(__WATCOMC__) || defined(__SC__) +#include #include #endif diff --git a/src/common/config.cpp b/src/common/config.cpp index 2d5dde5016..79613109ac 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -19,6 +19,10 @@ #include "wx/wxprec.h" +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + #include #ifdef wxUSE_CONFIG @@ -27,11 +31,6 @@ #pragma hdrstop #endif //__BORLANDC__ -#ifndef WX_PRECOMP - #include - #include -#endif //WX_PRECOMP - #include #include #include diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 0495f862db..710d9f5f52 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1258,7 +1258,7 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates, int n = 0; for (i = 0; i < noTemplates; i++) { - if (templates[i]->IsVisible() && templates[i]->GetViewName()) + if (templates[i]->IsVisible() && (templates[i]->GetViewName() != "")) { strings[n] = WXSTRINGCAST templates[i]->m_viewTypeName; data[n] = (char *)templates[i]; @@ -1706,7 +1706,7 @@ void wxCommandProcessor::SetMenuStrings(void) // we've undone to the start of the list, but can redo the first. wxCommand *redoCommand = (wxCommand *)m_commands.First()->Data(); wxString redoCommandName(redoCommand->GetName()); - if (!redoCommandName) redoCommandName = _("Unnamed command"); + if (redoCommandName == "") redoCommandName = _("Unnamed command"); buf = wxString(_("&Redo ")) + redoCommandName; m_commandEditMenu->SetLabel(wxID_REDO, buf); m_commandEditMenu->Enable(wxID_REDO, TRUE); diff --git a/src/common/event.cpp b/src/common/event.cpp index d367b21ec5..79580ae5c1 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -395,7 +395,11 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) // BC++ doesn't like while (table.entries[i].m_fn) +#ifdef __SC__ + while (table.entries[i].m_fn != 0) +#else while (table.entries[i].m_fn != 0L) +#endif { if ((event.GetEventType() == table.entries[i].m_eventType) && (table.entries[i].m_id == -1 || // Match, if event spec says any id will do (id == -1) diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 57a3e22c96..5366c66d4a 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -28,8 +28,7 @@ #endif //__BORLANDC__ #ifndef WX_PRECOMP - #include "wx/string.h" - #include "wx/intl.h" + #include "wx/wx.h" #endif //WX_PRECOMP #include "wx/app.h" diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 7716488573..9027d5e2dc 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -241,7 +241,7 @@ wxFileExists (const wxString& filename) #else struct stat stbuf; - if (filename && stat ((char *)(const char *)filename, &stbuf) == 0) + if ((filename != "") && stat ((char *)(const char *)filename, &stbuf) == 0) return TRUE; return FALSE; #endif @@ -582,8 +582,8 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin strncmp(dest, val, len) == 0) { strcpy(wxBuffer, "~"); - if (user && *user) - strcat(wxBuffer, user); + if (user != "") + strcat(wxBuffer, (const char*) user); #ifdef __WXMSW__ // strcat(wxBuffer, "\\"); #else diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 34df0496ce..30f08f8560 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -20,7 +20,7 @@ #pragma hdrstop #endif - +#include "wx/event.h" #include "wx/gdicmn.h" #include "wx/brush.h" #include "wx/pen.h" @@ -598,7 +598,7 @@ wxFont *wxFontList:: // each_font->GetFontId () == FamilyOrFontId) /* New font system */ //#else each_font->GetFamily () == FamilyOrFontId && - (!each_font->GetFaceName() || each_font->GetFaceName() == Face)) + ((each_font->GetFaceName() == "") || each_font->GetFaceName() == Face)) //#endif return each_font; } diff --git a/src/common/image.cpp b/src/common/image.cpp index 7d439e823f..7ba1dbdcb1 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -27,6 +27,10 @@ #endif #include "wx/filefn.h" +#ifdef __WXMSW__ +#include +#endif + //----------------------------------------------------------------------------- // wxImage //----------------------------------------------------------------------------- diff --git a/src/common/log.cpp b/src/common/log.cpp index f99580301d..35add23be2 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -29,13 +29,13 @@ // wxWindows #ifndef WX_PRECOMP + #include #include #include #include #include #include - - #include + #include #include #include #endif //WX_PRECOMP diff --git a/src/common/mimetype.cpp b/src/common/mimetype.cpp index 61310e14de..9a1e1b4fba 100644 --- a/src/common/mimetype.cpp +++ b/src/common/mimetype.cpp @@ -31,14 +31,17 @@ // wxWindows #ifndef WX_PRECOMP #include "wx/string.h" + #include "wx/icon.h" #endif //WX_PRECOMP #include "wx/log.h" #include "wx/intl.h" #include "wx/dynarray.h" +#include "wx/confbase.h" #ifdef __WXMSW__ #include "wx/msw/registry.h" + #include "windows.h" #else // Unix #include "wx/textfile.h" #endif // OS diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 36de9a627d..035a76c16d 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -408,7 +408,7 @@ void wxPreviewControlBar::SetZoomControl(int zoom) int wxPreviewControlBar::GetZoomControl() { char buf[20]; - if (m_zoomControl && m_zoomControl->GetStringSelection()) + if (m_zoomControl && (m_zoomControl->GetStringSelection() != "")) { strcpy(buf, m_zoomControl->GetStringSelection()); buf[strlen(buf) - 1] = 0; diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 19f87a2b4a..abead5b084 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -39,12 +39,14 @@ #include "wx/button.h" #include "wx/bmpbuttn.h" #include "wx/radiobox.h" +#include "wx/radiobut.h" #include "wx/listbox.h" #include "wx/choice.h" #include "wx/checkbox.h" #include "wx/settings.h" #include "wx/slider.h" #include "wx/statbox.h" +#include "wx/statbmp.h" #if wxUSE_GAUGE #include "wx/gauge.h" #endif @@ -1321,18 +1323,18 @@ wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), wxEx wxExpr *coloursExpr = listExpr->Nth(3); wxExpr *xresExpr = listExpr->Nth(4); wxExpr *yresExpr = listExpr->Nth(5); - if (nameExpr && nameExpr->StringValue()) + if (nameExpr && nameExpr->StringValue() != "") { bitmapSpec->SetName(nameExpr->StringValue()); } - if (typeExpr && typeExpr->StringValue()) + if (typeExpr && typeExpr->StringValue() != "") { bitmapSpec->SetValue1(wxParseWindowStyle(typeExpr->StringValue())); } else bitmapSpec->SetValue1(0); - if (platformExpr && platformExpr->StringValue()) + if (platformExpr && platformExpr->StringValue() != "") { wxString plat(platformExpr->StringValue()); if (plat == "windows" || plat == "WINDOWS") @@ -2034,7 +2036,7 @@ wxBitmap wxResourceCreateBitmap(const wxString& resource, wxResourceTable *table wxItemResource *item = table->FindResource(resource); if (item) { - if (!item->GetType() || strcmp(item->GetType(), "wxBitmap") != 0) + if ((item->GetType() == "") || (item->GetType() != "wxBitmap")) { wxLogWarning(_("%s not a bitmap resource specification."), (const char*) resource); return wxNullBitmap; @@ -2812,8 +2814,8 @@ bool wxWindow::LoadFromResource(wxWindow *parent, const wxString& resourceName, wxItemResource *resource = table->FindResource((const char *)resourceName); // if (!resource || (resource->GetType() != wxTYPE_DIALOG_BOX)) - if (!resource || !resource->GetType() || - ! ((strcmp(resource->GetType(), "wxDialog") == 0) || (strcmp(resource->GetType(), "wxPanel") == 0))) + if (!resource || (resource->GetType() == "") || + ! ((resource->GetType() == "wxDialog") || (resource->GetType() == "wxPanel"))) return FALSE; wxString title(resource->GetTitle()); diff --git a/src/common/string.cpp b/src/common/string.cpp index 03e3ac1516..e00c818033 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -106,8 +106,10 @@ extern const char *g_szNul = &g_strEmpty.dummy; // always available), but it's unsafe because it doesn't check for buffer // size - so give a warning #define wxVsprintf(buffer,len,format,argptr) vsprintf(buffer,format, argptr) +#ifndef __SC__ #pragma message("Using sprintf() because no snprintf()-like function defined") #endif +#endif // ---------------------------------------------------------------------------- // global functions diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp index 2adf0c5360..244cb0aedb 100644 --- a/src/generic/panelg.cpp +++ b/src/generic/panelg.cpp @@ -21,6 +21,9 @@ #endif #ifndef WX_PRECOMP +#include "wx/object.h" +#include "wx/font.h" +#include "wx/colour.h" #include "wx/settings.h" #endif diff --git a/src/generic/proplist.cpp b/src/generic/proplist.cpp index 9b32d02c00..44fc728e4b 100644 --- a/src/generic/proplist.cpp +++ b/src/generic/proplist.cpp @@ -1908,7 +1908,7 @@ void wxPropertyStringListEditorDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) void wxPropertyStringListEditorDialog::OnText(wxCommandEvent& event) { - if (event.GetEventType() == wxEVENT_TYPE_TEXT_ENTER_COMMAND) + if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER) { SaveCurrentSelection(); } diff --git a/src/makesc.env b/src/makesc.env index 9c3455bff6..538c0c6f40 100644 --- a/src/makesc.env +++ b/src/makesc.env @@ -2,19 +2,25 @@ WXDIR = $(WXWIN) INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base +LIBDIR = $(WXDIR)\lib SRCSUFF = cpp OBJSUFF = obj +INCLUDE=$(INCDIR) + # default values CC=sc RC=rc -CFLAGS = -o -ml -W -D__WXMSW__ -LDFLAGS = -ml -W + +CFLAGS = -o -mn -W -D__NT__ -DWIN32 -D__WIN32__ -D__WINDOWS__ -D__WXMSW__ -D__SC__ -D__WXDEBUG__ $(EXTRACPPFLAGS) +LDFLAGS = $(EXTRALDFLAGS) .$(SRCSUFF).obj: - *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $< + *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $< -o$@ + +# -Jm: relaxed type checking +.c.obj: + *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) -DUSE_DEFINE -Jm $< -o$@ diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp index 448cec07ea..680ec4e770 100644 --- a/src/msw/accel.cpp +++ b/src/msw/accel.cpp @@ -23,6 +23,7 @@ #ifndef WX_PRECOMP #include #include "wx/setup.h" +#include "wx/window.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/app.cpp b/src/msw/app.cpp index bbe4b89407..d74f1ac230 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -51,7 +51,7 @@ // if you don't do the same for the Ole calls further down. // Also, OLE is used not just for drag and drop (it's used by automatn.cpp). // #if wxUSE_DRAG_AND_DROP -#ifndef __GNUWIN32__ +#if !defined(__GNUWIN32__) && !defined(__SC__) #include #endif // #endif @@ -200,7 +200,7 @@ bool wxApp::Initialize() } */ -#ifndef __GNUWIN32__ +#if !defined(__GNUWIN32__) && !defined(__SC__) // we need to initialize OLE library if ( FAILED(::OleInitialize(NULL)) ) wxFatalError(_("Cannot initialize OLE")); @@ -517,7 +517,7 @@ void wxApp::CleanUp() if ( wxDisableButtonBrush ) ::DeleteObject( wxDisableButtonBrush ) ; -#ifndef __GNUWIN32__ +#if !defined(__GNUWIN32__) && !defined(__SC__) ::OleUninitialize(); #endif diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 264bb3359e..e935db2c76 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -27,6 +27,7 @@ #include "wx/utils.h" #include "wx/app.h" #include "wx/palette.h" +#include "wx/dcmemory.h" #include "wx/bitmap.h" #include "wx/icon.h" #endif diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 79f81ffaaa..6b88286368 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/button.h" +#include "wx/brush.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 33452a6cdd..0fe5de314e 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/checkbox.h" +#include "wx/brush.h" #endif #include "wx/msw/private.h" @@ -169,6 +170,10 @@ void wxCheckBox::SetValue(bool val) SendMessage((HWND) GetHWND(), BM_SETCHECK, val, 0); } +#ifndef BST_CHECKED +#define BST_CHECKED 0x0001 +#endif + bool wxCheckBox::GetValue(void) const { #ifdef __WIN32__ diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 05b5b86c06..b4848d08c2 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -24,7 +24,15 @@ #include +#include "wx/object.h" +#include "wx/colour.h" +#include "wx/font.h" +#include "wx/bitmap.h" +#include "wx/window.h" +#include "wx/listbox.h" #include "wx/ownerdrw.h" +#include "wx/settings.h" +#include "wx/dcmemory.h" #include "wx/msw/checklst.h" // ============================================================================ @@ -120,7 +128,9 @@ bool wxCheckListBoxItem::OnDrawItem(wxDC& dc, const wxRect& rc, RECT rect = { 0, 0, nCheckWidth, nCheckHeight }; #ifdef __WIN32__ +#ifndef __SC__ DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK); +#endif #else // In WIN16, draw a cross HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 1ea6050d46..d36ce7fe08 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/choice.h" +#include "wx/utils.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index f2cc312f8d..bd37c1ba56 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -27,6 +27,8 @@ #if wxUSE_CLIPBOARD #ifndef WX_PRECOMP +#include "wx/object.h" +#include "wx/event.h" #include "wx/app.h" #include "wx/frame.h" #include "wx/bitmap.h" diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index df7bd24b0b..3bc03e6099 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -23,8 +23,10 @@ #ifndef WX_PRECOMP #include #include "wx/defs.h" +#include "wx/bitmap.h" #include "wx/pen.h" #include "wx/brush.h" +#include "wx/colour.h" #include "wx/gdicmn.h" #include "wx/utils.h" #include "wx/frame.h" diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 297d81e8fb..6c1cbf8c8d 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -21,10 +21,13 @@ #endif #ifndef WX_PRECOMP +#include "wx/event.h" #include "wx/app.h" #include "wx/dcclient.h" #endif +#include "wx/control.h" + #include "wx/msw/private.h" #if defined(__WIN95__) && !defined(__GNUWIN32__) @@ -61,7 +64,7 @@ wxControl::~wxControl(void) wxWindow *parent = (wxWindow *)GetParent(); if (parent) { - if (parent->GetDefaultItem() == this) + if (parent->GetDefaultItem() == (wxButton*) this) parent->SetDefaultItem(NULL); } } diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index d14d10afb1..1df225556d 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -26,6 +26,8 @@ #include "wx/utils.h" #include "wx/dialog.h" #include "wx/app.h" +#include "wx/bitmap.h" +#include "wx/dcmemory.h" #endif #include "wx/dcprint.h" @@ -603,7 +605,7 @@ void wxDC::DrawEllipticArc(long x,long y,long w,long h,double sa,double ea) void wxDC::DrawIcon(const wxIcon& icon, long x, long y) { -#if defined(__WIN32__) +#if defined(__WIN32__) && !defined(__SC__) ::DrawIconEx((HDC) m_hDC, XLOG2DEV(x), YLOG2DEV(y), (HICON) icon.GetHICON(), icon.GetWidth(), icon.GetHeight(), 0, 0, DI_NORMAL); #else diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index d94a70b75c..f3de3b4b4a 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -21,6 +21,7 @@ #endif #ifndef WX_PRECOMP +#include "wx/utils.h" #endif #include "wx/dcmemory.h" diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index ac6bffe7dd..ed29152759 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -35,6 +35,7 @@ #ifndef WX_PRECOMP #include "wx/setup.h" #include "wx/defs.h" +#include "wx/bitmap.h" #endif #include @@ -688,7 +689,7 @@ HPALETTE MakeDIBPalette(LPBITMAPINFOHEADER lpInfo) return((HPALETTE) GetStockObject(DEFAULT_PALETTE)); } -bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal) +bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxPalette **pal) { HBITMAP hBitmap; HPALETTE hPalette; @@ -705,7 +706,7 @@ bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal) { if (pal) { - *pal = new wxColourMap; + *pal = new wxPalette; (*pal)->SetHPALETTE((WXHPALETTE) hPalette); } else @@ -729,7 +730,7 @@ bool wxLoadIntoBitmap(char *filename, wxBitmap *bitmap, wxColourMap **pal) else return FALSE; } -wxBitmap *wxLoadBitmap(char *filename, wxColourMap **pal) +wxBitmap *wxLoadBitmap(char *filename, wxPalette **pal) { wxBitmap *bitmap = new wxBitmap; if (wxLoadIntoBitmap(filename, bitmap, pal)) @@ -918,7 +919,7 @@ HANDLE BitmapToDIB (HBITMAP hBitmap, HPALETTE hPal) return hDIB; } -bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxColourMap *colourmap) +bool wxSaveBitmap(char *filename, wxBitmap *bitmap, wxPalette *colourmap) { HPALETTE hPalette = 0; if (colourmap) diff --git a/src/msw/dibutils.cpp b/src/msw/dibutils.cpp index 5ad72da4f4..f592823605 100644 --- a/src/msw/dibutils.cpp +++ b/src/msw/dibutils.cpp @@ -133,7 +133,7 @@ int DibWriteFile(LPSTR szFile, LPBITMAPINFOHEADER lpbi) bmf.bfReserved1 = 0; bmf.bfReserved2 = 0; bmf.bfOffBits = sizeof(bmf) + (char far*)(DibPtr(lpbi)) - (char far*)lpbi; -#if defined( __WATCOMC__) || defined(_MSC_VER) +#if defined( __WATCOMC__) || defined(_MSC_VER) || defined(__SC__) if (_hwrite(fh, (LPCSTR)(&bmf), sizeof(bmf))<0 || _hwrite(fh, (LPCSTR)lpbi, size)<0) { _lclose(fh); diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index db3b773dd0..4a97a16e14 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -24,8 +24,10 @@ #include #include "wx/defs.h" #include "wx/utils.h" +#include "wx/msgdlg.h" #include "wx/dialog.h" #include "wx/filedlg.h" +#include "wx/intl.h" #endif #include diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 8f1e6f9db3..ab4b9fd2d6 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -612,7 +612,7 @@ void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow * WXDWORD extendedStyle = MakeExtendedStyle(style); -#ifndef __WIN16__ +#if !defined(__WIN16__) && !defined(__SC__) if (style & wxFRAME_TOOL_WINDOW) extendedStyle |= WS_EX_TOOLWINDOW; #endif diff --git a/src/msw/gaugemsw.cpp b/src/msw/gaugemsw.cpp index 1f82c799c4..f2d9d22743 100644 --- a/src/msw/gaugemsw.cpp +++ b/src/msw/gaugemsw.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/defs.h" +#include "wx/utils.h" #endif #if wxUSE_GAUGE diff --git a/src/msw/helpwin.cpp b/src/msw/helpwin.cpp index e761c09d45..068165f21e 100644 --- a/src/msw/helpwin.cpp +++ b/src/msw/helpwin.cpp @@ -96,7 +96,7 @@ bool wxWinHelpController::DisplaySection(int section) bool wxWinHelpController::DisplayBlock(long block) { // Use context number -- a very rough equivalent to block id! - if (!m_helpFile) return FALSE; + if (m_helpFile == "") return FALSE; char buf[_MAXPATHLEN]; strcpy(buf, m_helpFile); diff --git a/src/msw/icon.cpp b/src/msw/icon.cpp index 08c91789d0..ed875403a2 100644 --- a/src/msw/icon.cpp +++ b/src/msw/icon.cpp @@ -142,7 +142,7 @@ bool wxICOResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long { if ( bitmap->IsKindOf(CLASSINFO(wxIcon)) ) { -#if defined(__WIN32__) +#if defined(__WIN32__) && !defined(__SC__) if (desiredWidth > -1 && desiredHeight > -1) { M_ICONHANDLERDATA->m_hIcon = (WXHICON) ::LoadImage(wxGetInstance(), name, IMAGE_ICON, desiredWidth, desiredHeight, LR_DEFAULTCOLOR); diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index ff65d00f8a..b8e524f752 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -23,7 +23,9 @@ #ifndef WX_PRECOMP #include #include + #include #include + #include #endif //WX_PRECOMP #include @@ -401,9 +403,15 @@ bool wxIniConfig::Flush(bool /* bCurrentOnly */) bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso) { // passing NULL as value to WritePrivateProfileString deletes the key - if ( !Write(szKey, (const char *)NULL) ) +// if ( !Write(szKey, (const char *)NULL) ) +// return FALSE; + wxConfigPathChanger path(this, szKey); + wxString strKey = GetPrivateKeyName(path.Name()); + + if (WritePrivateProfileString(m_strGroup, szKey, + (const char*) NULL, m_strLocalFilename) == 0) return FALSE; - + if ( !bGroupIfEmptyAlso || !IsEmpty() ) return TRUE; diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 40f02d0f05..d5348816b6 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -23,6 +23,9 @@ #ifndef WX_PRECOMP #include "wx/listbox.h" #include "wx/settings.h" +#include "wx/brush.h" +#include "wx/font.h" +#include "wx/dc.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/main.cpp b/src/msw/main.cpp index 044388d1af..1db4fedfc8 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -20,6 +20,7 @@ #pragma hdrstop #endif +#include "wx/event.h" #include "wx/app.h" #include diff --git a/src/msw/makefile.b32 b/src/msw/makefile.b32 index f6e34946eb..aa15bc4246 100644 --- a/src/msw/makefile.b32 +++ b/src/msw/makefile.b32 @@ -116,6 +116,7 @@ COMMONOBJS = \ $(MSWDIR)\log.obj \ $(MSWDIR)\layout.obj \ $(MSWDIR)\memory.obj \ + $(MSWDIR)\mimetype.obj \ $(MSWDIR)\module.obj \ $(MSWDIR)\object.obj \ $(MSWDIR)\postscrp.obj \ @@ -511,6 +512,8 @@ $(MSWDIR)\log.obj: $(COMMDIR)\log.$(SRCSUFF) $(MSWDIR)\memory.obj: $(COMMDIR)\memory.$(SRCSUFF) +$(MSWDIR)\mimetype.obj: $(COMMDIR)\mimetype.$(SRCSUFF) + $(MSWDIR)\module.obj: $(COMMDIR)\module.$(SRCSUFF) $(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF) diff --git a/src/msw/makefile.bcc b/src/msw/makefile.bcc index 61bf1771d0..e887b9c1b2 100644 --- a/src/msw/makefile.bcc +++ b/src/msw/makefile.bcc @@ -146,6 +146,7 @@ COMMONOBJS = \ $(MSWDIR)\dynlib.obj \ $(MSWDIR)\tokenzr.obj +# Don't compile for WIN16 # $(MSWDIR)\socket.obj \ # $(MSWDIR)\sckaddr.obj \ # $(MSWDIR)\protocol.obj \ @@ -154,8 +155,13 @@ COMMONOBJS = \ # $(MSWDIR)\ftp.obj \ # $(MSWDIR)\sckfile.obj \ # $(MSWDIR)\sckipc.obj \ + +# Needs extra files (sql*.h) so not compiled by default. # $(MSWDIR)\odbc.obj \ +# Uses WIN32 registry functions +# $(MSWDIR)\mimetype.obj \ + MSWOBJS = \ $(MSWDIR)\accel.obj \ $(MSWDIR)\app.obj \ @@ -491,6 +497,8 @@ $(MSWDIR)\log.obj: $(COMMDIR)\log.$(SRCSUFF) $(MSWDIR)\memory.obj: $(COMMDIR)\memory.$(SRCSUFF) +$(MSWDIR)\mimetype.obj: $(COMMDIR)\mimetype.$(SRCSUFF) + $(MSWDIR)\module.obj: $(COMMDIR)\module.$(SRCSUFF) $(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF) diff --git a/src/msw/makefile.dos b/src/msw/makefile.dos index 07528f8dad..e7ef28afa6 100644 --- a/src/msw/makefile.dos +++ b/src/msw/makefile.dos @@ -125,6 +125,9 @@ COMMONOBJS = \ # Doesn't compile (nested classes) # $(COMMDIR)\fileconf.obj\ +# Uses WIN32 registry functions +# $(COMMDIR)\mimetype.obj \ + # Fails when including png.h, on jmp_buf. # $(COMMDIR)\image.obj \ @@ -758,6 +761,11 @@ $(COMMDIR)/memory.obj: $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) << +$(COMMDIR)/mimetype.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) +<< + $(COMMDIR)/module.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index 012870182b..202b58d8a1 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -99,6 +99,7 @@ COMMONOBJS = \ $(COMMDIR)/log.$(OBJSUFF) \ $(COMMDIR)/memory.$(OBJSUFF) \ $(COMMDIR)/module.$(OBJSUFF) \ + $(COMMDIR)/mimetype.$(OBJSUFF) \ $(COMMDIR)/object.$(OBJSUFF) \ $(COMMDIR)/odbc.$(OBJSUFF) \ $(COMMDIR)/process.$(OBJSUFF) \ diff --git a/src/msw/makefile.nt b/src/msw/makefile.nt index 0926a42e63..2bacd2f7af 100644 --- a/src/msw/makefile.nt +++ b/src/msw/makefile.nt @@ -101,6 +101,7 @@ COMMONOBJS = \ $(COMMDIR)\layout.obj \ $(COMMDIR)\log.obj \ $(COMMDIR)\memory.obj \ + $(COMMDIR)\mimetype.obj \ $(COMMDIR)\module.obj \ $(COMMDIR)\odbc.obj \ $(COMMDIR)\object.obj \ @@ -867,6 +868,11 @@ $(COMMDIR)/memory.obj: $*.$(SRCSUFF) $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ << +$(COMMDIR)/mimetype.obj: $*.$(SRCSUFF) + cl @<< +$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ +<< + $(COMMDIR)/module.obj: $*.$(SRCSUFF) cl @<< $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@ diff --git a/src/msw/makefile.sc b/src/msw/makefile.sc index ee780f6f1c..36b8332946 100644 --- a/src/msw/makefile.sc +++ b/src/msw/makefile.sc @@ -5,143 +5,244 @@ WXDIR = $(WXWIN) -!include $(WXDIR)\src\makesc.env +include ..\makesc.env -INCDIR = $(WXDIR)\include -MSWINC = $(INCDIR)\msw -BASEINC = $(INCDIR)\base +DEBUG=0 -# default values overridden by src\makefile.sc - -CC=sc -CFLAGS = -o -ml -W -Dwx_msw - -INCLUDE=$(BASEINC);$(MSWINC);$(WXDIR)\contrib\fafa;$(WXDIR)\contrib\itsybits +LIBTARGET = $(LIBDIR)\wx.lib OPTIONS= # end of configuration section ########################################## -OBJS = wx_win.obj wx_frame.obj wx_panel.obj wx_utils.obj wx_main.obj \ -wx_item.obj wx_text.obj wx_gdi.obj wx_dialg.obj wx_canvs.obj wx_dc.obj \ -wx_mf.obj wx_ipc.obj wx_timer.obj wx_clipb.obj wx_scrol.obj wx_vlbox.obj \ -wx_stat.obj wx_buttn.obj wx_messg.obj wx_check.obj wx_choic.obj wx_rbox.obj wx_lbox.obj \ -wx_group.obj wx_gauge.obj wx_txt.obj wx_mtxt.obj wx_slidr.obj wx_menu.obj wx_db.obj\ -wx_cmdlg.obj - -all: $(OBJS) - -wx_obj.obj: $(BASEINC)\wx_obj.h - -wx_win.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h \ -$(BASEINC)\wx_obj.h $(BASEINC)\wx_utils.h wx_win.$(SRCSUFF) \ -$(MSWINC)\wx_gdi.h $(MSWINC)\wx_privt.h - -wx_main.obj: $(BASEINC)\wx_defs.h $(BASEINC)\wx_obj.h \ -$(MSWINC)\wx_frame.h $(BASEINC)\wx_utils.h - -wx_frame.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h wx_frame.$(SRCSUFF) \ -$(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_panel.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_panel.h \ -wx_panel.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_text.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_text.h \ -wx_text.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_canvs.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_canvs.h \ -wx_canvs.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_gdi.h $(MSWINC)\wx_dc.h \ -$(MSWINC)\wx_privt.h - -wx_dc.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_canvs.h wx_dc.$(SRCSUFF) \ -$(BASEINC)\wx_stdev.h $(MSWINC)\wx_gdi.h $(MSWINC)\wx_dc.h \ -$(MSWINC)/wx_dccan.h $(MSWINC)/wx_dcmem.h - -wx_mf.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -wx_mf.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_gdi.h $(MSWINC)\wx_mf.h - -wx_item.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_win.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_frame.h $(MSWINC)\wx_item.h \ -wx_item.$(SRCSUFF) $(BASEINC)\wx_stdev.h $(MSWINC)\wx_privt.h - -wx_utils.obj: $(BASEINC)\wx_defs.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h wx_utils.$(SRCSUFF) - -wx_ipc.obj: $(BASEINC)\wx_defs.h $(BASEINC)\wx_obj.h \ -$(BASEINC)\wx_utils.h $(MSWINC)\wx_ipc.h wx_ipc.$(SRCSUFF) - -wx_gdi.obj: $(BASEINC)\wx_defs.h $(MSWINC)\wx_gdi.h $(BASEINC)\wx_utils.h \ -wx_gdi.$(SRCSUFF) - -wx_dialg.obj: $(BASEINC)\wx_defs.h wx_dialg.$(SRCSUFF) $(MSWINC)\wx_dialg.h \ -$(MSWINC)\wx_win.h $(BASEINC)\wx_utils.h $(MSWINC)\wx_panel.h \ -$(MSWINC)\wx_privt.h - -wx_timer.obj: $(BASEINC)\wx_defs.h wx_timer.$(SRCSUFF) $(MSWINC)\wx_timer.h - -wx_clipb.obj: $(BASEINC)\wx_defs.h wx_clipb.$(SRCSUFF) $(MSWINC)\wx_clipb.h +GENDIR=$(WXDIR)\src\generic +COMMDIR=$(WXDIR)\src\common +XPMDIR=$(WXDIR)\src\xpm +OLEDIR=ole +MSWDIR=$(WXDIR)\src\msw + +GENERICOBJS= \ + $(GENDIR)\choicdgg.obj \ + $(GENDIR)\gridg.obj \ + $(GENDIR)\laywin.obj \ + $(GENDIR)\panelg.obj \ + $(GENDIR)\prop.obj \ + $(GENDIR)\propform.obj \ + $(GENDIR)\proplist.obj \ + $(GENDIR)\sashwin.obj \ + $(GENDIR)\scrolwin.obj \ + $(GENDIR)\splitter.obj \ + $(GENDIR)\statusbr.obj \ + $(GENDIR)\tabg.obj \ + $(GENDIR)\textdlgg.obj + +# $(GENDIR)\imaglist.obj \ +# $(GENDIR)\treectrl.obj \ +# $(GENDIR)\listctrl.obj \ +# $(GENDIR)\notebook.obj \ + +# These are generic things that don't need to be compiled on MSW, +# but sometimes it's useful to do so for testing purposes. +NONESSENTIALOBJS= \ + $(GENDIR)\printps.obj \ + $(GENDIR)\prntdlgg.obj \ + $(GENDIR)\msgdlgg.obj \ + $(GENDIR)\helpxlp.obj \ + $(GENDIR)\colrdlgg.obj \ + $(GENDIR)\fontdlgg.obj \ + $(COMMDIR)\postscrp.obj + +COMMONOBJS = \ + $(COMMDIR)\cmndata.obj \ + $(COMMDIR)\config.obj \ + $(COMMDIR)\docview.obj \ + $(COMMDIR)\docmdi.obj \ + $(COMMDIR)\dynarray.obj \ + $(COMMDIR)\dynlib.obj \ + $(COMMDIR)\event.obj \ + $(COMMDIR)\file.obj \ + $(COMMDIR)\filefn.obj \ + $(COMMDIR)\fileconf.obj \ + $(COMMDIR)\framecmn.obj \ + $(COMMDIR)\gdicmn.obj \ + $(COMMDIR)\image.obj \ + $(COMMDIR)\intl.obj \ + $(COMMDIR)\ipcbase.obj \ + $(COMMDIR)\helpbase.obj \ + $(COMMDIR)\layout.obj \ + $(COMMDIR)\log.obj \ + $(COMMDIR)\memory.obj \ + $(COMMDIR)\mimetype.obj \ + $(COMMDIR)\module.obj \ + $(COMMDIR)\object.obj \ + $(COMMDIR)\prntbase.obj \ + $(COMMDIR)\resource.obj \ + $(COMMDIR)\tbarbase.obj \ + $(COMMDIR)\tbarsmpl.obj \ + $(COMMDIR)\textfile.obj \ + $(COMMDIR)\timercmn.obj \ + $(COMMDIR)\utilscmn.obj \ + $(COMMDIR)\validate.obj \ + $(COMMDIR)\valtext.obj \ + $(COMMDIR)\date.obj \ + $(COMMDIR)\hash.obj \ + $(COMMDIR)\list.obj \ + $(COMMDIR)\string.obj \ + $(COMMDIR)\socket.obj \ + $(COMMDIR)\sckaddr.obj \ + $(COMMDIR)\sckfile.obj \ + $(COMMDIR)\sckipc.obj \ + $(COMMDIR)\sckstrm.obj \ + $(COMMDIR)\url.obj \ + $(COMMDIR)\http.obj \ + $(COMMDIR)\protocol.obj \ + $(COMMDIR)\time.obj \ + $(COMMDIR)\tokenzr.obj \ + $(COMMDIR)\wxexpr.obj \ + $(COMMDIR)\y_tab.obj \ + $(COMMDIR)\extended.obj \ + $(COMMDIR)\process.obj \ + $(COMMDIR)\wfstream.obj \ + $(COMMDIR)\mstream.obj \ + $(COMMDIR)\zstream.obj \ + $(COMMDIR)\stream.obj \ + $(COMMDIR)\datstrm.obj \ + $(COMMDIR)\objstrm.obj \ + $(COMMDIR)\variant.obj \ + $(COMMDIR)\wincmn.obj + +# Don't compile +# $(COMMDIR)\db.obj \ +# $(COMMDIR)\dbtable.obj \ +# $(COMMDIR)\odbc.obj \ + +MSWOBJS = \ + $(MSWDIR)\accel.obj \ + $(MSWDIR)\app.obj \ + $(MSWDIR)\bitmap.obj \ + $(MSWDIR)\bmpbuttn.obj \ + $(MSWDIR)\brush.obj \ + $(MSWDIR)\button.obj \ + $(MSWDIR)\checkbox.obj \ + $(MSWDIR)\checklst.obj \ + $(MSWDIR)\choice.obj \ + $(MSWDIR)\clipbrd.obj \ + $(MSWDIR)\colordlg.obj \ + $(MSWDIR)\colour.obj \ + $(MSWDIR)\combobox.obj \ + $(MSWDIR)\control.obj \ + $(MSWDIR)\curico.obj \ + $(MSWDIR)\cursor.obj \ + $(MSWDIR)\data.obj \ + $(MSWDIR)\dc.obj \ + $(MSWDIR)\dcmemory.obj \ + $(MSWDIR)\dcclient.obj \ + $(MSWDIR)\dcprint.obj \ + $(MSWDIR)\dcscreen.obj \ + $(MSWDIR)\dde.obj \ + $(MSWDIR)\dialog.obj \ + $(MSWDIR)\dib.obj \ + $(MSWDIR)\dibutils.obj \ + $(MSWDIR)\dirdlg.obj \ + $(MSWDIR)\filedlg.obj \ + $(MSWDIR)\font.obj \ + $(MSWDIR)\fontdlg.obj \ + $(MSWDIR)\frame.obj \ + $(MSWDIR)\gauge95.obj \ + $(MSWDIR)\gaugemsw.obj \ + $(MSWDIR)\gdiobj.obj \ + $(MSWDIR)\helpwin.obj \ + $(MSWDIR)\icon.obj \ + $(MSWDIR)\iniconf.obj \ + $(MSWDIR)\listbox.obj \ + $(MSWDIR)\main.obj \ + $(MSWDIR)\mdi.obj \ + $(MSWDIR)\menu.obj \ + $(MSWDIR)\menuitem.obj \ + $(MSWDIR)\metafile.obj \ + $(MSWDIR)\minifram.obj \ + $(MSWDIR)\msgdlg.obj \ + $(MSWDIR)\nativdlg.obj \ + $(MSWDIR)\ownerdrw.obj \ + $(MSWDIR)\palette.obj \ + $(MSWDIR)\pen.obj \ + $(MSWDIR)\penwin.obj \ + $(MSWDIR)\printdlg.obj \ + $(MSWDIR)\printwin.obj \ + $(MSWDIR)\radiobox.obj \ + $(MSWDIR)\radiobut.obj \ + $(MSWDIR)\region.obj \ + $(MSWDIR)\registry.obj \ + $(MSWDIR)\regconf.obj \ + $(MSWDIR)\scrolbar.obj \ + $(MSWDIR)\settings.obj \ + $(MSWDIR)\slidrmsw.obj \ + $(MSWDIR)\slider95.obj \ + $(MSWDIR)\spinbutt.obj \ + $(MSWDIR)\statbmp.obj \ + $(MSWDIR)\statbox.obj \ + $(MSWDIR)\statbr95.obj \ + $(MSWDIR)\stattext.obj \ + $(MSWDIR)\tabctrl.obj \ + $(MSWDIR)\taskbar.obj \ + $(MSWDIR)\tbar95.obj \ + $(MSWDIR)\tbarmsw.obj \ + $(MSWDIR)\textctrl.obj \ + $(MSWDIR)\thread.obj \ + $(MSWDIR)\timer.obj \ + $(MSWDIR)\utils.obj \ + $(MSWDIR)\utilsexc.obj \ + $(MSWDIR)\wave.obj \ + $(MSWDIR)\window.obj + +# Need Win95 support for these +# $(MSWDIR)\notebook.obj \ +# $(MSWDIR)\listctrl.obj \ +# $(MSWDIR)\imaglist.obj \ +# $(MSWDIR)\treectrl.obj \ +# $(OLEDIR)\droptgt.obj \ +# $(OLEDIR)\dropsrc.obj \ +# $(OLEDIR)\dataobj.obj \ +# $(OLEDIR)\oleutils.obj \ +# $(OLEDIR)\uuid.obj \ +# $(OLEDIR)\automtn.obj + +# Doesn't compile with SC++ 6 +# $(MSWDIR)\joystick.obj \ +# $(MSWDIR)\pnghand.obj \ + +XPMOBJECTS = $(XPMDIR)\crbuffri.obj\ + $(XPMDIR)\crdatfri.obj\ + $(XPMDIR)\create.obj $(XPMDIR)\crifrbuf.obj\ + $(XPMDIR)\crifrdat.obj\ + $(XPMDIR)\data.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)\wrffrp.obj $(XPMDIR)\wrffri.obj + +# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc. +OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) # $(XPMOBJECTS) + +all: $(LIBTARGET) + +$(LIBTARGET): $(OBJECTS) + -del $(LIBTARGET) + *lib /PAGESIZE:512 $(LIBTARGET) y $(OBJECTS), nul; -wx_stat.obj: wx_stat.$(SRCSUFF) $(MSWINC)\wx_stat.h - -wx_scrol.obj: wx_scrol.$(SRCSUFF) $(MSWINC)\wx_scrol.h - -wx_vlbox.obj: wx_vlbox.$(SRCSUFF) $(MSWINC)\wx_vlbox.h - -wx_buttn.obj: wx_buttn.$(SRCSUFF) $(MSWINC)\wx_buttn.h - -wx_messg.obj: wx_messg.$(SRCSUFF) $(MSWINC)\wx_messg.h - -wx_check.obj: wx_check.$(SRCSUFF) $(MSWINC)\wx_check.h - -wx_choic.obj: wx_choic.$(SRCSUFF) $(MSWINC)\wx_choic.h - -wx_rbox.obj: wx_rbox.$(SRCSUFF) $(MSWINC)\wx_rbox.h - -wx_lbox.obj: wx_lbox.$(SRCSUFF) $(MSWINC)\wx_lbox.h - -wx_group.obj: wx_group.$(SRCSUFF) $(MSWINC)\wx_group.h - -wx_gauge.obj: wx_gauge.$(SRCSUFF) $(MSWINC)\wx_gauge.h - -wx_txt.obj: wx_txt.$(SRCSUFF) $(MSWINC)\wx_txt.h - -wx_mtxt.obj: wx_mtxt.$(SRCSUFF) $(MSWINC)\wx_mtxt.h - -wx_slidr.obj: wx_slidr.$(SRCSUFF) $(MSWINC)\wx_slidr.h - -wx_menu.obj: wx_menu.$(SRCSUFF) $(MSWINC)\wx_menu.h - -wx_db.obj: wx_db.$(SRCSUFF) $(MSWINC)\wx_db.h +clean: + -del *.obj + -del $(LIBTARGET) -wx_cmdlg.obj: wx_cmdlg.$(SRCSUFF) $(MSWINC)\wx_cmdlg.h +$(COMMDIR)\y_tab.obj: $(COMMDIR)\y_tab.c $(COMMDIR)\lex_yy.c -$(MSWINC)/wx_win.h: $(BASEINC)/wb_win.h -$(MSWINC)/wx_main.h: $(BASEINC)/wb_main.h -$(MSWINC)/wx_frame.h: $(BASEINC)/wb_frame.h -$(MSWINC)/wx_panel.h: $(BASEINC)/wb_panel.h -$(MSWINC)/wx_text.h: $(BASEINC)/wb_text.h -$(MSWINC)/wx_dialg.h: $(BASEINC)/wb_dialg.h -$(MSWINC)/wx_ipc.h: $(BASEINC)/wb_ipc.h -$(MSWINC)/wx_gdi.h: $(BASEINC)/wb_gdi.h -$(MSWINC)/wx_event.h: $(BASEINC)/wb_event.h -$(MSWINC)/wx_canvs.h: $(BASEINC)/wb_canvs.h -$(MSWINC)/wx_mf.h: $(BASEINC)/wb_mf.h -$(MSWINC)/wx_item.h: $(BASEINC)/wb_item.h -$(MSWINC)/wx_buttn.h: $(BASEINC)/wb_buttn.h -$(MSWINC)/wx_messg.h: $(BASEINC)/wb_messg.h -$(MSWINC)/wx_choic.h: $(BASEINC)/wb_choic.h -$(MSWINC)/wx_check.h: $(BASEINC)/wb_check.h -$(MSWINC)/wx_lbox.h: $(BASEINC)/wb_lbox.h -$(MSWINC)/wx_txt.h: $(BASEINC)/wb_txt.h -$(MSWINC)/wx_mtxt.h: $(BASEINC)/wb_mtxt.h -$(MSWINC)/wx_slidr.h: $(BASEINC)/wb_slidr.h -$(MSWINC)/wx_menu.h: $(BASEINC)/wb_menu.h +$(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 -clean: - -del *.obj +#$(COMMDIR)\cmndata.obj: $(COMMDIR)\cmndata.cpp +# *$(CC) -c $(CFLAGS) -I$(INCLUDE) $(OPTIONS) $(COMMDIR)\cmndata.cpp -o$(COMMDIR)\cmndata.obj diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index af089716eb..12306011cb 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -70,6 +70,7 @@ COMMONOBJS = cmndata.obj & layout.obj & log.obj & memory.obj & + mimetype.obj & module.obj & object.obj & prntbase.obj & @@ -565,6 +566,9 @@ log.obj: $(COMMDIR)\log.cpp memory.obj: $(COMMDIR)\memory.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< +mimetype.obj: $(COMMDIR)\mimetype.cpp + *$(CCC) $(CPPFLAGS) $(IFLAGS) $< + module.obj: $(COMMDIR)\module.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 293ae51608..e56a02e039 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -22,6 +22,10 @@ #ifndef WX_PRECOMP #include "wx/menu.h" +#include "wx/font.h" +#include "wx/bitmap.h" +#include "wx/settings.h" +#include "wx/font.h" #endif #include "wx/ownerdrw.h" diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp index 8039c2fd78..8192f20092 100644 --- a/src/msw/minifram.cpp +++ b/src/msw/minifram.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/setup.h" +#include "wx/event.h" #include "wx/app.h" #include "wx/utils.h" #endif diff --git a/src/msw/nativdlg.cpp b/src/msw/nativdlg.cpp index f59657cefd..120ecad6b1 100644 --- a/src/msw/nativdlg.cpp +++ b/src/msw/nativdlg.cpp @@ -169,7 +169,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) { win = new wxRadioButton; } -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(BS_BITMAP) else if (style & BS_BITMAP) { // TODO: how to find the bitmap? @@ -241,7 +241,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd) if ((style1 == SS_LEFT) || (style1 == SS_RIGHT) || (style1 == SS_SIMPLE)) win = new wxStaticText; -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(BS_BITMAP) else if (style1 == SS_BITMAP) { win = new wxStaticBitmap; diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 28577f7992..6fbfb93887 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -27,13 +27,15 @@ #include #include +#include +#include #include #include // Windows standard headers #ifndef __WIN95__ - #error "wxNotebook is not supported under Windows 3.1" + #error "wxNotebook is only supported Windows 95 and above" #endif //Win95 #include // for SetWindowFont diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index 3f1358dcb6..65477ba905 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -21,7 +21,11 @@ #endif #ifndef WX_PRECOMP + #include "wx/font.h" + #include "wx/bitmap.h" + #include "wx/dcmemory.h" #include "wx/menu.h" + #include "wx/utils.h" #endif #include "wx/ownerdrw.h" @@ -29,6 +33,10 @@ #include +#ifdef DrawText +#undef DrawText +#endif + // ============================================================================ // implementation of wxOwnerDrawn class // ============================================================================ @@ -45,7 +53,7 @@ wxOwnerDrawn::wxOwnerDrawn(const wxString& str, m_nMarginWidth = ms_nLastMarginWidth; } -#if defined(__WXMSW__) && defined(__WIN32__) +#if defined(__WXMSW__) && defined(__WIN32__) && defined(SM_CXMENUCHECK) size_t wxOwnerDrawn::ms_nDefaultMarginWidth = GetSystemMetrics(SM_CXMENUCHECK); #else // # what is the reasonable default? size_t wxOwnerDrawn::ms_nDefaultMarginWidth = 15; @@ -81,7 +89,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) // Win32 GDI functions and not wxWindows ones. Might help to whoever decides to // port this code to X. (VZ) -#ifdef __WIN32__ +#if defined(__WIN32__) && !defined(__SC__) #define O_DRAW_NATIVE_API // comments below explain why I use it #endif @@ -173,7 +181,9 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, const wxRect& rc, wxODAction act, wxODSt // then draw a check mark into it RECT rect = { 0, 0, GetMarginWidth(), m_nHeight }; +#ifndef __SC__ DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK); +#endif // finally copy it to screen DC and clean up BitBlt(hdc, rc.x, rc.y, GetMarginWidth(), m_nHeight, diff --git a/src/msw/penwin.cpp b/src/msw/penwin.cpp index 340c175dc8..3545a28bda 100644 --- a/src/msw/penwin.cpp +++ b/src/msw/penwin.cpp @@ -22,6 +22,7 @@ #ifndef WX_PRECOMP #include "wx/setup.h" +#include "wx/window.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/pnghand.cpp b/src/msw/pnghand.cpp index cd5a4d5307..2f82fa3e10 100644 --- a/src/msw/pnghand.cpp +++ b/src/msw/pnghand.cpp @@ -35,6 +35,8 @@ #endif #include +#include +#include #include #include diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index f49f7a857d..dd9e9421fa 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -23,6 +23,8 @@ #ifndef WX_PRECOMP #include #include "wx/setup.h" +#include "wx/bitmap.h" +#include "wx/brush.h" #include "wx/radiobox.h" #endif @@ -592,7 +594,7 @@ wxString wxRadioBox::GetLabel(void) const void wxRadioBox::SetLabel(const wxString& label) { - if (m_hWnd && label) + if (m_hWnd) SetWindowText((HWND) m_hWnd, label); } diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index ee28cf78d7..be2195e2bc 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -24,6 +24,7 @@ #include #include "wx/setup.h" #include "wx/radiobut.h" +#include "wx/brush.h" #endif #include "wx/msw/private.h" diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index 5fec4bd4be..3a1a84eb3b 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -24,6 +24,7 @@ #include #endif //WX_PRECOMP +#include #include #include #include diff --git a/src/msw/registry.cpp b/src/msw/registry.cpp index f4cdd7b3a5..bb51ed0337 100644 --- a/src/msw/registry.cpp +++ b/src/msw/registry.cpp @@ -474,7 +474,7 @@ bool wxRegKey::DeleteValue(const char *szValue) return FALSE; #ifdef __WIN32__ - m_dwLastError = RegDeleteValue((HKEY) m_hKey, szValue); + m_dwLastError = RegDeleteValue((HKEY) m_hKey, (char*) (const char*) szValue); if ( m_dwLastError != ERROR_SUCCESS ) { wxLogSysError(m_dwLastError, _("can't delete value '%s' from key '%s'"), szValue, GetName().c_str()); @@ -508,7 +508,7 @@ bool wxRegKey::HasValue(const char *szValue) const #ifdef __WIN32__ if ( CONST_CAST Open() ) { - return RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, + return RegQueryValueEx((HKEY) m_hKey, (char*) (const char*) szValue, RESERVED, NULL, NULL, NULL) == ERROR_SUCCESS; } else @@ -550,7 +550,7 @@ wxRegKey::ValueType wxRegKey::GetValueType(const char *szValue) return Type_None; DWORD dwType; - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, + m_dwLastError = RegQueryValueEx((HKEY) m_hKey, (char*) (const char*) szValue, RESERVED, &dwType, NULL, NULL); if ( m_dwLastError != ERROR_SUCCESS ) { wxLogSysError(m_dwLastError, _("can't read value of key '%s'"), @@ -584,7 +584,7 @@ bool wxRegKey::QueryValue(const char *szValue, long *plValue) const if ( CONST_CAST Open() ) { DWORD dwType, dwSize = sizeof(DWORD); RegString pBuf = (RegString)plValue; - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, + m_dwLastError = RegQueryValueEx((HKEY) m_hKey, (char*) (const char*) szValue, RESERVED, &dwType, pBuf, &dwSize); if ( m_dwLastError != ERROR_SUCCESS ) { wxLogSysError(m_dwLastError, _("can't read value of key '%s'"), @@ -611,11 +611,11 @@ bool wxRegKey::QueryValue(const char *szValue, wxString& strValue) const #ifdef __WIN32__ // first get the type and size of the data DWORD dwType, dwSize; - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, + m_dwLastError = RegQueryValueEx((HKEY) m_hKey, (char*) (const char*) szValue, RESERVED, &dwType, NULL, &dwSize); if ( m_dwLastError == ERROR_SUCCESS ) { RegString pBuf = (RegString)strValue.GetWriteBuf(dwSize); - m_dwLastError = RegQueryValueEx((HKEY) m_hKey, szValue, RESERVED, + m_dwLastError = RegQueryValueEx((HKEY) m_hKey, (char*) (const char*) szValue, RESERVED, &dwType, pBuf, &dwSize); strValue.UngetWriteBuf(); if ( m_dwLastError == ERROR_SUCCESS ) { diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 1de9962cee..418477ee81 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -90,7 +90,7 @@ int wxSystemSettings::GetSystemMetric(int index) return ::GetSystemMetrics(SM_CXDOUBLECLK); case wxSYS_DCLICK_Y: return ::GetSystemMetrics(SM_CYDOUBLECLK); -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(SM_CXDRAG) case wxSYS_DRAG_X: return ::GetSystemMetrics(SM_CXDRAG); case wxSYS_DRAG_Y: @@ -122,7 +122,8 @@ int wxSystemSettings::GetSystemMetric(int index) return ::GetSystemMetrics(SM_CXSCREEN); case wxSYS_SCREEN_Y: return ::GetSystemMetrics(SM_CYSCREEN); -#ifdef __WIN32__ + +#if defined(__WIN32__) && defined(SM_CXSIZEFRAME) case wxSYS_FRAMESIZE_X: return ::GetSystemMetrics(SM_CXSIZEFRAME); case wxSYS_FRAMESIZE_Y: @@ -146,13 +147,13 @@ int wxSystemSettings::GetSystemMetric(int index) return ::GetSystemMetrics(SM_CYCAPTION); case wxSYS_MENU_Y: return ::GetSystemMetrics(SM_CYMENU); -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(SM_NETWORK) case wxSYS_NETWORK_PRESENT: return ::GetSystemMetrics(SM_NETWORK) & 0x0001; #endif case wxSYS_PENWINDOWS_PRESENT: return ::GetSystemMetrics(SM_PENWINDOWS); -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(SM_SHOWSOUNDS) case wxSYS_SHOW_SOUNDS: return ::GetSystemMetrics(SM_SHOWSOUNDS); #endif diff --git a/src/msw/slidrmsw.cpp b/src/msw/slidrmsw.cpp index 28d9a1ac7e..452f520fa6 100644 --- a/src/msw/slidrmsw.cpp +++ b/src/msw/slidrmsw.cpp @@ -24,6 +24,8 @@ #include #endif +#include "wx/utils.h" +#include "wx/brush.h" #include "wx/msw/slidrmsw.h" #include "wx/msw/private.h" diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index 4f8c5e5b76..bb3e75b68d 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if defined(__WIN95__) diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index e5070f3546..89f992643f 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -144,7 +144,7 @@ void wxStaticBitmap::SetBitmap(const wxBitmap& bitmap) bool wxStaticBitmap::MSWOnDraw(WXDRAWITEMSTRUCT *item) { long style = GetWindowLong((HWND) GetHWND(), GWL_STYLE); -#ifdef __WIN32__ +#if defined(__WIN32__) && defined(SS_BITMAP) if ((style & 0xFF) == SS_BITMAP) { // Should we call Default() here? diff --git a/src/msw/statbr95.cpp b/src/msw/statbr95.cpp index 4965c95ff2..5f98b77180 100644 --- a/src/msw/statbr95.cpp +++ b/src/msw/statbr95.cpp @@ -27,6 +27,8 @@ #include "wx/dcclient.h" #endif +#ifdef __WIN95__ + #include "wx/log.h" #include "wx/generic/statusbr.h" @@ -35,7 +37,7 @@ #include #include -#ifndef __GNUWIN32__ +#if !defined(__GNUWIN32__) #include #endif @@ -227,4 +229,7 @@ void wxStatusBar95::OnSize(wxSizeEvent& event) SetFieldsWidth(); } -#endif //USE_NATIVE_STATUSBAR \ No newline at end of file +#endif + // __WIN95__ +#endif + // wxUSE_NATIVE_STATUSBAR diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 3c7f1df266..5c9a0cfea5 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -21,7 +21,9 @@ #endif #ifndef WX_PRECOMP +#include "wx/event.h" #include "wx/app.h" +#include "wx/brush.h" #endif #include "wx/stattext.h" diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index 27decfb2f1..0a83802f7b 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if defined(__WIN95__) diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index dd58502449..83347ece08 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if wxUSE_BUTTONBAR && wxUSE_TOOLBAR && defined(__WIN95__) diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp index aed6d11a74..cfbe78c95d 100644 --- a/src/msw/tbarmsw.cpp +++ b/src/msw/tbarmsw.cpp @@ -21,7 +21,7 @@ #endif #ifndef WX_PRECOMP -#include "wx.h" +#include "wx/wx.h" #endif #if wxUSE_BUTTONBAR && wxUSE_TOOLBAR @@ -36,7 +36,9 @@ #include #include "wx/tbarmsw.h" +#include "wx/event.h" #include "wx/app.h" +#include "wx/bitmap.h" #include "wx/msw/private.h" #include "wx/msw/dib.h" diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 13d6c08be1..abf6eaf5f6 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -23,6 +23,9 @@ #ifndef WX_PRECOMP #include "wx/textctrl.h" #include "wx/settings.h" +#include "wx/brush.h" +#include "wx/utils.h" +#include "wx/log.h" #endif #if wxUSE_CLIPBOARD @@ -514,7 +517,7 @@ void wxTextCtrl::SetSelection(long from, long to) bool wxTextCtrl::LoadFile(const wxString& file) { - if (!FileExists(WXSTRINGCAST file)) + if (!wxFileExists(WXSTRINGCAST file)) return FALSE; m_fileName = file; @@ -754,7 +757,7 @@ int wxTextCtrl::overflow(int c) #if wxUSE_IOSTREAMH if ( allocate()==EOF ) { - wxError("Streambuf allocation failed","Internal error"); + wxLogError("Streambuf allocation failed"); return EOF; } #endif diff --git a/src/msw/timer.cpp b/src/msw/timer.cpp index d655f2805e..0842be5308 100644 --- a/src/msw/timer.cpp +++ b/src/msw/timer.cpp @@ -23,6 +23,7 @@ #ifndef WX_PRECOMP #include "wx/setup.h" #include "wx/list.h" + #include "wx/event.h" #include "wx/app.h" #endif diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 6cf42a49ca..877a9b4aca 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -391,7 +391,7 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn) if (majorVsn) *majorVsn = 0; if (minorVsn) *minorVsn = 0; -#ifdef WIN32 +#if defined(__WIN32__) && !defined(__SC__) OSVERSIONINFO info; memset(&info, 0, sizeof(OSVERSIONINFO)); info.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); @@ -415,7 +415,7 @@ int wxGetOsVersion(int *majorVsn, int *minorVsn) return wxWINDOWS; // error if we get here, return generic value #else // Win16 code... - int retValue ; + int retValue = 0; # ifdef __WINDOWS_386__ retValue = wxWIN386; # else diff --git a/src/msw/utilsexc.cpp b/src/msw/utilsexc.cpp index 4140571003..25edebce1d 100644 --- a/src/msw/utilsexc.cpp +++ b/src/msw/utilsexc.cpp @@ -24,6 +24,7 @@ #include "wx/setup.h" #include "wx/utils.h" #include "wx/app.h" +#include "wx/intl.h" #endif #include "wx/log.h" diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 2d1f1ae135..08cf3ce65d 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -31,6 +31,7 @@ #include "wx/panel.h" #include "wx/layout.h" #include "wx/dialog.h" +#include "wx/frame.h" #include "wx/listbox.h" #include "wx/button.h" #include "wx/settings.h" -- 2.45.2