diff --git a/docs/latex/wx/category.tex b/docs/latex/wx/category.tex index 59ef53c23b..7573ffe6af 100644 --- a/docs/latex/wx/category.tex +++ b/docs/latex/wx/category.tex @@ -430,7 +430,7 @@ facilities. \twocolitem{\helpref{wxDataObject}{wxdataobject}}{Data object class} \twocolitem{\helpref{wxDataFormat}{wxdataformat}}{Represents a data format} \twocolitem{\helpref{wxTextDataObject}{wxtextdataobject}}{Text data object class} -\twocolitem{\helpref{wxFileDataObject}{wxtextdataobject}}{File data object class} +\twocolitem{\helpref{wxFileDataObject}{wxfiledataobject}}{File data object class} \twocolitem{\helpref{wxBitmapDataObject}{wxbitmapdataobject}}{Bitmap data object class} \twocolitem{\helpref{wxCustomDataObject}{wxcustomdataobject}}{Custom data object class} \twocolitem{\helpref{wxClipboard}{wxclipboard}}{Clipboard class} diff --git a/include/wx/msw/wx.rc b/include/wx/msw/wx.rc index da439acd9b..0128b30313 100644 --- a/include/wx/msw/wx.rc +++ b/include/wx/msw/wx.rc @@ -29,11 +29,7 @@ // Version: $Id$ ///////////////////////////////////////////////////////////////////////////// -#if (defined( __GNUWIN32__ ) && !defined(__TWIN32__)) || defined(__MWERKS__) - #include -#else - #include -#endif +#include ////////////////////////////////////////////////////////////////////////////// // diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 33b12105c6..0f7e92a933 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -50,10 +50,6 @@ #include #include -#if defined(__GNUWIN32_OLD__) - #include "wx/msw/gnuwin32/extra.h" -#endif - // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 58a2f6a17d..27d5955c65 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -300,7 +300,19 @@ void wxChoice::DoMoveWindow(int x, int y, int width, int height) if ( width < 0 ) return; + // To work around a Windows bug (see "Bug in Windows Combobox" thread in Google Groups) + // we have to reset the selection if it was accidentally selected in the size. + DWORD oldSelStart = 0; + DWORD oldSelEnd = 0; + DWORD newSelStart = 0; + DWORD newSelEnd = 0; + wxControl::DoMoveWindow(x, y, width, height); + + if (oldSelStart != newSelStart || oldSelEnd != newSelEnd) + { + ::SendMessage(GetHwnd(), CB_SETEDITSEL, (WPARAM) 0, (LPARAM) MAKELPARAM(oldSelStart, oldSelEnd)); + } } void wxChoice::DoSetSize(int x, int y, @@ -313,7 +325,21 @@ void wxChoice::DoSetSize(int x, int y, // the _displayed_ size (NOT the drop down menu size) so // setting-getting-setting size would not work. + // To work around a Windows bug (see "Bug in Windows Combobox" thread in Google Groups) + // we have to reset the selection if it was accidentally selected in the size. + DWORD oldSelStart = 0; + DWORD oldSelEnd = 0; + DWORD newSelStart = 0; + DWORD newSelEnd = 0; + + ::SendMessage(GetHwnd(), CB_GETEDITSEL, (WPARAM) & oldSelStart, (LPARAM) & oldSelEnd); + wxControl::DoSetSize(x, y, width, -1, sizeFlags); + + if (oldSelStart != newSelStart || oldSelEnd != newSelEnd) + { + ::SendMessage(GetHwnd(), CB_SETEDITSEL, (WPARAM) 0, (LPARAM) MAKELPARAM(oldSelStart, oldSelEnd)); + } } wxSize wxChoice::DoGetBestSize() const diff --git a/src/msw/curico.cpp b/src/msw/curico.cpp index 39c6af6c19..7b1925354d 100644 --- a/src/msw/curico.cpp +++ b/src/msw/curico.cpp @@ -31,10 +31,6 @@ #include #endif -#ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" -#endif - #include "wx/wxchar.h" #include "wx/msw/curicop.h" #include "wx/msw/curico.h" diff --git a/src/msw/dde.cpp b/src/msw/dde.cpp index 6cf22d6b56..2cc08128e2 100644 --- a/src/msw/dde.cpp +++ b/src/msw/dde.cpp @@ -50,10 +50,6 @@ #define PCONVCONTEXT CONVCONTEXT* #endif -#if defined(__TWIN32__) || defined(__GNUWIN32_OLD__) - #include "wx/msw/gnuwin32/extra.h" -#endif - // some compilers headers don't define this one (mingw32) #ifndef DMLERR_NO_ERROR #define DMLERR_NO_ERROR (0) diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 5267d91587..34226bb4bb 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -48,10 +48,6 @@ #include "wx/msw/dib.h" -#ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" -#endif - #ifndef SEEK_CUR /* flags for _lseek */ #define SEEK_CUR 1 diff --git a/src/msw/joystick.cpp b/src/msw/joystick.cpp index 1cfed85842..2ce94a516b 100644 --- a/src/msw/joystick.cpp +++ b/src/msw/joystick.cpp @@ -32,12 +32,6 @@ typedef UINT MMRESULT; #endif -#ifndef __TWIN32__ -#ifdef __GNUWIN32_OLD__ -#include "wx/msw/gnuwin32/extra.h" -#endif -#endif - // Why doesn't BC++ have joyGetPosEx? #if !defined(__WIN32__) || defined(__BORLANDC__) || defined(__TWIN32__) #define NO_JOYGETPOSEX diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index f8ee2b9365..7f60baf98b 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -49,12 +49,6 @@ #include "wx/ownerdrw.h" #endif -#ifndef __TWIN32__ - #ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" - #endif -#endif - #ifdef __WXWINE__ #ifndef ListBox_SetItemData #define ListBox_SetItemData(hwndCtl, index, data) \ diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index acc083ef71..8b93e359bf 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -45,11 +45,7 @@ #include "wx/msw/private.h" -#if ((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) - #include "wx/msw/gnuwin32/extra.h" -#else - #include -#endif +#include #include "wx/msw/missing.h" diff --git a/src/msw/makefile.mic b/src/msw/makefile.mic index 60d21f875b..6725dd2c49 100644 --- a/src/msw/makefile.mic +++ b/src/msw/makefile.mic @@ -1,6 +1,7 @@ ############################################################################## # Microwindows template Makefile # Copyright (c) 2000 Martin Jolicoeur, Greg Haerr +# Licence: wxWindows Licence ############################################################################## TOP=$(MICROWINDOWS) diff --git a/src/msw/minifram.cpp b/src/msw/minifram.cpp index e76e9f15de..22ddb6aafc 100644 --- a/src/msw/minifram.cpp +++ b/src/msw/minifram.cpp @@ -45,12 +45,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame) #include "wx/minifram.h" -#ifndef __TWIN32__ - #ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" - #endif -#endif - IMPLEMENT_DYNAMIC_CLASS(wxMiniFrame, wxFrame) long wxMiniFrame::MSWDefWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index a7001ddbf9..a23fe8fe64 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -43,15 +43,7 @@ #include // for SetWindowFont -#ifndef __TWIN32__ - #ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" - #endif -#endif - -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) - #include -#endif +#include #include "wx/msw/winundef.h" diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index 128ffff8cc..ca20922f8b 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -32,11 +32,7 @@ #include -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) - #include -#else - #include "wx/msw/gnuwin32/extra.h" -#endif +#include #include "wx/msw/dib.h" #include "wx/tabctrl.h" diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index d422b3c214..fb6344c305 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -39,12 +39,6 @@ #include "wx/msw/taskbar.h" #include "wx/msw/private.h" -#ifndef __TWIN32__ - #ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" - #endif -#endif - #ifdef __SALFORDC__ #include #endif diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index ececfab64d..b361fe8fc8 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -59,11 +59,7 @@ #ifndef __TWIN32__ -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) - #include -#else - #include "wx/msw/gnuwin32/extra.h" -#endif +#include #if !defined(CCS_VERT) #define CCS_VERT 0x00000080L diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index f0b8b6fc06..2a50d67044 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -55,13 +55,7 @@ #include "wx/msw/treectrl.h" #include "wx/msw/dragimag.h" -#ifdef __GNUWIN32_OLD__ - #include "wx/msw/gnuwin32/extra.h" -#endif - -#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__)) - #include -#endif +#include // Bug in headers, sometimes #ifndef TVIS_FOCUSED diff --git a/src/msw/wave.cpp b/src/msw/wave.cpp index 52e5ebfe56..8c89a7c970 100644 --- a/src/msw/wave.cpp +++ b/src/msw/wave.cpp @@ -33,11 +33,7 @@ #include #include -#if defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__) - #include "wx/msw/gnuwin32/extra.h" -#else - #include -#endif +#include wxWave::wxWave() : m_waveData(NULL), m_waveLength(0), m_isResource(FALSE) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 3f74b9e443..5cbd1d5f42 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -96,15 +96,7 @@ #include #endif -#if (!defined(__GNUWIN32_OLD__) && !defined(__TWIN32__) && !defined(__WXMICROWIN__)) || defined(__CYGWIN10__) - #ifdef __WIN95__ - #include - #endif -#elif !defined(__WXMICROWIN__) // broken compiler - #ifndef __TWIN32__ - #include "wx/msw/gnuwin32/extra.h" - #endif -#endif +#include // ---------------------------------------------------------------------------- // standard constants not available with all compilers/headers