__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:
parent
634fb75048
commit
a71d815bbe
@ -46,6 +46,7 @@ wxMSW:
|
||||
- Switching page of a hidden notebook doesn't lose focus (Jamie Gadd).
|
||||
- Removed wxImageList *GetImageList(int) const.
|
||||
- Fixed MDI context menu problem.
|
||||
- Removed __WIN95__ define
|
||||
|
||||
wxGTK:
|
||||
|
||||
|
@ -23,7 +23,6 @@ always tested using \texttt{#ifdef} and not \texttt{#if}.
|
||||
\twocolitem{\_\_WINDOWS\_\_}{any Windows, yom may also use \_\_WXMSW\_\_}
|
||||
\twocolitem{\_\_WIN16\_\_}{Win16 API (not supported since wxWidgets 2.6)}
|
||||
\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{\_\_WXCOCOA\_\_}{OS X using Cocoa API}
|
||||
\twocolitem{\_\_WXWINCE\_\_}{Windows CE}
|
||||
|
@ -63,13 +63,13 @@ The <B>Preprocessor definitions</B> field should contain the following symbols f
|
||||
|
||||
<PRE>
|
||||
WIN32,_DEBUG,_WINDOWS,__WINDOWS__,__WXMSW__,__WXDEBUG__,WXDEBUG=1,
|
||||
__WIN95__,__WIN32__,WINVER=0x0400,STRICT
|
||||
__WIN32__,WINVER=0x0400,STRICT
|
||||
</PRE>
|
||||
<P>
|
||||
and these for Release:<P>
|
||||
|
||||
<PRE>
|
||||
NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN95__,__WIN32__,
|
||||
NDEBUG,WIN32,_WINDOWS,__WINDOWS__,__WXMSW__,__WIN32__,
|
||||
WINVER=0x0400,STRICT</PRE>
|
||||
<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>
|
||||
The <B>Preprocessor definitions</B> field should contain the following symbols:<P>
|
||||
<PRE>
|
||||
WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=1,WIN95=1,WINVER=0x0400,STRICT
|
||||
WIN32,_DEBUG,_WINDOWS,wx_msw,DEBUG=1,WINVER=0x0400,STRICT
|
||||
</PRE>
|
||||
<P>
|
||||
The <B>Additional include directories</B> field should contain the following:<P>
|
||||
|
@ -19,9 +19,7 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#if !defined( __WXMSW__ ) || defined( __WIN95__ )
|
||||
#include "wx/spinbutt.h"
|
||||
#endif
|
||||
#include "wx/tglbtn.h"
|
||||
#include "wx/bookctrl.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("to use static controls with line wrapping."),
|
||||
wxDefaultPosition,
|
||||
wxSize(240, -1)
|
||||
wxSize(240, wxDefaultCoord)
|
||||
);
|
||||
#endif
|
||||
wrapping_sizer->Add( m_wrappingText );
|
||||
@ -915,7 +913,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
#endif // wxUSE_SPINBTN
|
||||
|
||||
#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->SetValue(15);
|
||||
#endif // wxUSE_SPINCTRL
|
||||
|
@ -9,10 +9,6 @@
|
||||
#define __WIN32__
|
||||
#endif
|
||||
|
||||
#ifndef __WIN95__
|
||||
#define __WIN95__
|
||||
#endif
|
||||
|
||||
//#ifdef _MSC_VER
|
||||
#define __VISUALC__ _MSC_VER
|
||||
//#endif
|
||||
@ -54,16 +50,16 @@ BEGIN
|
||||
GROUPBOX "wxStaticBox",IDC_STATIC,7,7,198,158
|
||||
EDITTEXT IDC_EDIT1,64,23,125,14,ES_AUTOHSCROLL
|
||||
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
|
||||
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
|
||||
CONTROL "wxRadioButton",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,
|
||||
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
|
||||
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
|
||||
CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_ARROWKEYS,111,90,
|
||||
10,14
|
||||
@ -71,4 +67,3 @@ END
|
||||
|
||||
#endif // English (U.K.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -562,11 +562,11 @@ void SliderWidgetsPage::OnUpdateUIRadioSides(wxUpdateUIEvent& event)
|
||||
|
||||
void SliderWidgetsPage::OnUpdateUIBothSides(wxUpdateUIEvent& event)
|
||||
{
|
||||
#if defined(__WIN95__) || defined(__WXUNIVERSAL__)
|
||||
#if defined(__WXMSW__) || defined(__WXUNIVERSAL__)
|
||||
event.Enable( m_chkTicks->GetValue() );
|
||||
#else
|
||||
event.Enable( false );
|
||||
#endif // defined(__WIN95__) || defined(__WXUNIVERSAL__)
|
||||
#endif // defined(__WXMSW__) || defined(__WXUNIVERSAL__)
|
||||
}
|
||||
|
||||
void SliderWidgetsPage::OnSlider(wxScrollEvent& event)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: generic/statusbr.cpp
|
||||
// Name: src/generic/statusbr.cpp
|
||||
// Purpose: wxStatusBarGeneric class implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -351,7 +351,7 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const
|
||||
void wxStatusBarGeneric::InitColours()
|
||||
{
|
||||
// Shadow colours
|
||||
#if defined(__WIN95__) || defined(__WXMAC__)
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||
wxColour mediumShadowColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW));
|
||||
m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: app.cpp
|
||||
// Name: src/msw/app.cpp
|
||||
// Purpose: wxApp
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -292,9 +292,9 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__) && !defined(__WXMICROWIN__)
|
||||
#if !defined(__WXMICROWIN__)
|
||||
InitCommonControls();
|
||||
#endif // __WIN95__
|
||||
#endif // !defined(__WXMICROWIN__)
|
||||
|
||||
#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
|
||||
SHInitExtraControls();
|
||||
@ -479,7 +479,7 @@ void wxApp::CleanUp()
|
||||
|
||||
delete wxWinHandleHash;
|
||||
wxWinHandleHash = NULL;
|
||||
|
||||
|
||||
#ifdef __WXWINCE__
|
||||
free( wxCanvasClassName );
|
||||
free( wxCanvasClassNameNR );
|
||||
@ -723,7 +723,7 @@ terminate the program,\r\n\
|
||||
\"Retry\" to exit the program normally and \"Ignore\" to try to continue."),
|
||||
_T("Unhandled exception"),
|
||||
MB_ABORTRETRYIGNORE |
|
||||
MB_ICONERROR|
|
||||
MB_ICONERROR|
|
||||
MB_TASKMODAL
|
||||
)
|
||||
)
|
||||
@ -773,4 +773,3 @@ bool wxApp::ProcessMessage(WXMSG* pMsg)
|
||||
}
|
||||
|
||||
#endif // WXWIN_COMPATIBILITY_2_4
|
||||
|
||||
|
@ -331,8 +331,6 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
||||
|
||||
// GRG Feb/2000, support for bmp buttons with Win95/98 standard LNF
|
||||
|
||||
#if defined(__WIN95__)
|
||||
|
||||
void wxBitmapButton::DrawFace( WXHDC dc, int left, int top,
|
||||
int right, int bottom, bool sel )
|
||||
{
|
||||
@ -388,73 +386,6 @@ void wxBitmapButton::DrawFace( WXHDC dc, int left, int top,
|
||||
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,
|
||||
int bottom, bool WXUNUSED(sel) )
|
||||
{
|
||||
@ -532,4 +463,3 @@ wxSize wxBitmapButton::DoGetBestSize() const
|
||||
}
|
||||
|
||||
#endif // wxUSE_BMPBUTTON
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/control.cpp
|
||||
// Name: src/msw/control.cpp
|
||||
// Purpose: wxControl class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -43,9 +43,8 @@
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/uxtheme.h"
|
||||
|
||||
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWin macros
|
||||
@ -278,7 +277,6 @@ bool wxControl::ProcessCommand(wxCommandEvent& event)
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
#ifdef __WIN95__
|
||||
bool wxControl::MSWOnNotify(int idCtrl,
|
||||
WXLPARAM lParam,
|
||||
WXLPARAM* result)
|
||||
@ -326,7 +324,6 @@ bool wxControl::MSWOnNotify(int idCtrl,
|
||||
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
#endif // Win95
|
||||
|
||||
WXHBRUSH wxControl::DoMSWControlColor(WXHDC pDC, wxColour colBg, WXHWND hWnd)
|
||||
{
|
||||
|
@ -180,10 +180,8 @@ bool wxPrinterDC::StartDoc(const wxString& message)
|
||||
else
|
||||
docinfo.lpszOutput = (const wxChar *) filename;
|
||||
|
||||
#if defined(__WIN95__)
|
||||
docinfo.lpszDatatype = NULL;
|
||||
docinfo.fwType = 0;
|
||||
#endif
|
||||
|
||||
if (!m_hDC)
|
||||
return false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dirdlg.cpp
|
||||
// Name: src/msw/dirdlg.cpp
|
||||
// Purpose: wxDirDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
#if wxUSE_DIRDLG && (!defined(__WXWINCE__) || defined(__HANDHELDPC__))
|
||||
|
||||
#if defined(__WIN95__) && !defined(__GNUWIN32_OLD__) && wxUSE_OLE
|
||||
#if !defined(__GNUWIN32_OLD__) && wxUSE_OLE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/utils.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dragimag.cpp
|
||||
// Name: src/msw/dragimag.cpp
|
||||
// Purpose: wxDragImage
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -26,8 +26,6 @@
|
||||
|
||||
#if wxUSE_DRAGIMAGE
|
||||
|
||||
#if defined(__WIN95__)
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/setup.h"
|
||||
@ -51,9 +49,8 @@
|
||||
#include "wx/msw/wince/missing.h"
|
||||
#endif // __WXWINCE__
|
||||
|
||||
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
// Wine doesn't have this yet
|
||||
#ifndef ListView_CreateDragImage
|
||||
@ -453,7 +450,4 @@ bool wxDragImage::Hide()
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
// __WIN95__
|
||||
|
||||
#endif // wxUSE_DRAGIMAGE
|
||||
|
@ -683,10 +683,8 @@ void wxFrame::IconizeChildFrames(bool bIconize)
|
||||
// them appear in the taskbar because they are, by virtue of this
|
||||
// style, not managed by the taskbar - instead leave Windows take care
|
||||
// of them
|
||||
#ifdef __WIN95__
|
||||
if ( win->GetWindowStyle() & wxFRAME_TOOL_WINDOW )
|
||||
continue;
|
||||
#endif // Win95
|
||||
|
||||
// the child MDI frames are a special case and should not be touched by
|
||||
// the parent frame - instead, they are managed by the user
|
||||
|
@ -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
|
||||
// Author: Mattia Barbon
|
||||
// Modified by:
|
||||
@ -23,7 +23,7 @@
|
||||
#include "wx/filefn.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__)
|
||||
|
||||
#include "wx/msw/helpchm.h"
|
||||
@ -100,4 +100,4 @@ wxString wxBestHelpController::GetValidFilename( const wxString& filename ) cons
|
||||
}
|
||||
|
||||
#endif
|
||||
// wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) && wxUSE_WXHTML_HELP
|
||||
// wxUSE_HELP && wxUSE_MS_HTML_HELP && wxUSE_WXHTML_HELP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpchm.cpp
|
||||
// Name: src/msw/helpchm.cpp
|
||||
// Purpose: Help system: MS HTML Help implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -16,7 +16,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__)
|
||||
#if wxUSE_HELP && wxUSE_MS_HTML_HELP
|
||||
|
||||
#include "wx/filefn.h"
|
||||
#include "wx/msw/helpchm.h"
|
||||
@ -75,7 +75,7 @@ static bool LoadHtmlHelpLibrary()
|
||||
static void UnloadHtmlHelpLibrary()
|
||||
{
|
||||
if ( gs_htmlHelp )
|
||||
{
|
||||
{
|
||||
if (wxPluginManager::UnloadLibrary( _T("HHCTRL.OCX") ))
|
||||
gs_htmlHelp = 0;
|
||||
}
|
||||
@ -245,4 +245,3 @@ wxCHMHelpController::~wxCHMHelpController()
|
||||
}
|
||||
|
||||
#endif // wxUSE_HELP
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpwin.cpp
|
||||
// Name: src/msw/helpwin.cpp
|
||||
// Purpose: Help system: WinHelp implementation
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -64,11 +64,7 @@ bool wxWinHelpController::DisplayContents(void)
|
||||
|
||||
wxString str = GetValidFilename(m_helpFile);
|
||||
|
||||
#if defined(__WIN95__)
|
||||
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)
|
||||
|
@ -24,8 +24,6 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__)
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/window.h"
|
||||
#include "wx/icon.h"
|
||||
@ -43,9 +41,8 @@
|
||||
#include "wx/msw/imaglist.h"
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxWin macros
|
||||
@ -323,7 +320,7 @@ wxBitmap wxImageList::GetBitmap(int index) const
|
||||
image = bitmap.ConvertToImage();
|
||||
image.SetMaskColour(r, g, b);
|
||||
bitmap = wxBitmap(image);
|
||||
|
||||
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
@ -335,14 +332,14 @@ wxIcon wxImageList::GetIcon(int index) const
|
||||
{
|
||||
wxIcon icon;
|
||||
icon.SetHICON((WXHICON)hIcon);
|
||||
|
||||
|
||||
int iconW, iconH;
|
||||
GetSize(index, iconW, iconH);
|
||||
icon.SetSize(iconW, iconH);
|
||||
|
||||
|
||||
return icon;
|
||||
}
|
||||
else
|
||||
else
|
||||
return wxNullIcon;
|
||||
}
|
||||
|
||||
@ -391,6 +388,3 @@ static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask)
|
||||
|
||||
return hbmpMaskInv;
|
||||
}
|
||||
|
||||
#endif // Win95
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if wxUSE_LISTCTRL && defined(__WIN95__)
|
||||
#if wxUSE_LISTCTRL
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/app.h"
|
||||
|
@ -1092,7 +1092,7 @@ bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate),
|
||||
bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
|
||||
{
|
||||
WINDOWPOS *lpPos = (WINDOWPOS *)pos;
|
||||
#if defined(__WIN95__)
|
||||
|
||||
if (!(lpPos->flags & SWP_NOSIZE))
|
||||
{
|
||||
RECT rectClient;
|
||||
@ -1114,7 +1114,6 @@ bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif // Win95
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1132,14 +1131,14 @@ bool wxMDIChildFrame::HandleGetMinMaxInfo(void *mmInfo)
|
||||
minHeight = GetMinHeight();
|
||||
|
||||
// but allow GetSizeHints() to set the min size
|
||||
if ( minWidth != -1 )
|
||||
if ( minWidth != wxDefaultCoord )
|
||||
{
|
||||
info->ptMinTrackSize.x = minWidth;
|
||||
|
||||
processed = true;
|
||||
}
|
||||
|
||||
if ( minHeight != -1 )
|
||||
if ( minHeight != wxDefaultCoord )
|
||||
{
|
||||
info->ptMinTrackSize.y = minHeight;
|
||||
|
||||
@ -1200,10 +1199,10 @@ void wxMDIChildFrame::MSWDestroyWindow()
|
||||
// style when a child is maximised (a double border looks silly.)
|
||||
bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
|
||||
{
|
||||
#if defined(__WIN95__)
|
||||
RECT *rect = (RECT *)vrect;
|
||||
wxMDIParentFrame* pFrameWnd = (wxMDIParentFrame *)GetParent();
|
||||
wxMDIChildFrame* pChild = pFrameWnd->GetActiveChild();
|
||||
|
||||
if (!pChild || (pChild == this))
|
||||
{
|
||||
HWND hwndClient = GetWinHwnd(pFrameWnd->GetClientWindow());
|
||||
@ -1235,7 +1234,6 @@ bool wxMDIChildFrame::ResetWindowStyle(void *vrect)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif // Win95
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1264,11 +1262,7 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
|
||||
if ( style & wxVSCROLL )
|
||||
msStyle |= WS_VSCROLL;
|
||||
|
||||
#if defined(__WIN95__)
|
||||
DWORD exStyle = WS_EX_CLIENTEDGE;
|
||||
#else
|
||||
DWORD exStyle = 0;
|
||||
#endif
|
||||
|
||||
wxWindowCreationHook hook(this);
|
||||
m_hWnd = (WXHWND)::CreateWindowEx
|
||||
@ -1486,4 +1480,3 @@ static void UnpackMDIActivate(WXWPARAM wParam, WXLPARAM lParam,
|
||||
}
|
||||
|
||||
#endif // wxUSE_MDI && !defined(__WXUNIVERSAL__)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: nativdlg.cpp
|
||||
// Name: src/msw/nativdlg.cpp
|
||||
// Purpose: Native dialog loading code (part of wxWindow)
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -30,9 +30,7 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__)
|
||||
#include "wx/spinbutt.h"
|
||||
#endif
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
@ -267,7 +265,7 @@ wxWindow* wxWindow::CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd)
|
||||
win = new wxScrollBar;
|
||||
}
|
||||
#endif
|
||||
#if defined(__WIN95__) && wxUSE_SPINBTN
|
||||
#if wxUSE_SPINBTN
|
||||
else if (str == wxT("MSCTLS_UPDOWN32"))
|
||||
{
|
||||
win = new wxSpinButton;
|
||||
@ -336,4 +334,3 @@ void wxWindow::AdoptAttributesFromHWND(void)
|
||||
if (style & WS_HSCROLL)
|
||||
m_windowStyle |= wxHSCROLL;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/scrolbar.cpp
|
||||
// Name: src/msw/scrolbar.cpp
|
||||
// Purpose: wxScrollBar
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -146,13 +146,11 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__)
|
||||
// A page size greater than one has the effect of reducing the effective
|
||||
// range, therefore the range has already been boosted artificially - so
|
||||
// reduce it again.
|
||||
if ( m_pageSize > 1 )
|
||||
maxPos -= (m_pageSize - 1);
|
||||
#endif // __WIN95__
|
||||
|
||||
wxEventType scrollEvent = wxEVT_NULL;
|
||||
|
||||
@ -237,7 +235,6 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
|
||||
void wxScrollBar::SetThumbPosition(int viewStart)
|
||||
{
|
||||
#if defined(__WIN95__)
|
||||
SCROLLINFO info;
|
||||
info.cbSize = sizeof(SCROLLINFO);
|
||||
info.nPage = 0;
|
||||
@ -246,9 +243,6 @@ void wxScrollBar::SetThumbPosition(int viewStart)
|
||||
info.fMask = SIF_POS ;
|
||||
|
||||
::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, TRUE);
|
||||
#else
|
||||
::SetScrollPos((HWND) GetHWND(), SB_CTL, viewStart, TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
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,
|
||||
bool refresh)
|
||||
{
|
||||
m_viewSize = pageSize;
|
||||
m_pageSize = thumbSize;
|
||||
m_objectSize = range;
|
||||
m_viewSize = pageSize;
|
||||
m_pageSize = thumbSize;
|
||||
m_objectSize = range;
|
||||
|
||||
// The range (number of scroll steps) is the
|
||||
// object length minus the page size.
|
||||
int range1 = wxMax((m_objectSize - m_pageSize), 0) ;
|
||||
// The range (number of scroll steps) is the
|
||||
// object length minus the page size.
|
||||
int range1 = wxMax((m_objectSize - m_pageSize), 0) ;
|
||||
|
||||
#if defined(__WIN95__)
|
||||
// Try to adjust the range to cope with page size > 1
|
||||
// (see comment for SetPageLength)
|
||||
if ( m_pageSize > 1 )
|
||||
{
|
||||
range1 += (m_pageSize - 1);
|
||||
}
|
||||
// Try to adjust the range to cope with page size > 1
|
||||
// (see comment for SetPageLength)
|
||||
if ( m_pageSize > 1 )
|
||||
{
|
||||
range1 += (m_pageSize - 1);
|
||||
}
|
||||
|
||||
SCROLLINFO info;
|
||||
info.cbSize = sizeof(SCROLLINFO);
|
||||
info.nPage = m_pageSize;
|
||||
info.nMin = 0;
|
||||
info.nMax = range1;
|
||||
info.nPos = position;
|
||||
SCROLLINFO info;
|
||||
info.cbSize = sizeof(SCROLLINFO);
|
||||
info.nPage = m_pageSize;
|
||||
info.nMin = 0;
|
||||
info.nMax = range1;
|
||||
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);
|
||||
#else
|
||||
::SetScrollPos((HWND)m_hWnd, SB_CTL, position, refresh);
|
||||
::SetScrollRange((HWND)m_hWnd, SB_CTL, 0, range1, refresh);
|
||||
#endif
|
||||
::SetScrollInfo((HWND) GetHWND(), SB_CTL, &info, refresh);
|
||||
}
|
||||
|
||||
void wxScrollBar::Command(wxCommandEvent& event)
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/statbr95.cpp
|
||||
// Name: src/msw/statbr95.cpp
|
||||
// Purpose: native implementation of wxStatusBar
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
@ -23,7 +23,7 @@
|
||||
#include "wx/dcclient.h"
|
||||
#endif
|
||||
|
||||
#if wxUSE_STATUSBAR && defined(__WIN95__) && wxUSE_NATIVE_STATUSBAR
|
||||
#if wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
|
||||
|
||||
#include "wx/intl.h"
|
||||
#include "wx/log.h"
|
||||
@ -32,9 +32,8 @@
|
||||
#include "wx/msw/private.h"
|
||||
#include <windowsx.h>
|
||||
|
||||
#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
|
||||
#include <commctrl.h>
|
||||
#endif
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// macros
|
||||
@ -386,5 +385,4 @@ wxStatusBar95::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
return wxStatusBarBase::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
#endif // __WIN95__ && wxUSE_NATIVE_STATUSBAR
|
||||
|
||||
#endif // wxUSE_STATUSBAR && wxUSE_NATIVE_STATUSBAR
|
||||
|
@ -20,11 +20,10 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__)
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
// include <commctrl.h> "properly"
|
||||
#include "wx/msw/wrapcctl.h"
|
||||
|
||||
#include "wx/tabctrl.h"
|
||||
#include "wx/app.h"
|
||||
@ -429,5 +428,3 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height)
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __WIN95__
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// File: taskbar.cpp
|
||||
// File: src/msw/taskbar.cpp
|
||||
// Purpose: Implements wxTaskBarIcon class for manipulating icons on
|
||||
// the Windows task bar.
|
||||
// Author: Julian Smart
|
||||
@ -25,8 +25,6 @@
|
||||
#include "wx/menu.h"
|
||||
#endif
|
||||
|
||||
#if defined(__WIN95__)
|
||||
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/winundef.h"
|
||||
|
||||
@ -325,5 +323,3 @@ long wxTaskBarIcon::WindowProc(unsigned int msg,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // __WIN95__
|
||||
|
@ -884,7 +884,7 @@ void wxTopLevelWindowMSW::SetIcons(const wxIconBundle& icons)
|
||||
{
|
||||
wxTopLevelWindowBase::SetIcons(icons);
|
||||
|
||||
#if defined(__WIN95__) && !defined(__WXMICROWIN__)
|
||||
#if !defined(__WXMICROWIN__)
|
||||
const wxIcon& sml = icons.GetIcon( wxSize( 16, 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,
|
||||
(LPARAM)GetHiconOf(big) );
|
||||
}
|
||||
#endif // __WIN95__
|
||||
#endif // !__WXMICROWIN__
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowMSW::EnableCloseButton(bool enable)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msw/wince/tbarwce.cpp
|
||||
// Name: src/msw/wince/tbarwce.cpp
|
||||
// Purpose: wxToolBar for Windows CE
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@ -120,7 +120,7 @@ public:
|
||||
// a control in the toolbar
|
||||
void SetSeparatorsCount(size_t count) { m_nSepCount = count; }
|
||||
size_t GetSeparatorsCount() const { return m_nSepCount; }
|
||||
|
||||
|
||||
void SetBitmapIndex(int idx) { m_bitmapIndex = idx; }
|
||||
int GetBitmapIndex() const { return m_bitmapIndex; }
|
||||
|
||||
@ -163,8 +163,8 @@ wxToolBarToolBase *wxToolMenuBar::CreateTool(wxControl *control)
|
||||
void wxToolMenuBar::Init()
|
||||
{
|
||||
wxToolBar::Init();
|
||||
|
||||
m_nButtons = 0;
|
||||
|
||||
m_nButtons = 0;
|
||||
m_menuBar = NULL;
|
||||
}
|
||||
|
||||
@ -397,7 +397,7 @@ bool wxToolMenuBar::Realize()
|
||||
break;
|
||||
|
||||
case wxTOOL_STYLE_BUTTON:
|
||||
|
||||
|
||||
if ( HasFlag(wxTB_TEXT) )
|
||||
{
|
||||
const wxString& label = tool->GetLabel();
|
||||
@ -589,10 +589,10 @@ bool wxToolBar::Create(wxWindow *parent,
|
||||
// satisfy other parts of wxWidgets.
|
||||
|
||||
parent->AddChild(this);
|
||||
|
||||
|
||||
SetWindowStyle(style);
|
||||
SetName(name);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -637,7 +637,4 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(tog
|
||||
#endif
|
||||
// !__SMARTPHONE__
|
||||
|
||||
|
||||
|
||||
#endif // wxUSE_TOOLBAR && Win95
|
||||
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
@ -849,7 +849,7 @@ inline int GetScrollPosition(HWND hWnd, int wOrient)
|
||||
scrollInfo.cbSize = sizeof(SCROLLINFO);
|
||||
scrollInfo.fMask = SIF_POS;
|
||||
::GetScrollInfo(hWnd, wOrient, &scrollInfo );
|
||||
|
||||
|
||||
return scrollInfo.nPos;
|
||||
|
||||
#endif
|
||||
@ -3197,8 +3197,6 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
|
||||
// WM_NOTIFY
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#ifdef __WIN95__
|
||||
|
||||
bool wxWindowMSW::HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
{
|
||||
#ifndef __WXMICROWIN__
|
||||
@ -3342,8 +3340,6 @@ bool wxWindowMSW::MSWOnNotify(int WXUNUSED(idCtrl),
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // __WIN95__
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// end session messages
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user