]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
Add wxControlWithItems::SendSelectionChangedEvent() helper.
[wxWidgets.git] / src / msw / choice.cpp
index e7c17023c1c48bf52a43ffbc02ca669de32bebd3..b6670350f32a08fec9f141dbb45ca56669ef305d 100644 (file)
@@ -792,23 +792,10 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
             // same thing anyhow)
             m_lastAcceptedSelection = wxID_NONE;
 
-            {
-                const int n = GetSelection();
-
-                wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId);
-                event.SetInt(n);
-                event.SetEventObject(this);
-
-                if ( n > -1 )
-                {
-                    event.SetString(GetStringSelection());
-                    InitCommandEventWithItems(event, n);
-                }
-
-                ProcessCommand(event);
-            }
+            SendSelectionChangedEvent(wxEVT_COMMAND_CHOICE_SELECTED);
             break;
 
+
         // don't handle CBN_SELENDCANCEL: just leave m_lastAcceptedSelection
         // valid and the selection will be undone in CBN_CLOSEUP above