__WIN95__ removed (used to differ win3.1 vs. 'modern' 95 look, nowadays always defined for WXMSW so useless). Minor cleanings and corrections for correct #includes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2005-12-19 10:47:44 +00:00
parent 634fb75048
commit a71d815bbe
28 changed files with 87 additions and 226 deletions

View File

@ -46,6 +46,7 @@ wxMSW:
- Switching page of a hidden notebook doesn't lose focus (Jamie Gadd). - Switching page of a hidden notebook doesn't lose focus (Jamie Gadd).
- Removed wxImageList *GetImageList(int) const. - Removed wxImageList *GetImageList(int) const.
- Fixed MDI context menu problem. - Fixed MDI context menu problem.
- Removed __WIN95__ define
wxGTK: wxGTK:

View File

@ -23,7 +23,6 @@ always tested using \texttt{#ifdef} and not \texttt{#if}.
\twocolitem{\_\_WINDOWS\_\_}{any Windows, yom may also use \_\_WXMSW\_\_} \twocolitem{\_\_WINDOWS\_\_}{any Windows, yom may also use \_\_WXMSW\_\_}
\twocolitem{\_\_WIN16\_\_}{Win16 API (not supported since wxWidgets 2.6)} \twocolitem{\_\_WIN16\_\_}{Win16 API (not supported since wxWidgets 2.6)}
\twocolitem{\_\_WIN32\_\_}{Win32 API} \twocolitem{\_\_WIN32\_\_}{Win32 API}
\twocolitem{\_\_WIN95\_\_}{Windows 95 or NT 4.0 and above system (not NT 3.5x)}
\twocolitem{\_\_WXBASE\_\_}{Only wxBase, no GUI features (same as \texttt{wxUSE\_GUI} $== 0$)} \twocolitem{\_\_WXBASE\_\_}{Only wxBase, no GUI features (same as \texttt{wxUSE\_GUI} $== 0$)}
\twocolitem{\_\_WXCOCOA\_\_}{OS X using Cocoa API} \twocolitem{\_\_WXCOCOA\_\_}{OS X using Cocoa API}
\twocolitem{\_\_WXWINCE\_\_}{Windows CE} \twocolitem{\_\_WXWINCE\_\_}{Windows CE}

View File

@ -63,13 +63,13 @@ The <B>Preprocessor definitions</B> field should contain the following symbols f
<PRE> <PRE>
WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=1, WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=1,
__WIN95__,__WIN32__,WINVER=0x0400,STRICT __WIN32__,WINVER=0x0400,STRICT
</PRE> </PRE>
<P> <P>
and these for Release:<P> and these for Release:<P>
<PRE> <PRE>
NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN95__,__WIN32__, NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN32__,
WINVER=0x0400,STRICT</PRE> WINVER=0x0400,STRICT</PRE>
<P> <P>
The <B>Additional include directories</B> field should contain the following:<P> The <B>Additional include directories</B> field should contain the following:<P>
@ -160,7 +160,7 @@ and executable to be created in the project directory and not a subdirectory.<P>
<DT><B>C/C++: Preprocessor</B><DD> <DT><B>C/C++: Preprocessor</B><DD>
The <B>Preprocessor definitions</B> field should contain the following symbols:<P> The <B>Preprocessor definitions</B> field should contain the following symbols:<P>
<PRE> <PRE>
WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=1,WIN95=1,WINVER=0x0400,STRICT WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=1,WINVER=0x0400,STRICT
</PRE> </PRE>
<P> <P>
The <B>Additional include directories</B> field should contain the following:<P> The <B>Additional include directories</B> field should contain the following:<P>

View File

@ -19,9 +19,7 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#if !defined( __WXMSW__ ) || defined( __WIN95__ )
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#endif
#include "wx/tglbtn.h" #include "wx/tglbtn.h"
#include "wx/bookctrl.h" #include "wx/bookctrl.h"
#include "wx/imaglist.h" #include "wx/imaglist.h"
@ -882,7 +880,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
_T("This is also supposed to demonstrate how ") _T("This is also supposed to demonstrate how ")
_T("to use static controls with line wrapping."), _T("to use static controls with line wrapping."),
wxDefaultPosition, wxDefaultPosition,
wxSize(240, -1) wxSize(240, wxDefaultCoord)
); );
#endif #endif
wrapping_sizer->Add( m_wrappingText ); wrapping_sizer->Add( m_wrappingText );
@ -915,7 +913,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
#endif // wxUSE_SPINBTN #endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL #if wxUSE_SPINCTRL
m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, _T(""), wxPoint(200, 160), wxSize(80, wxDefaultCoord) ); m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, wxEmptyString, wxPoint(200, 160), wxSize(80, wxDefaultCoord) );
m_spinctrl->SetRange(10,30); m_spinctrl->SetRange(10,30);
m_spinctrl->SetValue(15); m_spinctrl->SetValue(15);
#endif // wxUSE_SPINCTRL #endif // wxUSE_SPINCTRL

