Various wxUniversal/wxMicroWindows fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2001-07-02 13:22:19 +00:00
parent 367c84b903
commit 8cb172b4f1
29 changed files with 94 additions and 43 deletions

View File

@@ -19,6 +19,7 @@
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/string.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants
@@ -306,7 +307,8 @@ private:
Replace environment variables ($SOMETHING) with their values. The format is Replace environment variables ($SOMETHING) with their values. The format is
$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and $VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally. '_' only. '$' must be escaped ('\$') in order to be taken literally.
*/ */
WXDLLEXPORT wxString wxExpandEnvVars(const wxString &sz); WXDLLEXPORT wxString wxExpandEnvVars(const wxString &sz);
/* /*

View File

@@ -43,6 +43,8 @@
class WXDLLEXPORT wxComboControl; class WXDLLEXPORT wxComboControl;
class WXDLLEXPORT wxListBox; class WXDLLEXPORT wxListBox;
class WXDLLEXPORT wxPopupComboWindow; class WXDLLEXPORT wxPopupComboWindow;
class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxButton;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// the actions supported by this control // the actions supported by this control

View File

@@ -35,6 +35,9 @@ class WXDLLEXPORT wxMenu;
class WXDLLEXPORT wxScrollBar; class WXDLLEXPORT wxScrollBar;
class WXDLLEXPORT wxTextCtrl; class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxWindow; class WXDLLEXPORT wxWindow;
#if wxUSE_GAUGE
class WXDLLEXPORT wxGauge;
#endif // wxUSE_GAUGE
#include "wx/string.h" #include "wx/string.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"

View File

@@ -55,7 +55,7 @@
#define wxUSE_ZIPSTREAM 0 #define wxUSE_ZIPSTREAM 0
#define wxUSE_ZLIB 0 #define wxUSE_ZLIB 0
#define wxUSE_APPLE_IEEE 0 #define wxUSE_APPLE_IEEE 0
#define wxUSE_FILE 0 #define wxUSE_FILE 1
#define wxUSE_FFILE 1 #define wxUSE_FFILE 1
#define wxUSE_TEXTFILE 0 #define wxUSE_TEXTFILE 0
#define wxUSE_INTL 0 #define wxUSE_INTL 0
@@ -135,7 +135,7 @@
#define wxUSE_MS_HTML_HELP 0 #define wxUSE_MS_HTML_HELP 0
#define wxUSE_RESOURCES 0 #define wxUSE_RESOURCES 0
#define wxUSE_CONSTRAINTS 1 #define wxUSE_CONSTRAINTS 1
#define wxUSE_CLIPBOARD 1 #define wxUSE_CLIPBOARD 0
#define wxUSE_DATAOBJ 1 #define wxUSE_DATAOBJ 1
#define wxUSE_SPLINES 0 #define wxUSE_SPLINES 0
#define wxUSE_DRAG_AND_DROP 0 #define wxUSE_DRAG_AND_DROP 0

View File

@@ -3,7 +3,7 @@
# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr # Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
############################################################################## ##############################################################################
TOP=/home/julians/microwindows/microwin/src TOP=/home/julians/local/microwindows/microwin/src
CONFIG = $(TOP)/config CONFIG = $(TOP)/config
WXDIR = ../.. WXDIR = ../..
OBJSUFF = o OBJSUFF = o
@@ -25,7 +25,7 @@ include $(CONFIG)
# Directories list for header files # Directories list for header files
INCLUDEDIRS += -I$(WXDIR)/include INCLUDEDIRS += -I$(WXDIR)/include
# Defines for preprocessor # Defines for preprocessor
DEFINES += -DMWIN -D__WXMICROWIN__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
# Compilation flags for C files OTHER than include directories # Compilation flags for C files OTHER than include directories
CFLAGS += CFLAGS +=

View File

@@ -28,17 +28,16 @@
#endif #endif
#include "wx/config.h" #include "wx/config.h"
#include "wx/intl.h"
#include "wx/log.h"
#if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE) #if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
#include "wx/app.h" #include "wx/app.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/log.h"
#include "wx/textfile.h" #include "wx/textfile.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/log.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/intl.h"
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>

View File

@@ -1129,7 +1129,7 @@ bool wxMkdir(const wxString& dir, int perm)
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too // assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
// for the GNU compiler // for the GNU compiler
#if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) #if (!(defined(__WXMSW__) || defined(__WXPM__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) || defined(__WXMICROWIN__)
if ( mkdir(wxFNCONV(dirname), perm) != 0 ) if ( mkdir(wxFNCONV(dirname), perm) != 0 )
#elif defined(__WXPM__) #elif defined(__WXPM__)
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's?? if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??

View File

@@ -537,7 +537,7 @@ wxString wxFileName::GetFullPath( wxPathFormat format ) const
// Return the short form of the path (returns identity on non-Windows platforms) // Return the short form of the path (returns identity on non-Windows platforms)
wxString wxFileName::GetShortPath() const wxString wxFileName::GetShortPath() const
{ {
#if defined(__WXMSW__) && defined(__WIN32__) #if defined(__WXMSW__) && defined(__WIN32__) && !defined(__WXMICROWIN__)
wxString path(GetFullPath()); wxString path(GetFullPath());
wxString pathOut; wxString pathOut;
DWORD sz = ::GetShortPathName(path, NULL, 0); DWORD sz = ::GetShortPathName(path, NULL, 0);
@@ -564,7 +564,7 @@ wxString wxFileName::GetShortPath() const
// Return the long form of the path (returns identity on non-Windows platforms) // Return the long form of the path (returns identity on non-Windows platforms)
wxString wxFileName::GetLongPath() const wxString wxFileName::GetLongPath() const
{ {
#if defined(__WXMSW__) && defined(__WIN32__) #if defined(__WXMSW__) && defined(__WIN32__) && !defined(__WXMICROWIN__)
wxString path(GetFullPath()); wxString path(GetFullPath());
wxString pathOut; wxString pathOut;
bool success = FALSE; bool success = FALSE;

View File

@@ -57,9 +57,11 @@
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#ifdef __WXMSW__ #if defined(__WXMSW__)
#include "wx/msw/private.h" // includes windows.h for OutputDebugString #include "wx/msw/private.h" // includes windows.h for OutputDebugString
#else //Unix #endif
#if !defined(__WXMSW__) || defined(__WXMICROWIN__)
#include <signal.h> #include <signal.h>
#endif //Win/Unix #endif //Win/Unix
@@ -513,7 +515,7 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
// under Windows, programs usually don't have stderr at all, so show the // under Windows, programs usually don't have stderr at all, so show the
// messages also under debugger - unless it's a console program // messages also under debugger - unless it's a console program
#if defined(__WXMSW__) && wxUSE_GUI #if defined(__WXMSW__) && wxUSE_GUI && !defined(__WXMICROWIN__)
str += wxT("\r\n") ; str += wxT("\r\n") ;
OutputDebugString(str.c_str()); OutputDebugString(str.c_str());
#endif // MSW #endif // MSW
@@ -639,7 +641,7 @@ static void wxLogWrap(FILE *f, const char *pszPrefix, const char *psz)
// get error code from syste // get error code from syste
unsigned long wxSysErrorCode() unsigned long wxSysErrorCode()
{ {
#ifdef __WXMSW__ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__ #ifdef __WIN32__
return ::GetLastError(); return ::GetLastError();
#else //WIN16 #else //WIN16
@@ -657,7 +659,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
if ( nErrCode == 0 ) if ( nErrCode == 0 )
nErrCode = wxSysErrorCode(); nErrCode = wxSysErrorCode();
#ifdef __WXMSW__ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
#ifdef __WIN32__ #ifdef __WIN32__
static wxChar s_szBuf[LOG_BUFFER_SIZE / 2]; static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
@@ -714,7 +716,7 @@ bool wxAssertIsEqual(int x, int y)
// break into the debugger // break into the debugger
void wxTrap() void wxTrap()
{ {
#ifdef __WXMSW__ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
DebugBreak(); DebugBreak();
#elif defined(__WXMAC__) #elif defined(__WXMAC__)
#if __powerc #if __powerc
@@ -779,7 +781,7 @@ void wxOnAssert(const wxChar *szFile, int nLine, const wxChar *szMsg)
// use the native message box if available: this is more robust than // use the native message box if available: this is more robust than
// using our own // using our own
#ifdef __WXMSW__ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
switch ( ::MessageBox(NULL, szBuf, _T("Debug"), switch ( ::MessageBox(NULL, szBuf, _T("Debug"),
MB_YESNOCANCEL | MB_ICONSTOP ) ) { MB_YESNOCANCEL | MB_ICONSTOP ) ) {
case IDYES: case IDYES:

View File

@@ -34,6 +34,7 @@
#include "wx/tipwin.h" #include "wx/tipwin.h"
#include "wx/timer.h" #include "wx/timer.h"
#include "wx/settings.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// constants // constants

View File

@@ -242,7 +242,7 @@ bool wxApp::Initialize()
InitCommonControls(); InitCommonControls();
#endif // __WIN95__ #endif // __WIN95__
#if wxUSE_OLE || wxUSE_DRAG_AND_DROP || wxUSE_DATAOBJ #if wxUSE_OLE || wxUSE_DRAG_AND_DROP
#ifdef __WIN16__ #ifdef __WIN16__
// for OLE, enlarge message queue to be as large as possible // for OLE, enlarge message queue to be as large as possible
@@ -250,6 +250,7 @@ bool wxApp::Initialize()
while (!SetMessageQueue(iMsg) && (iMsg -= 8)) while (!SetMessageQueue(iMsg) && (iMsg -= 8))
; ;
#endif // Win16 #endif // Win16
// we need to initialize OLE library // we need to initialize OLE library
if ( FAILED(::OleInitialize(NULL)) ) if ( FAILED(::OleInitialize(NULL)) )
wxLogError(_("Cannot initialize OLE")); wxLogError(_("Cannot initialize OLE"));
@@ -717,7 +718,7 @@ int wxEntry(WXHINSTANCE hInstance,
wxCHECK_MSG( wxApp::GetInitializerFunction(), 0, wxCHECK_MSG( wxApp::GetInitializerFunction(), 0,
wxT("No initializer - use IMPLEMENT_APP macro.") ); wxT("No initializer - use IMPLEMENT_APP macro.") );
wxTheApp = (*wxApp::GetInitializerFunction()) (); wxTheApp = (wxApp*) (*wxApp::GetInitializerFunction()) ();
} }
wxCHECK_MSG( wxTheApp, 0, wxT("You have to define an instance of wxApp!") ); wxCHECK_MSG( wxTheApp, 0, wxT("You have to define an instance of wxApp!") );

View File

@@ -382,6 +382,10 @@ bool wxBitmap::Create(int w, int h, int d)
bool wxBitmap::CreateFromImage( const wxImage& image, int depth ) bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
{ {
#ifdef __WXMICROWIN__
// TODO
return FALSE;
#else
wxCHECK_MSG( image.Ok(), FALSE, wxT("invalid image") ) wxCHECK_MSG( image.Ok(), FALSE, wxT("invalid image") )
m_refData = new wxBitmapRefData(); m_refData = new wxBitmapRefData();
@@ -604,10 +608,15 @@ bool wxBitmap::CreateFromImage( const wxImage& image, int depth )
if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this); if (wxTheBitmapList) wxTheBitmapList->AddBitmap(this);
return TRUE; return TRUE;
#endif
} }
wxImage wxBitmap::ConvertToImage() const wxImage wxBitmap::ConvertToImage() const
{ {
#ifdef __WXMICROWIN__
// TODO
return wxImage();
#else
wxImage image; wxImage image;
wxCHECK_MSG( Ok(), wxNullImage, wxT("invalid bitmap") ); wxCHECK_MSG( Ok(), wxNullImage, wxT("invalid bitmap") );
@@ -732,6 +741,7 @@ wxImage wxBitmap::ConvertToImage() const
free(lpBits); free(lpBits);
return image; return image;
#endif
} }
#endif // wxUSE_IMAGE #endif // wxUSE_IMAGE

View File

@@ -55,7 +55,10 @@
#include <windows.h> #include <windows.h>
#include "wx/msw/private.h" #include "wx/msw/private.h"
#ifndef __WXMICROWIN__
#include "wx/msw/dib.h" #include "wx/msw/dib.h"
#endif
// wxDataObject is tied to OLE/drag and drop implementation, therefore so are // wxDataObject is tied to OLE/drag and drop implementation, therefore so are
// the functions using wxDataObject in wxClipboard // the functions using wxDataObject in wxClipboard
@@ -64,8 +67,11 @@
#if wxUSE_DATAOBJ #if wxUSE_DATAOBJ
#include "wx/dataobj.h" #include "wx/dataobj.h"
// use OLE clipboard // No: don't necessarily use OLE clipboard with data object
#define wxUSE_OLE_CLIPBOARD 1 #if 0
// use OLE clipboard
#define wxUSE_OLE_CLIPBOARD 1
#endif
#else // !wxUSE_DATAOBJ #else // !wxUSE_DATAOBJ
// use Win clipboard API // use Win clipboard API
#define wxUSE_OLE_CLIPBOARD 0 #define wxUSE_OLE_CLIPBOARD 0

View File

@@ -21,6 +21,7 @@
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/msw/private.h"
#include <string.h> #include <string.h>
#include <windows.h> #include <windows.h>

View File

@@ -537,9 +537,9 @@ void wxDC::DoDrawCheckMark(wxCoord x1, wxCoord y1,
HPEN hBrushOld = (HPEN)::SelectObject(GetHdc(), whiteBrush); HPEN hBrushOld = (HPEN)::SelectObject(GetHdc(), whiteBrush);
::SetROP2(GetHdc(), R2_COPYPEN); ::SetROP2(GetHdc(), R2_COPYPEN);
Rectangle(GetHdc(), x1, y1, x2, y2); Rectangle(GetHdc(), x1, y1, x2, y2);
MoveTo(GetHdc(), x1, y1); MoveToEx(GetHdc(), x1, y1, NULL);
LineTo(GetHdc(), x2, y2); LineTo(GetHdc(), x2, y2);
MoveTo(GetHdc(), x2, y1); MoveToEx(GetHdc(), x2, y1, NULL);
LineTo(GetHdc(), x1, y2); LineTo(GetHdc(), x1, y2);
::SelectObject(GetHdc(), hPenOld); ::SelectObject(GetHdc(), hPenOld);
::SelectObject(GetHdc(), hBrushOld); ::SelectObject(GetHdc(), hBrushOld);

View File

@@ -194,6 +194,7 @@ bool wxDialog::Create(wxWindow *parent,
bool wxDialog::EnableCloseButton(bool enable) bool wxDialog::EnableCloseButton(bool enable)
{ {
#ifndef __WXMICROWIN__
// get system (a.k.a. window) menu // get system (a.k.a. window) menu
HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */); HMENU hmenu = ::GetSystemMenu(GetHwnd(), FALSE /* get it */);
if ( !hmenu ) if ( !hmenu )
@@ -218,7 +219,8 @@ bool wxDialog::EnableCloseButton(bool enable)
{ {
wxLogLastError(_T("DrawMenuBar")); wxLogLastError(_T("DrawMenuBar"));
} }
#endif
return TRUE; return TRUE;
} }

