]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/ownerdrw.cpp
ignore hidden buttons when emulating clicks on them
[wxWidgets.git] / src / msw / ownerdrw.cpp
index fb83215f336126f2239227c064fa257e427d5736..4beaf8b4b0b39696822525912848dcc693f844ca 100644 (file)
@@ -170,7 +170,9 @@ wxOwnerDrawn::~wxOwnerDrawn()
 bool wxOwnerDrawn::IsMenuItem() const
 {
     // TODO: in 2.7, replace this with simple "return m_isMenuItem"
-    return gs_menuItems.count(this) == 1;
+
+    // some versions of mingw have problems without const_cast when wxUSE_STL=1
+    return gs_menuItems.count(wx_const_cast(wxOwnerDrawn *, this)) == 1;
 }