View File

@ -9,10 +9,6 @@
#define __WIN32__ #define __WIN32__
#endif #endif
#ifndef __WIN95__
#define __WIN95__
#endif
//#ifdef _MSC_VER //#ifdef _MSC_VER
#define __VISUALC__ _MSC_VER #define __VISUALC__ _MSC_VER
//#endif //#endif
@ -54,16 +50,16 @@ BEGIN
GROUPBOX "wxStaticBox",IDC_STATIC,7,7,198,158 GROUPBOX "wxStaticBox",IDC_STATIC,7,7,198,158
EDITTEXT IDC_EDIT1,64,23,125,14,ES_AUTOHSCROLL EDITTEXT IDC_EDIT1,64,23,125,14,ES_AUTOHSCROLL
LTEXT "wxStaticText",IDC_STATIC,13,25,42,8 LTEXT "wxStaticText",IDC_STATIC,13,25,42,8
CONTROL "wxCheckBox",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | CONTROL "wxCheckBox",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,14,47,57,10 WS_TABSTOP,14,47,57,10
COMBOBOX IDC_COMBO1,83,46,48,30,CBS_DROPDOWN | CBS_SORT | COMBOBOX IDC_COMBO1,83,46,48,30,CBS_DROPDOWN | CBS_SORT |
WS_VSCROLL | WS_TABSTOP WS_VSCROLL | WS_TABSTOP
CONTROL "wxRadioButton",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON, CONTROL "wxRadioButton",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,
141,47,64,10 141,47,64,10
LISTBOX IDC_LIST1,14,69,86,40,LBS_SORT | LBS_NOINTEGRALHEIGHT | LISTBOX IDC_LIST1,14,69,86,40,LBS_SORT | LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP WS_VSCROLL | WS_TABSTOP
SCROLLBAR IDC_SCROLLBAR1,111,71,76,11 SCROLLBAR IDC_SCROLLBAR1,111,71,76,11
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH | CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_BOTH |
TBS_NOTICKS | WS_TABSTOP,10,116,100,15 TBS_NOTICKS | WS_TABSTOP,10,116,100,15
CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,111,90, CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,111,90,
10,14 10,14
@ -71,4 +67,3 @@ END
#endif // English (U.K.) resources #endif // English (U.K.) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

View File

@ -562,11 +562,11 @@ void SliderWidgetsPage::OnUpdateUIRadioSides(wxUpdateUIEvent& event)
void SliderWidgetsPage::OnUpdateUIBothSides(wxUpdateUIEvent& event) void SliderWidgetsPage::OnUpdateUIBothSides(wxUpdateUIEvent& event)
{ {
#if defined(__WIN95__) || defined(__WXUNIVERSAL__) #if defined(__WXMSW__) || defined(__WXUNIVERSAL__)
event.Enable( m_chkTicks->GetValue() ); event.Enable( m_chkTicks->GetValue() );
#else #else
event.Enable( false ); event.Enable( false );
#endif // defined(__WIN95__) || defined(__WXUNIVERSAL__) #endif // defined(__WXMSW__) || defined(__WXUNIVERSAL__)
} }
void SliderWidgetsPage::OnSlider(wxScrollEvent& event) void SliderWidgetsPage::OnSlider(wxScrollEvent& event)

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: generic/statusbr.cpp // Name: src/generic/statusbr.cpp
// Purpose: wxStatusBarGeneric class implementation // Purpose: wxStatusBarGeneric class implementation
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -351,7 +351,7 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const
void wxStatusBarGeneric::InitColours() void wxStatusBarGeneric::InitColours()
{ {
// Shadow colours // Shadow colours
#if defined(__WIN95__) || defined(__WXMAC__) #if defined(__WXMSW__) || defined(__WXMAC__)
wxColour mediumShadowColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)); wxColour mediumShadowColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID); m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID);

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: app.cpp // Name: src/msw/app.cpp
// Purpose: wxApp // Purpose: wxApp
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -292,9 +292,9 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
} }
#endif #endif
#if defined(__WIN95__) && !defined(__WXMICROWIN__) #if !defined(__WXMICROWIN__)
InitCommonControls(); InitCommonControls();
#endif // __WIN95__ #endif // !defined(__WXMICROWIN__)
#if defined(__SMARTPHONE__) || defined(__POCKETPC__) #if defined(__SMARTPHONE__) || defined(__POCKETPC__)
SHInitExtraControls(); SHInitExtraControls();
@ -479,7 +479,7 @@ void wxApp::CleanUp()
delete wxWinHandleHash; delete wxWinHandleHash;
wxWinHandleHash = NULL; wxWinHandleHash = NULL;
#ifdef __WXWINCE__ #ifdef __WXWINCE__
free( wxCanvasClassName ); free( wxCanvasClassName );
free( wxCanvasClassNameNR ); free( wxCanvasClassNameNR );
@ -723,7 +723,7 @@ terminate the program,\r\n\
\"Retry\" to exit the program normally and \"Ignore\" to try to continue."), \"Retry\" to exit the program normally and \"Ignore\" to try to continue."),
_T("Unhandled exception"), _T("Unhandled exception"),
MB_ABORTRETRYIGNORE | MB_ABORTRETRYIGNORE |
MB_ICONERROR| MB_ICONERROR|
MB_TASKMODAL MB_TASKMODAL
) )
) )
@ -773,4 +773,3 @@ bool wxApp::ProcessMessage(WXMSG* pMsg)
} }
#endif // WXWIN_COMPATIBILITY_2_4 #endif // WXWIN_COMPATIBILITY_2_4