View File

@@ -32,6 +32,8 @@
#endif //WX_PRECOMP #endif //WX_PRECOMP
#include "wx/evtloop.h" #include "wx/evtloop.h"
#include "wx/window.h"
#include "wx/app.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"

View File

@@ -3,7 +3,7 @@
# Copyright (c) 2000 Martin Jolicoeur, Greg Haerr # Copyright (c) 2000 Martin Jolicoeur, Greg Haerr
############################################################################## ##############################################################################
TOP=/home/julians/microwindows/microwin/src TOP=/home/julians/local/microwindows/microwin/src
CONFIG = $(TOP)/config CONFIG = $(TOP)/config
WXDIR = ../.. WXDIR = ../..
OBJSUFF = o OBJSUFF = o
@@ -206,10 +206,7 @@ MSWOBJS = \
$(MICROWINDIR)/gdiobj.$(OBJSUFF) \ $(MICROWINDIR)/gdiobj.$(OBJSUFF) \
$(MICROWINDIR)/icon.$(OBJSUFF) \ $(MICROWINDIR)/icon.$(OBJSUFF) \
$(MICROWINDIR)/main.$(OBJSUFF) \ $(MICROWINDIR)/main.$(OBJSUFF) \
$(MICROWINDIR)/menu.$(OBJSUFF) \
$(MICROWINDIR)/menuitem.$(OBJSUFF) \
$(MICROWINDIR)/microwin.$(OBJSUFF) \ $(MICROWINDIR)/microwin.$(OBJSUFF) \
$(MICROWINDIR)/msgdlg.$(OBJSUFF) \
$(MICROWINDIR)/palette.$(OBJSUFF) \ $(MICROWINDIR)/palette.$(OBJSUFF) \
$(MICROWINDIR)/pen.$(OBJSUFF) \ $(MICROWINDIR)/pen.$(OBJSUFF) \
$(MICROWINDIR)/regconf.$(OBJSUFF) \ $(MICROWINDIR)/regconf.$(OBJSUFF) \
@@ -219,7 +216,7 @@ MSWOBJS = \
$(MICROWINDIR)/thread.$(OBJSUFF) \ $(MICROWINDIR)/thread.$(OBJSUFF) \
$(MICROWINDIR)/timer.$(OBJSUFF) \ $(MICROWINDIR)/timer.$(OBJSUFF) \
$(MICROWINDIR)/utils.$(OBJSUFF) \ $(MICROWINDIR)/utils.$(OBJSUFF) \
$(MICROWINDIR)/window.$(OBJSUFF) $(MICROWINDIR)/window.$(OBJSUFF) \
$(OLEDIR)/dataobj.$(OBJSUFF) $(OLEDIR)/dataobj.$(OBJSUFF)
UNIVOBJS_TODO = $(UNIVDIR)/choice.$(OBJSUFF) \ UNIVOBJS_TODO = $(UNIVDIR)/choice.$(OBJSUFF) \
@@ -234,7 +231,7 @@ UNIVOBJS = \
$(UNIVDIR)/colschem.$(OBJSUFF) \ $(UNIVDIR)/colschem.$(OBJSUFF) \
$(UNIVDIR)/combobox.$(OBJSUFF) \ $(UNIVDIR)/combobox.$(OBJSUFF) \
$(UNIVDIR)/control.$(OBJSUFF) \ $(UNIVDIR)/control.$(OBJSUFF) \
$(UNIVDIR)/frameuniv.$(OBJSUFF) \ $(UNIVDIR)/framuniv.$(OBJSUFF) \
$(UNIVDIR)/gauge.$(OBJSUFF) \ $(UNIVDIR)/gauge.$(OBJSUFF) \
$(UNIVDIR)/inphand.$(OBJSUFF) \ $(UNIVDIR)/inphand.$(OBJSUFF) \
$(UNIVDIR)/listbox.$(OBJSUFF) \ $(UNIVDIR)/listbox.$(OBJSUFF) \
@@ -248,7 +245,6 @@ UNIVOBJS = \
$(UNIVDIR)/scrthumb.$(OBJSUFF) \ $(UNIVDIR)/scrthumb.$(OBJSUFF) \
$(UNIVDIR)/slider.$(OBJSUFF) \ $(UNIVDIR)/slider.$(OBJSUFF) \
$(UNIVDIR)/spinbutt.$(OBJSUFF) \ $(UNIVDIR)/spinbutt.$(OBJSUFF) \
$(UNIVDIR)/spinctrl.$(OBJSUFF) \
$(UNIVDIR)/statbmp.$(OBJSUFF) \ $(UNIVDIR)/statbmp.$(OBJSUFF) \
$(UNIVDIR)/statbox.$(OBJSUFF) \ $(UNIVDIR)/statbox.$(OBJSUFF) \
$(UNIVDIR)/statline.$(OBJSUFF) \ $(UNIVDIR)/statline.$(OBJSUFF) \
@@ -266,7 +262,7 @@ include $(CONFIG)
# Directories list for header files # Directories list for header files
INCLUDEDIRS += -I$(WXDIR)/include INCLUDEDIRS += -I$(WXDIR)/include
# Defines for preprocessor # Defines for preprocessor
DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ DEFINES += -DMWIN -D__WXMSW__ -D__WXMICROWIN__ -D__WXUNIVERSAL__ -D__WIN32__ -D__WIN95__ -DHAVE_BOOL -DMICROWIN_TODO=1 -D__UNIX__ -DHAVE_NANOSLEEP -DMICROWIN_NOCONTROLS -D__WXDEBUG__ -DwxSIZE_T_IS_UINT -DWXWIN_OS_DESCRIPTION="\"MicroWindows\""
# Compilation flags for C files OTHER than include directories # Compilation flags for C files OTHER than include directories
CFLAGS += CFLAGS +=

