]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicdgg.cpp
added missing return on error
[wxWidgets.git] / src / generic / choicdgg.cpp
index 5616efce9e39b68fbf1e59bf49bc5875b805e6ea..f97e674d19d0181b9a4457e7e6ae46d2cf42d414 100644 (file)
@@ -28,6 +28,8 @@
     #pragma hdrstop
 #endif
 
     #pragma hdrstop
 #endif
 
+#if wxUSE_CHOICEDLG
+
 #ifndef WX_PRECOMP
     #include <stdio.h>
     #include "wx/utils.h"
 #ifndef WX_PRECOMP
     #include <stdio.h>
     #include "wx/utils.h"
@@ -167,6 +169,23 @@ int wxGetSingleChoiceIndex( const wxString& message,
     return choice;
 }
 
     return choice;
 }
 
+int wxGetSingleChoiceIndex( const wxString& message,
+                            const wxString& caption,
+                            const wxArrayString& aChoices,
+                            wxWindow *parent,
+                            int x, int y,
+                            bool centre,
+                            int width, int height)
+{
+    wxString *choices;
+    int n = ConvertWXArrayToC(aChoices, &choices);
+    int res = wxGetSingleChoiceIndex(message, caption, n, choices, parent,
+                                     x, y, centre, width, height);
+    delete [] choices;
+
+    return res;
+}
+
 #ifdef WXWIN_COMPATIBILITY_2
 // Overloaded for backward compatibility
 int wxGetSingleChoiceIndex( const wxString& message,
 #ifdef WXWIN_COMPATIBILITY_2
 // Overloaded for backward compatibility
 int wxGetSingleChoiceIndex( const wxString& message,
@@ -506,3 +525,5 @@ bool wxMultiChoiceDialog::TransferDataFromWindow()
 
     return TRUE;
 }
 
     return TRUE;
 }
+
+#endif // wxUSE_CHOICEDLG