View File

@ -331,8 +331,6 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item)
// GRG Feb/2000, support for bmp buttons with Win95/98 standard LNF // GRG Feb/2000, support for bmp buttons with Win95/98 standard LNF
#if defined(__WIN95__)
void wxBitmapButton::DrawFace( WXHDC dc, int left, int top, void wxBitmapButton::DrawFace( WXHDC dc, int left, int top,
int right, int bottom, bool sel ) int right, int bottom, bool sel )
{ {
@ -388,73 +386,6 @@ void wxBitmapButton::DrawFace( WXHDC dc, int left, int top,
DeleteObject(brushFace); DeleteObject(brushFace);
} }
#else
void wxBitmapButton::DrawFace( WXHDC dc, int left, int top,
int right, int bottom, bool sel )
{
HPEN oldp;
HPEN penBorder;
HPEN penLight;
HPEN penShadow;
HBRUSH brushFace;
// create needed pens and brush
penBorder = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWFRAME));
penShadow = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
penLight = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHIGHLIGHT));
brushFace = CreateSolidBrush(COLOR_BTNFACE);
// draw the rectangle
RECT rect;
rect.left = left;
rect.right = right;
rect.top = top;
rect.bottom = bottom;
FillRect((HDC) dc, &rect, brushFace);
// draw the border
oldp = (HPEN) SelectObject( (HDC) dc, penBorder);
MoveToEx((HDC) dc,left+1,top,NULL);LineTo((HDC) dc,right-1,top);
MoveToEx((HDC) dc,left,top+1,NULL);LineTo((HDC) dc,left,bottom-1);
MoveToEx((HDC) dc,left+1,bottom-1,NULL);LineTo((HDC) dc,right-1,bottom-1);
MoveToEx((HDC) dc,right-1,top+1,NULL);LineTo((HDC) dc,right-1,bottom-1);
SelectObject( (HDC) dc, penShadow);
if (sel)
{
MoveToEx((HDC) dc,left+1 ,bottom-2 ,NULL);
LineTo((HDC) dc, left+1 ,top+1);
LineTo((HDC) dc, right-2 ,top+1);
}
else
{
MoveToEx((HDC) dc,left+1 ,bottom-2 ,NULL);
LineTo((HDC) dc, right-2 ,bottom-2);
LineTo((HDC) dc, right-2 ,top);
MoveToEx((HDC) dc,left+2 ,bottom-3 ,NULL);
LineTo((HDC) dc, right-3 ,bottom-3);
LineTo((HDC) dc, right-3 ,top+1);
SelectObject( (HDC) dc, penLight);
MoveToEx((HDC) dc,left+1 ,bottom-2 ,NULL);
LineTo((HDC) dc, left+1 ,top+1);
LineTo((HDC) dc, right-2 ,top+1);
}
// delete allocated resources
SelectObject((HDC) dc,oldp);
DeleteObject(penBorder);
DeleteObject(penLight);
DeleteObject(penShadow);
DeleteObject(brushFace);
}
#endif // defined(__WIN95__)
void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right, void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right,
int bottom, bool WXUNUSED(sel) ) int bottom, bool WXUNUSED(sel) )
{ {
@ -532,4 +463,3 @@ wxSize wxBitmapButton::DoGetBestSize() const
} }
#endif // wxUSE_BMPBUTTON #endif // wxUSE_BMPBUTTON

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: msw/control.cpp // Name: src/msw/control.cpp
// Purpose: wxControl class // Purpose: wxControl class
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -43,9 +43,8 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/msw/uxtheme.h" #include "wx/msw/uxtheme.h"
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) // include <commctrl.h> "properly"
#include <commctrl.h> #include "wx/msw/wrapcctl.h"
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxWin macros // wxWin macros
@ -278,7 +277,6 @@ bool wxControl::ProcessCommand(wxCommandEvent& event)
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
} }
#ifdef __WIN95__
bool wxControl::MSWOnNotify(int idCtrl, bool wxControl::MSWOnNotify(int idCtrl,
WXLPARAM lParam, WXLPARAM lParam,
WXLPARAM* result) WXLPARAM* result)
@ -326,7 +324,6 @@ bool wxControl::MSWOnNotify(int idCtrl,
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
} }
#endif // Win95
WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd) WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd)
{ {

View File

@ -180,10 +180,8 @@ bool wxPrinterDC::StartDoc(const wxString& message)
else else
docinfo.lpszOutput = (const wxChar *) filename; docinfo.lpszOutput = (const wxChar *) filename;
#if defined(__WIN95__)
docinfo.lpszDatatype = NULL; docinfo.lpszDatatype = NULL;
docinfo.fwType = 0; docinfo.fwType = 0;
#endif
if (!m_hDC) if (!m_hDC)
return false; return false;

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dirdlg.cpp // Name: src/msw/dirdlg.cpp
// Purpose: wxDirDialog // Purpose: wxDirDialog
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -26,7 +26,7 @@
#if wxUSE_DIRDLG && (!defined(__WXWINCE__) || defined(__HANDHELDPC__)) #if wxUSE_DIRDLG && (!defined(__WXWINCE__) || defined(__HANDHELDPC__))
#if defined(__WIN95__) && !defined(__GNUWIN32_OLD__) && wxUSE_OLE #if !defined(__GNUWIN32_OLD__) && wxUSE_OLE
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/utils.h" #include "wx/utils.h"

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dragimag.cpp // Name: src/msw/dragimag.cpp
// Purpose: wxDragImage // Purpose: wxDragImage
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -26,8 +26,6 @@
#if wxUSE_DRAGIMAGE #if wxUSE_DRAGIMAGE
#if defined(__WIN95__)
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/setup.h" #include "wx/setup.h"
@ -51,9 +49,8 @@
#include "wx/msw/wince/missing.h" #include "wx/msw/wince/missing.h"
#endif // __WXWINCE__ #endif // __WXWINCE__
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) // include <commctrl.h> "properly"
#include <commctrl.h> #include "wx/msw/wrapcctl.h"
#endif
// Wine doesn't have this yet // Wine doesn't have this yet
#ifndef ListView_CreateDragImage #ifndef ListView_CreateDragImage
@ -453,7 +450,4 @@ bool wxDragImage::Hide()
return ret; return ret;
} }
#endif
// __WIN95__
#endif // wxUSE_DRAGIMAGE #endif // wxUSE_DRAGIMAGE