View File

@@ -19,7 +19,7 @@
#include "windows.h" #include "windows.h"
#include "wintern.h" #include "wintern.h"
#include "device.h" #include "device.h"
#include "wx/microwin/microwin.h" #include "wx/msw/microwin.h"
void GdMoveCursor(MWCOORD x, MWCOORD y); void GdMoveCursor(MWCOORD x, MWCOORD y);
void MwSetCursor(HWND wp, PMWCURSOR pcursor); void MwSetCursor(HWND wp, PMWCURSOR pcursor);

View File

@@ -160,7 +160,7 @@ static void TranslateKbdEventToMouse(wxWindowMSW *win,
static TEXTMETRIC wxGetTextMetrics(const wxWindowMSW *win); static TEXTMETRIC wxGetTextMetrics(const wxWindowMSW *win);
// check if the mouse is in the window or its child // check if the mouse is in the window or its child
static bool IsMouseInWindow(HWND hwnd); //static bool IsMouseInWindow(HWND hwnd);
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// event tables // event tables
@@ -421,12 +421,19 @@ void wxWindowMSW::SetFocus()
HWND hWnd = GetHwnd(); HWND hWnd = GetHwnd();
wxCHECK_RET( hWnd, _T("can't set focus to invalid window") ); wxCHECK_RET( hWnd, _T("can't set focus to invalid window") );
#ifndef __WXMICROWIN__
::SetLastError(0); ::SetLastError(0);
#endif
if ( !::SetFocus(hWnd) ) if ( !::SetFocus(hWnd) )
{ {
// was there really an error? // was there really an error?
#ifndef __WXMICROWIN__
DWORD dwRes = ::GetLastError(); DWORD dwRes = ::GetLastError();
#else
DWORD dwRes = 0;
#endif
if ( dwRes ) if ( dwRes )
{ {
wxLogApiError(_T("SetFocus"), dwRes); wxLogApiError(_T("SetFocus"), dwRes);
@@ -1178,7 +1185,7 @@ void wxWindowMSW::Update()
wxLogLastError(_T("UpdateWindow")); wxLogLastError(_T("UpdateWindow"));
} }
#ifdef __WIN32__ #if defined(__WIN32__) && !defined(__WXMICROWIN__)
// just calling UpdateWindow() is not enough, what we did in our WM_PAINT // just calling UpdateWindow() is not enough, what we did in our WM_PAINT
// handler needs to be really drawn right now // handler needs to be really drawn right now
(void)::GdiFlush(); (void)::GdiFlush();
@@ -2069,7 +2076,7 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
} }
break; break;
#ifdef __WXUNIVERSAL__ #if defined(__WXUNIVERSAL__) && !defined(__WXMICROWIN__)
case WM_ACTIVATEAPP: case WM_ACTIVATEAPP:
wxTheApp->SetActive(wParam != 0, FindFocus()); wxTheApp->SetActive(wParam != 0, FindFocus());
break; break;
@@ -2546,6 +2553,7 @@ void wxWindowMSW::MSWDestroyWindow()
void wxWindowMSW::MSWDetachWindowMenu() void wxWindowMSW::MSWDetachWindowMenu()
{ {
#ifndef __WXUNIVERSAL__
if ( m_hMenu ) if ( m_hMenu )
{ {
wxChar buf[1024]; wxChar buf[1024];
@@ -2572,6 +2580,7 @@ void wxWindowMSW::MSWDetachWindowMenu()
} }
} }
} }
#endif
} }
bool wxWindowMSW::MSWCreate(int id, bool wxWindowMSW::MSWCreate(int id,
@@ -3830,6 +3839,7 @@ bool wxWindowMSW::HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam)
bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags) bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags)
{ {
#ifdef JOY_BUTTON1
int change = 0; int change = 0;
if ( flags & JOY_BUTTON1CHG ) if ( flags & JOY_BUTTON1CHG )
change = wxJOY_BUTTON1; change = wxJOY_BUTTON1;
@@ -3906,6 +3916,9 @@ bool wxWindowMSW::HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags)
event.SetEventObject(this); event.SetEventObject(this);
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
#else
return FALSE;
#endif
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@@ -46,6 +46,7 @@
#include "wx/combobox.h" #include "wx/combobox.h"
#include "wx/listbox.h" #include "wx/listbox.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
#include "wx/bmpbuttn.h"
#include "wx/validate.h" #include "wx/validate.h"
#endif #endif

View File

@@ -242,7 +242,7 @@ void wxListBox::DoClear()
size_t count = m_itemsClientData.GetCount(); size_t count = m_itemsClientData.GetCount();
for ( size_t n = 0; n < count; n++ ) for ( size_t n = 0; n < count; n++ )
{ {
delete m_itemsClientData[n]; delete (wxClientData *) m_itemsClientData[n];
} }
} }
@@ -275,7 +275,7 @@ void wxListBox::Delete(int n)
if ( HasClientObjectData() ) if ( HasClientObjectData() )
{ {
delete m_itemsClientData[n]; delete (wxClientData *)m_itemsClientData[n];
} }
m_itemsClientData.RemoveAt(n); m_itemsClientData.RemoveAt(n);

