]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/choice.cpp
Minor source cleaning.
[wxWidgets.git] / src / msw / choice.cpp
index 144165341854a637716337d0f37897ea88305a2f..80cc353d68e1a53b49b23bf77ce1baefdaee01a8 100644 (file)
@@ -26,8 +26,9 @@
 
 #if wxUSE_CHOICE && !(defined(__SMARTPHONE__) && defined(__WXWINCE__))
 
+#include "wx/choice.h"
+
 #ifndef WX_PRECOMP
-    #include "wx/choice.h"
     #include "wx/utils.h"
     #include "wx/log.h"
     #include "wx/brush.h"
@@ -741,10 +742,7 @@ bool wxChoice::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
                 if ( n > -1 )
                 {
                     event.SetString(GetStringSelection());
-                    if ( HasClientObjectData() )
-                        event.SetClientObject( GetClientObject(n) );
-                    else if ( HasClientUntypedData() )
-                        event.SetClientData( GetClientData(n) );
+                    InitCommandEventWithItems(event, n);
                 }
 
                 ProcessCommand(event);