View File

@ -683,10 +683,8 @@ void wxFrame::IconizeChildFrames(bool bIconize)
// them appear in the taskbar because they are, by virtue of this // them appear in the taskbar because they are, by virtue of this
// style, not managed by the taskbar - instead leave Windows take care // style, not managed by the taskbar - instead leave Windows take care
// of them // of them
#ifdef __WIN95__
if ( win->GetWindowStyle() & wxFRAME_TOOL_WINDOW ) if ( win->GetWindowStyle() & wxFRAME_TOOL_WINDOW )
continue; continue;
#endif // Win95
// the child MDI frames are a special case and should not be touched by // the child MDI frames are a special case and should not be touched by
// the parent frame - instead, they are managed by the user // the parent frame - instead, they are managed by the user

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: helpbest.cpp // Name: src/msw/helpbest.cpp
// Purpose: Tries to load MS HTML Help, falls back to wxHTML upon failure // Purpose: Tries to load MS HTML Help, falls back to wxHTML upon failure
// Author: Mattia Barbon // Author: Mattia Barbon
// Modified by: // Modified by:
@ -23,7 +23,7 @@
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/log.h" #include "wx/log.h"
#if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) \ #if wxUSE_HELP && wxUSE_MS_HTML_HELP \
&& wxUSE_WXHTML_HELP && !defined(__WXUNIVERSAL__) && wxUSE_WXHTML_HELP && !defined(__WXUNIVERSAL__)
#include "wx/msw/helpchm.h" #include "wx/msw/helpchm.h"
@ -100,4 +100,4 @@ wxString wxBestHelpController::GetValidFilename( const wxString& filename ) cons
} }
#endif #endif
// wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) && wxUSE_WXHTML_HELP // wxUSE_HELP && wxUSE_MS_HTML_HELP && wxUSE_WXHTML_HELP

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: helpchm.cpp // Name: src/msw/helpchm.cpp
// Purpose: Help system: MS HTML Help implementation // Purpose: Help system: MS HTML Help implementation
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -16,7 +16,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) #if wxUSE_HELP && wxUSE_MS_HTML_HELP
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/msw/helpchm.h" #include "wx/msw/helpchm.h"
@ -75,7 +75,7 @@ static bool LoadHtmlHelpLibrary()
static void UnloadHtmlHelpLibrary() static void UnloadHtmlHelpLibrary()
{ {
if ( gs_htmlHelp ) if ( gs_htmlHelp )
{ {
if (wxPluginManager::UnloadLibrary( _T("HHCTRL.OCX") )) if (wxPluginManager::UnloadLibrary( _T("HHCTRL.OCX") ))
gs_htmlHelp = 0; gs_htmlHelp = 0;
} }
@ -245,4 +245,3 @@ wxCHMHelpController::~wxCHMHelpController()
} }
#endif // wxUSE_HELP #endif // wxUSE_HELP

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: helpwin.cpp // Name: src/msw/helpwin.cpp
// Purpose: Help system: WinHelp implementation // Purpose: Help system: WinHelp implementation
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -64,11 +64,7 @@ bool wxWinHelpController::DisplayContents(void)
wxString str = GetValidFilename(m_helpFile); wxString str = GetValidFilename(m_helpFile);
#if defined(__WIN95__)
return (WinHelp(GetSuitableHWND(this), (const wxChar*) str, HELP_FINDER, 0L) != 0); return (WinHelp(GetSuitableHWND(this), (const wxChar*) str, HELP_FINDER, 0L) != 0);
#else
return (WinHelp(GetSuitableHWND(this), (const wxChar*) str, HELP_CONTENTS, 0L) != 0);
#endif
} }
bool wxWinHelpController::DisplaySection(int section) bool wxWinHelpController::DisplaySection(int section)

