+#ifdef __WXMSW__
+ // Otherwise, the cursor sometimes reverts to the normal cursor
+ // during dragging.
+ if ( m_splitMode == wxSPLIT_VERTICAL )
+ {
+ SetCursor(*m_sashCursorWE);
+ }
+ else
+ {
+ SetCursor(*m_sashCursorNS);
+ }
+#endif
+
+ // Obtain window size. We are only interested in the dimension the sash
+ // splits up
+ int new_sash_position =
+ (int) ( m_splitMode == wxSPLIT_VERTICAL ? x : y );
+
+ wxSplitterEvent eventSplitter(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING,
+ this);
+ eventSplitter.m_data.pos = new_sash_position;
+ if ( GetEventHandler()->ProcessEvent(eventSplitter) )
+ {
+ new_sash_position = eventSplitter.GetSashPosition();
+ if ( new_sash_position == -1 )
+ {
+ // change not allowed
+ return;
+ }
+ }
+