Multiple fixes for OS/2 including getting rid of the C++ unfriendly direct.h and substituting control program io. Various GUI fixes, too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2000-04-03 04:23:48 +00:00
parent 7d12fcd019
commit 27452ac50e
6 changed files with 11 additions and 64 deletions

View File

@@ -36,8 +36,6 @@
#ifdef __EMX__ #ifdef __EMX__
#include <dirent.h> #include <dirent.h>
#else
#include <direct.h>
#endif #endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -350,21 +350,6 @@ void wxFrame::DoShowWindow(
int bShowCmd int bShowCmd
) )
{ {
HWND hClient = NULLHANDLE;
SWP vSwp;
//
// Reset the window position
//
WinQueryWindowPos(m_hFrame, &vSwp);
WinSetWindowPos( GetHwnd()
,HWND_TOP
,vSwp.x
,vSwp.y
,vSwp.cx
,vSwp.cy
,SWP_SIZE | SWP_MOVE | SWP_ACTIVATE
);
::WinShowWindow(m_hFrame, (BOOL)bShowCmd); ::WinShowWindow(m_hFrame, (BOOL)bShowCmd);
::WinShowWindow(GetHwnd(), (BOOL)bShowCmd); ::WinShowWindow(GetHwnd(), (BOOL)bShowCmd);
} // end of wxFrame::DoShowWindow } // end of wxFrame::DoShowWindow
@@ -602,27 +587,6 @@ void wxFrame::SetMenuBar(
m_frameMenuBar = pMenuBar; m_frameMenuBar = pMenuBar;
pMenuBar->Attach(this); pMenuBar->Attach(this);
//
// Now resize the client to fit the new frame
//
WinQueryWindowPos(m_hFrame, &vSwp);
hTitlebar = WinWindowFromID(m_hFrame, FID_TITLEBAR);
WinQueryWindowPos(hTitlebar, &vSwpTitlebar);
hHScroll = WinWindowFromID(m_hFrame, FID_HORZSCROLL);
WinQueryWindowPos(hHScroll, &vSwpHScroll);
hVScroll = WinWindowFromID(m_hFrame, FID_VERTSCROLL);
WinQueryWindowPos(hVScroll, &vSwpVScroll);
hMenuBar = WinWindowFromID(m_hFrame, FID_MENU);
WinQueryWindowPos(hMenuBar, &vSwpMenu);
WinSetWindowPos( GetHwnd()
,HWND_TOP
,SV_CXSIZEBORDER/2
,(SV_CYSIZEBORDER/2) + vSwpHScroll.cy/2
,vSwp.cx - ((SV_CXSIZEBORDER + 1) + vSwpVScroll.cx)
,vSwp.cy - ((SV_CYSIZEBORDER + 1) + vSwpTitlebar.cy + vSwpMenu.cy + vSwpHScroll.cy/2)
,SWP_SIZE | SWP_MOVE
);
} // end of wxFrame::SetMenuBar } // end of wxFrame::SetMenuBar
void wxFrame::InternalSetMenuBar() void wxFrame::InternalSetMenuBar()
@@ -934,18 +898,6 @@ bool wxFrame::OS2Create(
memcpy(&m_vSwpTitleBar, &vSwp[i], sizeof(SWP)); memcpy(&m_vSwpTitleBar, &vSwp[i], sizeof(SWP));
} }
//
// Now set the size of the client
//
WinSetWindowPos( hClient
,HWND_TOP
,SV_CXSIZEBORDER/2
,(SV_CYSIZEBORDER/2) + m_vSwpHScroll.cy/2
,m_vSwp.cx - ((SV_CXSIZEBORDER + 1) + m_vSwpVScroll.cx)
,m_vSwp.cy - ((SV_CYSIZEBORDER + 1) + m_vSwpTitleBar.cy + m_vSwpHScroll.cy/2)
,SWP_SIZE | SWP_MOVE
);
// //
// Set the client window's background, otherwise it is transparent! // Set the client window's background, otherwise it is transparent!
// //
@@ -1195,6 +1147,13 @@ bool wxFrame::HandlePaint()
} }
else else
{ {
HPS hPS;
RECTL vRect;
hPS = WinBeginPaint(GetHwnd(), 0L, &vRect);
WinFillRect(hPS, &vRect, SYSCLR_WINDOW);
WinEndPaint(hPS);
return wxWindow::HandlePaint(); return wxWindow::HandlePaint();
} }
} }

View File

@@ -990,15 +990,15 @@ $(WXDIR)\lib\wx.lib: \
!else !else
# Update the dynamic link library # Update the dynamic link library
$(WXDIR)\lib\wx214.dll: $(OBJECTS) $(WXDIR)\lib\wx22.dll: $(OBJECTS)
icc @<< icc @<<
/B" $(LINKFLAGS)" /Fe$@ /B" $(LINKFLAGS)" /Fe$@
$(LIBS) $(LIBS)
$(DUMMYOBJ) $(DUMMYOBJ)
$(OBJECTS) $(OBJECTS)
$(WXDIR)\lib\wx214.def $(WXDIR)\lib\wx22.def
<< <<
implib $(WXDIR)\lib\wx214.lib $(WXDIR)\lib\wx214.def implib $(WXDIR)\lib\wx22.lib $(WXDIR)\lib\wx22.def
!endif !endif
@@ -1094,7 +1094,7 @@ clean: $(PERIPH_CLEAN_TARGET) clean_png clean_zlib clean_jpeg clean_xpm clean_t
rd ..\os2\$D rd ..\os2\$D
del $(LIBTARGET) del $(LIBTARGET)
!if "$(WXMAKINGDLL)" == "1" !if "$(WXMAKINGDLL)" == "1"
erase /N ..\..\lib\wx214.lib erase /N ..\..\lib\wx22.lib
!endif !endif
cleanall: clean cleanall: clean

View File

@@ -26,8 +26,6 @@
#include <ctype.h> #include <ctype.h>
#ifdef __EMX__ #ifdef __EMX__
#include <dirent.h> #include <dirent.h>
#else
#include <direct.h>
#endif #endif
#include "wx/log.h" #include "wx/log.h"

View File

@@ -35,8 +35,6 @@
#include <ctype.h> #include <ctype.h>
#ifdef __EMX__ #ifdef __EMX__
#include <dirent.h> #include <dirent.h>
#else
#include <direct.h>
#endif #endif
#include <sys/stat.h> #include <sys/stat.h>

View File

@@ -2797,8 +2797,6 @@ bool wxWindow::HandlePaint()
{ {
HRGN hRgn = NULLHANDLE; HRGN hRgn = NULLHANDLE;
wxPaintEvent vEvent; wxPaintEvent vEvent;
HPS hPS;
RECTL vRect;
if (::WinQueryUpdateRegion(GetHwnd(), hRgn) == RGN_NULL) if (::WinQueryUpdateRegion(GetHwnd(), hRgn) == RGN_NULL)
{ {
@@ -2807,10 +2805,6 @@ bool wxWindow::HandlePaint()
} }
m_updateRegion = wxRegion(hRgn); m_updateRegion = wxRegion(hRgn);
hPS = WinBeginPaint(GetHwnd(), 0L, &vRect);
WinFillRect(hPS, &vRect, SYSCLR_WINDOW);
WinEndPaint(hPS);
vEvent.SetEventObject(this); vEvent.SetEventObject(this);
return (GetEventHandler()->ProcessEvent(vEvent)); return (GetEventHandler()->ProcessEvent(vEvent));
} // end of wxWindow::HandlePaint } // end of wxWindow::HandlePaint