View File

@ -24,8 +24,6 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if defined(__WIN95__)
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/window.h" #include "wx/window.h"
#include "wx/icon.h" #include "wx/icon.h"
@ -43,9 +41,8 @@
#include "wx/msw/imaglist.h" #include "wx/msw/imaglist.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) // include <commctrl.h> "properly"
#include <commctrl.h> #include "wx/msw/wrapcctl.h"
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxWin macros // wxWin macros
@ -323,7 +320,7 @@ wxBitmap wxImageList::GetBitmap(int index) const
image = bitmap.ConvertToImage(); image = bitmap.ConvertToImage();
image.SetMaskColour(r, g, b); image.SetMaskColour(r, g, b);
bitmap = wxBitmap(image); bitmap = wxBitmap(image);
return bitmap; return bitmap;
} }
@ -335,14 +332,14 @@ wxIcon wxImageList::GetIcon(int index) const
{ {
wxIcon icon; wxIcon icon;
icon.SetHICON((WXHICON)hIcon); icon.SetHICON((WXHICON)hIcon);
int iconW, iconH; int iconW, iconH;
GetSize(index, iconW, iconH); GetSize(index, iconW, iconH);
icon.SetSize(iconW, iconH); icon.SetSize(iconW, iconH);
return icon; return icon;
} }
else else
return wxNullIcon; return wxNullIcon;
} }
@ -391,6 +388,3 @@ static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask)
return hbmpMaskInv; return hbmpMaskInv;
} }
#endif // Win95

View File

@ -24,7 +24,7 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_LISTCTRL && defined(__WIN95__) #if wxUSE_LISTCTRL
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/app.h" #include "wx/app.h"

View File

