From 18134a1cd0b9e36e49f7972f91d2d3becd7e781c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 20 Nov 2001 17:01:17 +0000 Subject: [PATCH] fix for BC++ internal compiler error git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/image/image.cpp | 53 ++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/samples/image/image.cpp b/samples/image/image.cpp index 71540921bc..706be54393 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -66,8 +66,35 @@ private: DECLARE_EVENT_TABLE() }; + +const int nChoices = 8 ; +static const wxString bppchoices[nChoices] = +{ + "1 bpp color", + "1 bpp B&W", + "4 bpp color", + "8 bpp color", + "8 bpp greyscale", + "8 bpp red", + "8 bpp own palette", + "24 bpp" +}; + +static const int bppvalues[nChoices] = +{ + wxBMP_1BPP, + wxBMP_1BPP_BW, + wxBMP_4BPP, + wxBMP_8BPP, + wxBMP_8BPP_GREY, + wxBMP_8BPP_RED, + wxBMP_8BPP_PALETTE, + wxBMP_24BPP +}; + // MyFrame + class MyFrame: public wxFrame { public: @@ -106,33 +133,9 @@ public: { wxImage image(m_bitmap); - static const wxString bppchoices[8] = - { - "1 bpp color", - "1 bpp B&W", - "4 bpp color", - "8 bpp color", - "8 bpp greyscale", - "8 bpp red", - "8 bpp own palette", - "24 bpp" - }; - - static const int bppvalues[WXSIZEOF(bppchoices)] = - { - wxBMP_1BPP, - wxBMP_1BPP_BW, - wxBMP_4BPP, - wxBMP_8BPP, - wxBMP_8BPP_GREY, - wxBMP_8BPP_RED, - wxBMP_8BPP_PALETTE, - wxBMP_24BPP - }; - int bppselection = wxGetSingleChoiceIndex("Set BMP BPP", "Set BMP BPP", - WXSIZEOF(bppchoices), + nChoices, bppchoices, this); if ( bppselection == -1 ) -- 2.45.2