View File

@@ -41,6 +41,8 @@
#include "wx/popupwin.h" #include "wx/popupwin.h"
#include "wx/evtloop.h" #include "wx/evtloop.h"
#include "wx/dcclient.h"
#include "wx/frame.h"
#include "wx/univ/renderer.h" #include "wx/univ/renderer.h"

View File

@@ -31,8 +31,8 @@
#include "wx/imaglist.h" #include "wx/imaglist.h"
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#include "wx/dcmemory.h"
#include "wx/univ/renderer.h" #include "wx/univ/renderer.h"

View File

@@ -43,6 +43,10 @@
#include "wx/univ/renderer.h" #include "wx/univ/renderer.h"
#include "wx/univ/colschem.h" #include "wx/univ/colschem.h"
#if wxUSE_GAUGE
#include "wx/gauge.h"
#endif
// ============================================================================ // ============================================================================
// implementation // implementation
// ============================================================================ // ============================================================================

View File

@@ -353,7 +353,7 @@ void wxScrollBar::OnIdle(wxIdleEvent& event)
dc.DrawRectangle(rect); dc.DrawRectangle(rect);
// under Unix we use "--sync" X option for this // under Unix we use "--sync" X option for this
#ifdef __WXMSW__ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
::GdiFlush(); ::GdiFlush();
::Sleep(200); ::Sleep(200);
#endif // __WXMSW__ #endif // __WXMSW__