@ -1092,7 +1092,7 @@ bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate),
bool wxMDIChildFrame::HandleWindowPosChanging(void *pos) bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
{ {
WINDOWPOS *lpPos = (WINDOWPOS *)pos; WINDOWPOS *lpPos = (WINDOWPOS *)pos;
#if defined(__WIN95__)
if (!(lpPos->flags & SWP_NOSIZE)) if (!(lpPos->flags & SWP_NOSIZE))
{ {
RECT rectClient; RECT rectClient;
@ -1114,7 +1114,6 @@ bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
} }
#endif #endif
} }
#endif // Win95
return false; return false;
} }
@ -1132,14 +1131,14 @@ bool wxMDIChildFrame::HandleGetMinMaxInfo(void *mmInfo)
minHeight = GetMinHeight(); minHeight = GetMinHeight();
// but allow GetSizeHints() to set the min size // but allow GetSizeHints() to set the min size
if ( minWidth != -1 ) if ( minWidth != wxDefaultCoord )
{ {
info->ptMinTrackSize.x = minWidth; info->ptMinTrackSize.x = minWidth;
processed = true; processed = true;
} }
if ( minHeight != -1 ) if ( minHeight != wxDefaultCoord )
{ {
info->ptMinTrackSize.y = minHeight; info->ptMinTrackSize.y = minHeight;
@ -1200,10 +1199,10 @@ void wxMDIChildFrame::MSWDestroyWindow()
// style when a child is maximised (a double border looks silly.) // style when a child is maximised (a double border looks silly.)
bool wxMDIChildFrame::ResetWindowStyle(void *vrect) bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
{ {
#if defined(__WIN95__)
RECT *rect = (RECT *)vrect; RECT *rect = (RECT *)vrect;
wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent(); wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent();
wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild(); wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild();
if (!pChild || (pChild == this)) if (!pChild || (pChild == this))
{ {
HWND hwndClient = GetWinHwnd(pFrameWnd->GetClientWindow()); HWND hwndClient = GetWinHwnd(pFrameWnd->GetClientWindow());
@ -1235,7 +1234,6 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
return true; return true;
} }
} }
#endif // Win95
return false; return false;
} }
@ -1264,11 +1262,7 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
if ( style & wxVSCROLL ) if ( style & wxVSCROLL )
msStyle |= WS_VSCROLL; msStyle |= WS_VSCROLL;
#if defined(__WIN95__)
DWORD exStyle = WS_EX_CLIENTEDGE; DWORD exStyle = WS_EX_CLIENTEDGE;
#else
DWORD exStyle = 0;
#endif
wxWindowCreationHook hook(this); wxWindowCreationHook hook(this);
m_hWnd = (WXHWND)::CreateWindowEx m_hWnd = (WXHWND)::CreateWindowEx
@ -1486,4 +1480,3 @@ static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam,
} }
#endif // wxUSE_MDI && !defined(__WXUNIVERSAL__) #endif // wxUSE_MDI && !defined(__WXUNIVERSAL__)

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: nativdlg.cpp // Name: src/msw/nativdlg.cpp
// Purpose: Native dialog loading code (part of wxWindow) // Purpose: Native dialog loading code (part of wxWindow)
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -30,9 +30,7 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#if defined(__WIN95__)
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#endif
#include "wx/msw/private.h" #include "wx/msw/private.h"
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@ -267,7 +265,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
win = new wxScrollBar; win = new wxScrollBar;
} }
#endif #endif
#if defined(__WIN95__) && wxUSE_SPINBTN #if wxUSE_SPINBTN
else if (str == wxT("MSCTLS_UPDOWN32")) else if (str == wxT("MSCTLS_UPDOWN32"))
{ {
win = new wxSpinButton; win = new wxSpinButton;
@ -336,4 +334,3 @@ void wxWindow::AdoptAttributesFromHWND(void)
if (style & WS_HSCROLL) if (style & WS_HSCROLL)
m_windowStyle |= wxHSCROLL; m_windowStyle |= wxHSCROLL;
} }

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: msw/scrolbar.cpp // Name: src/msw/scrolbar.cpp
// Purpose: wxScrollBar // Purpose: wxScrollBar
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -146,13 +146,11 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
} }
#endif #endif
#if defined(__WIN95__)
// A page size greater than one has the effect of reducing the effective // A page size greater than one has the effect of reducing the effective
// range, therefore the range has already been boosted artificially - so // range, therefore the range has already been boosted artificially - so
// reduce it again. // reduce it again.
if ( m_pageSize > 1 ) if ( m_pageSize > 1 )
maxPos -= (m_pageSize - 1); maxPos -= (m_pageSize - 1);
#endif // __WIN95__
wxEventType scrollEvent = wxEVT_NULL; wxEventType scrollEvent = wxEVT_NULL;
@ -237,7 +235,6 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
void wxScrollBar::SetThumbPosition(int viewStart) void wxScrollBar::SetThumbPosition(int viewStart)
{ {
#if defined(__WIN95__)
SCROLLINFO info; SCROLLINFO info;
info.cbSize = sizeof(SCROLLINFO); info.cbSize = sizeof(SCROLLINFO);
info.nPage = 0; info.nPage = 0;
@ -246,9 +243,6 @@ void wxScrollBar::SetThumbPosition(int viewStart)
info.fMask = SIF_POS ; info.fMask = SIF_POS ;
::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE); ::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE);
#else
::SetScrollPos((HWND) GetHWND(), SB_CTL, viewStart, TRUE);
#endif
} }
int wxScrollBar::GetThumbPosition(void) const int wxScrollBar::GetThumbPosition(void) const
@ -269,36 +263,31 @@ int wxScrollBar::GetThumbPosition(void) const
void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize, void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize,
bool refresh) bool refresh)
{ {
m_viewSize = pageSize; m_viewSize = pageSize;
m_pageSize = thumbSize; m_pageSize = thumbSize;
m_objectSize = range; m_objectSize = range;
// The range (number of scroll steps) is the // The range (number of scroll steps) is the
// object length minus the page size. // object length minus the page size.
int range1 = wxMax((m_objectSize - m_pageSize), 0) ; int range1 = wxMax((m_objectSize - m_pageSize), 0) ;
#if defined(__WIN95__) // Try to adjust the range to cope with page size > 1
// Try to adjust the range to cope with page size > 1 // (see comment for SetPageLength)
// (see comment for SetPageLength) if ( m_pageSize > 1 )
if ( m_pageSize > 1 ) {
{ range1 += (m_pageSize - 1);
range1 += (m_pageSize - 1); }
}
SCROLLINFO info; SCROLLINFO info;
info.cbSize = sizeof(SCROLLINFO); info.cbSize = sizeof(SCROLLINFO);
info.nPage = m_pageSize; info.nPage = m_pageSize;
info.nMin = 0; info.nMin = 0;
info.nMax = range1; info.nMax = range1;
info.nPos = position; info.nPos = position;
info.fMask = SIF_PAGE | SIF_RANGE | SIF_POS; info.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;
::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, refresh); ::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, refresh);
#else
::SetScrollPos((HWND)m_hWnd, SB_CTL, position, refresh);
::SetScrollRange((HWND)m_hWnd, SB_CTL, 0, range1, refresh);
#endif
} }
void wxScrollBar::Command(wxCommandEvent& event) void wxScrollBar::Command(wxCommandEvent& event)

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: msw/statbr95.cpp // Name: src/msw/statbr95.cpp
// Purpose: native implementation of wxStatusBar // Purpose: native implementation of wxStatusBar
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
@ -23,7 +23,7 @@
#include "wx/dcclient.h" #include "wx/dcclient.h"
#endif #endif
#if wxUSE_STATUSBAR && defined(__WIN95__) && wxUSE_NATIVE_STATUSBAR #if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
@ -32,9 +32,8 @@
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include <windowsx.h> #include <windowsx.h>
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__)) // include <commctrl.h> "properly"
#include <commctrl.h> #include "wx/msw/wrapcctl.h"
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// macros // macros
@ -386,5 +385,4 @@ wxStatusBar95::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
return wxStatusBarBase::MSWWindowProc(nMsg, wParam, lParam); return wxStatusBarBase::MSWWindowProc(nMsg, wParam, lParam);
} }
#endif // __WIN95__ && wxUSE_NATIVE_STATUSBAR #endif // wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR

