]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/headerctrl.cpp
Fixed VC6 compilation - wxAny(const wxVariant&) ctor required a specific 'template<>')
[wxWidgets.git] / src / msw / headerctrl.cpp
index 921a97d1cadcc2864f042b42ee33d7bca3c9b714..9144513d5b7d4d695c1353d448d0ba43370a1d95 100644 (file)
@@ -285,6 +285,7 @@ void wxHeaderCtrl::DoInsertItem(const wxHeaderColumn& col, unsigned int idx)
             if ( !m_imageList )
             {
                 m_imageList = new wxImageList(bmpWidth, bmpHeight);
             if ( !m_imageList )
             {
                 m_imageList = new wxImageList(bmpWidth, bmpHeight);
+                (void) // suppress mingw32 warning about unused computed value
                 Header_SetImageList(GetHwnd(), GetHimagelistOf(m_imageList));
             }
             else // already have an image list
                 Header_SetImageList(GetHwnd(), GetHimagelistOf(m_imageList));
             }
             else // already have an image list
@@ -656,22 +657,24 @@ bool wxHeaderCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
         if ( order != -1 )
             event.SetNewOrder(order);
 
         if ( order != -1 )
             event.SetNewOrder(order);
 
-        if ( GetEventHandler()->ProcessEvent(event) )
-        {
-            if ( event.IsAllowed() )
-                return true;    // skip default message handling below
+        const bool processed = GetEventHandler()->ProcessEvent(event);
 
 
-            // we need to veto the default handling of this message, don't
-            // return to execute the code in the "if veto" branch below
+        if ( processed && !event.IsAllowed() )
             veto = true;
             veto = true;
-        }
-        else // not processed
+
+        if ( !veto )
         {
             // special post-processing for HDN_ENDDRAG: we need to update the
             // internal column indices array if this is allowed to go ahead as
             // the native control is going to reorder its columns now
             if ( evtType == wxEVT_COMMAND_HEADER_END_REORDER )
                 MoveColumnInOrderArray(m_colIndices, idx, order);
         {
             // special post-processing for HDN_ENDDRAG: we need to update the
             // internal column indices array if this is allowed to go ahead as
             // the native control is going to reorder its columns now
             if ( evtType == wxEVT_COMMAND_HEADER_END_REORDER )
                 MoveColumnInOrderArray(m_colIndices, idx, order);
+
+            if ( processed )
+            {
+                // skip default processing below
+                return true;
+            }
         }
     }
 
         }
     }