Contrary to MSDN implications, at least some of these messages are not
actually sent to the TLW for popup menus, but to the owning window or
even its parent window (!).
Move the handling of these events from wxTLW to wxWindow. Move menu
depth tracking to wxFrame, because it only makes sense for frame's
menus and move DoGiveHelp() from wxTLW to wxFrame.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76721 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxASSERT_MSG( m_menuDepth > 0, wxS("No open menus?") );
The conditions to reproduce:
- Windows 8.1
- An application manifest that indicates Windows 8.1 compatibility
In this case, wxGetWinVersion() used to return wxWinVersion_Unknown (Without a manifest indicating 8.1 support, wxWinVersion_8 is being returned). This in turn causes the version check against Windows98 in toplevel.cpp:450 to fail, ultimately leading to the mentioned assert.
See http://msdn.microsoft.com/en-us/library/windows/desktop/ms724439%28v=vs.85%29.aspx for details.
This patch on trunk adjusts adds the wxWinVersion_8_1 enum value and returns it on Windows 8.1 if the program is manifested as such.
In future, a different approach needs to be chosen that does not depend the deprecated GetVersion function.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.
Closes#16246.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't offset the returned values by the parent window origin unnecessarily: as
popup windows are created as children of the desktop window in wxMSW, their
coordinates are already expressed in screen coordinate system (which is
exactly the same as display window coordinate system) and we must not try to
translate them to it once again, this is completely wrong and was probably a
left over from earlier wxPopupWindow implementation in which it wasn't created
as a child of desktop.
Closes#4440.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This must be done both at wxWidgets and MSW level, otherwise changing the ID
results in window not recognizing itself as the recipient of the messages sent
to it by Windows.
Closes#3697.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76672 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes g++ compilation problem in 64 bit mode after the changes of r76653,
it complained about comparing pointer (HANDLE) with an integer. It might also
fix compilation with icc.
See #16233.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't leave the tooltip shown on screen if the window it was shown for was
hidden or iconized (without moving the mouse, as that would have dismissed the
tooltip as well).
Closes#16265.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make AutoHANDLE a template to allow specifying the invalid handle value, which
is inconsistent across Win32 API and is INVALID_HANDLE_VALUE for most kinds of
handles but 0 for some others, e.g. event object handles.
See #16233.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76653 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When wxLongStringProperty is read-only, it should still be possible to view
its value by opening the dialog normally used for editing it, otherwise this
value cannot be seen (nor copied, which is also useful sometimes) at all.
Closes#14945.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is especially important because the workaround of r76152 for IFileDialog
bug under Windows Vista also applied under later Windows versions as they were
not detected correctly.
Closes#16286.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These operator functions are respectively adding and subtracting their arguments. Instead let the functions multiply and divide their arguments (like their wxPoint2DDouble counterparts were doing already).
See #10946.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We can't use _() in the static wxChar* arrays: first, because this doesn't
compile and second because if it did compile, it still wouldn't work as no
message catalogs are loaded yet when the static arrays are initialized.
Use wxTRANSLATE() instead and arrange for the strings to be translated when
they are really used. This is rather ugly and perhaps it would be better to
avoid passing untranslated labels array to the property classes but at least
the code compiles again now.
See #16266.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix an error for compile step of "Linux i386 wxGTK trunk no features" buildbot by forward declaring wxWindow class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't test for wxUSE_NORLANDER_HEADERS, this is always true since many, many
years.
Remove tests for gcc version < 3.3, notably 2.95: the minimal supported gcc
version is 3.4.
Closes#15727.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't compare __VISUALC__ with versions 1200 (VC6) and earlier, such tests are
always true or always false now that we don't support VC6 any more, so just
remove them simplifying the code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This compiler is not being developed since several years and almost certainly
can't be used to build the current wxWidgets sources anyhow, so remove all
support for it, including a lot of extremely ugly workarounds for its bugs
with template functions.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to call Connect(wxIPV4address) on a wxHTTP object, without
having to explicitly specify the second argument (this was documented as being
a Watcom-specific problem, but actually it wasn't).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Not sure if this file is actually used at all right now, but update it to
avoid discrepancies with the other setup[0].h.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Most importantly, this allows us to remove all MSLU-related stuff.
Some functions which were previously loaded dynamically can now be just used
directly, too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't define wxUSE_DBGHELP as 1 for MinGW, it was only supposed to be defined
as 1 for MSVC (just for all versions of it now that we don't support MSVC6
which couldn't compile this code).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76534 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.
Also remove tests for VisualAge compiler which isn't used since ages.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.
Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
__WXMSW__ is not defined when compiling wxBase, so the tests which were meant
to prevent using Unix event loop classes under Cygwin (under which both
__UNIX__ and __WINDOWS__, but not __WXMSW__, are defined) failed, breaking
compilation of all wxEventLoop-related code in wxBase in Cygwin builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In 64 bits, LONG is actually defined as int in Cygwin gcc headers, so is
different from long -- even if both types use identical representation.
Just add the casts to fix this for now, as this is the smallest ABI-preserving
change. Ideally, something better and less ugly would need to be done in the
future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously __WIN64__ was only defined for 64 bit builds with MSVC, which
resulted in many problems when using 64 bit Cygwin compiler.
Also don't use MSVC-specific __int64 but our wxInt64 for WX{L,W}PARAM and
WXLRESULT definitions in 64 bit builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76500 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This breaks 64 bit Cygwin builds and is unnecessary for 32 bit ones where
configure already defines wxSIZE_T_IS_UINT correctly.
Closes#16130.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Previously the default parameter was only available in wxMSW and wxGTK. Added it to the base class as well to allow EnableCloseButton() calls without a parameter under other platforms too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Added EnableFullScreenView() to have a full screen button in the title bar and also allowing ShowFullScreen() to make use of the newer full screen API.
See #14357.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's impossible to know what problem this was supposed to fix (it's been there
since the Dawn of Time: r2), but it prevents stddef.h from defining ptrdiff_t,
among others. We need ptrdiff_t.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxEVT_STC_CLIPBOARD_{COPY,PASTE} events, allowing to transform the text
being copied from or pasted into wxStyledTextCtrl.
Closes#16191.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These fields were unnecessary and duplicated m_cmdString inherited from the
base class.
Also use base class GetString() instead of the redundant GetText() and
GetDragText() in the code, even though these methods are still kept for
backwards compatibility.
See #16191.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775