View File

@ -20,11 +20,10 @@
#include "wx/wx.h" #include "wx/wx.h"
#endif #endif
#if defined(__WIN95__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include <commctrl.h> // include <commctrl.h> "properly"
#include "wx/msw/wrapcctl.h"
#include "wx/tabctrl.h" #include "wx/tabctrl.h"
#include "wx/app.h" #include "wx/app.h"
@ -429,5 +428,3 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height)
} }
#endif #endif
#endif // __WIN95__

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////
// File: taskbar.cpp // File: src/msw/taskbar.cpp
// Purpose: Implements wxTaskBarIcon class for manipulating icons on // Purpose: Implements wxTaskBarIcon class for manipulating icons on
// the Windows task bar. // the Windows task bar.
// Author: Julian Smart // Author: Julian Smart
@ -25,8 +25,6 @@
#include "wx/menu.h" #include "wx/menu.h"
#endif #endif
#if defined(__WIN95__)
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/msw/winundef.h" #include "wx/msw/winundef.h"
@ -325,5 +323,3 @@ long wxTaskBarIcon::WindowProc(unsigned int msg,
return 0; return 0;
} }
#endif // __WIN95__

View File

@ -884,7 +884,7 @@ void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
{ {
wxTopLevelWindowBase::SetIcons(icons); wxTopLevelWindowBase::SetIcons(icons);
#if defined(__WIN95__) && !defined(__WXMICROWIN__) #if !defined(__WXMICROWIN__)
const wxIcon& sml = icons.GetIcon( wxSize( 16, 16 ) ); const wxIcon& sml = icons.GetIcon( wxSize( 16, 16 ) );
if( sml.Ok() && sml.GetWidth() == 16 && sml.GetHeight() == 16 ) if( sml.Ok() && sml.GetWidth() == 16 && sml.GetHeight() == 16 )
{ {
@ -898,7 +898,7 @@ void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_BIG, ::SendMessage( GetHwndOf( this ), WM_SETICON, ICON_BIG,
(LPARAM)GetHiconOf(big) ); (LPARAM)GetHiconOf(big) );
} }
#endif // __WIN95__ #endif // !__WXMICROWIN__
} }
bool wxTopLevelWindowMSW::EnableCloseButton(bool enable) bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: msw/wince/tbarwce.cpp // Name: src/msw/wince/tbarwce.cpp
// Purpose: wxToolBar for Windows CE // Purpose: wxToolBar for Windows CE
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by:
@ -120,7 +120,7 @@ public:
// a control in the toolbar // a control in the toolbar
void SetSeparatorsCount(size_t count) { m_nSepCount = count; } void SetSeparatorsCount(size_t count) { m_nSepCount = count; }
size_t GetSeparatorsCount() const { return m_nSepCount; } size_t GetSeparatorsCount() const { return m_nSepCount; }
void SetBitmapIndex(int idx) { m_bitmapIndex = idx; } void SetBitmapIndex(int idx) { m_bitmapIndex = idx; }
int GetBitmapIndex() const { return m_bitmapIndex; } int GetBitmapIndex() const { return m_bitmapIndex; }
@ -163,8 +163,8 @@ wxToolBarToolBase *wxToolMenuBar::CreateTool(wxControl *control)
void wxToolMenuBar::Init() void wxToolMenuBar::Init()
{ {
wxToolBar::Init(); wxToolBar::Init();
m_nButtons = 0; m_nButtons = 0;
m_menuBar = NULL; m_menuBar = NULL;
} }
@ -397,7 +397,7 @@ bool wxToolMenuBar::Realize()
break; break;
case wxTOOL_STYLE_BUTTON: case wxTOOL_STYLE_BUTTON:
if ( HasFlag(wxTB_TEXT) ) if ( HasFlag(wxTB_TEXT) )
{ {
const wxString& label = tool->GetLabel(); const wxString& label = tool->GetLabel();
@ -589,10 +589,10 @@ bool wxToolBar::Create(wxWindow *parent,
// satisfy other parts of wxWidgets. // satisfy other parts of wxWidgets.
parent->AddChild(this); parent->AddChild(this);
SetWindowStyle(style); SetWindowStyle(style);
SetName(name); SetName(name);
return true; return true;
} }
@ -637,7 +637,4 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(tog
#endif #endif
// !__SMARTPHONE__ // !__SMARTPHONE__
#endif // wxUSE_TOOLBAR
#endif // wxUSE_TOOLBAR && Win95

View File

@ -849,7 +849,7 @@ inline int GetScrollPosition(HWND hWnd, int wOrient)
scrollInfo.cbSize = sizeof(SCROLLINFO); scrollInfo.cbSize = sizeof(SCROLLINFO);
scrollInfo.fMask = SIF_POS; scrollInfo.fMask = SIF_POS;
::GetScrollInfo(hWnd, wOrient, &scrollInfo ); ::GetScrollInfo(hWnd, wOrient, &scrollInfo );
return scrollInfo.nPos; return scrollInfo.nPos;
#endif #endif
@ -3197,8 +3197,6 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
// WM_NOTIFY // WM_NOTIFY
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
#ifdef __WIN95__
bool wxWindowMSW::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) bool wxWindowMSW::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
{ {
#ifndef __WXMICROWIN__ #ifndef __WXMICROWIN__
@ -3342,8 +3340,6 @@ bool wxWindowMSW::MSWOnNotify(int WXUNUSED(idCtrl),
return false; return false;
} }
#endif // __WIN95__
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// end session messages // end session messages
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------