View File

@@ -34,6 +34,7 @@
#include "wx/checkbox.h" #include "wx/checkbox.h"
#include "wx/listbox.h" #include "wx/listbox.h"
#include "wx/checklst.h" #include "wx/checklst.h"
#include "wx/combobox.h"
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
#include "wx/slider.h" #include "wx/slider.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"

View File

@@ -35,6 +35,7 @@
#include "wx/button.h" #include "wx/button.h"
#include "wx/listbox.h" #include "wx/listbox.h"
#include "wx/checklst.h" #include "wx/checklst.h"
#include "wx/combobox.h"
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
#include "wx/slider.h" #include "wx/slider.h"
#include "wx/textctrl.h" #include "wx/textctrl.h"
@@ -42,6 +43,7 @@
#include "wx/notebook.h" #include "wx/notebook.h"
#include "wx/spinbutt.h" #include "wx/spinbutt.h"
#include "wx/settings.h"
#include "wx/univ/scrtimer.h" #include "wx/univ/scrtimer.h"

View File

@@ -36,6 +36,7 @@
#include "wx/event.h" #include "wx/event.h"
#include "wx/scrolbar.h" #include "wx/scrolbar.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/frame.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
#include "wx/univ/colschem.h" #include "wx/univ/colschem.h"
@@ -345,7 +346,7 @@ void wxWindow::Refresh(bool eraseBackground, const wxRect *rectClient)
dc.DrawRectangle(rectWin); dc.DrawRectangle(rectWin);
// under Unix we use "--sync" X option for this // under Unix we use "--sync" X option for this
#ifdef __WXMSW__ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
::GdiFlush(); ::GdiFlush();
::Sleep(200); ::Sleep(200);
#endif // __WXMSW__ #endif // __WXMSW__