X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9f84eccdeaf8e3706f7861ce19da3a256814d83e..733f45ceb697d6d1f9eaece7bda9b926ea9ba59a:/samples/artprov/artbrows.cpp?ds=sidebyside diff --git a/samples/artprov/artbrows.cpp b/samples/artprov/artbrows.cpp index 66d967ee0e..6ecf00a297 100644 --- a/samples/artprov/artbrows.cpp +++ b/samples/artprov/artbrows.cpp @@ -96,6 +96,7 @@ static void FillBitmaps(wxImageList *images, wxListCtrl *list, ART_ICON(wxART_NORMAL_FILE) ART_ICON(wxART_TICK_MARK) ART_ICON(wxART_CROSS_MARK) + ART_ICON(wxART_MISSING_IMAGE) } @@ -106,47 +107,46 @@ static void FillBitmaps(wxImageList *images, wxListCtrl *list, #include "null.xpm" BEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog) - EVT_LIST_ITEM_SELECTED(-1, wxArtBrowserDialog::OnSelectItem) - EVT_CHOICE(-1, wxArtBrowserDialog::OnChooseClient) + EVT_LIST_ITEM_SELECTED(wxID_ANY, wxArtBrowserDialog::OnSelectItem) + EVT_CHOICE(wxID_ANY, wxArtBrowserDialog::OnChooseClient) END_EVENT_TABLE() wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent) - : wxDialog(parent, -1, _T("Art resources browser"), - wxDefaultPosition, wxDefaultSize, + : wxDialog(parent, wxID_ANY, _T("Art resources browser"), + wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) { wxSizer *sizer = new wxBoxSizer(wxVERTICAL); wxSizer *subsizer; - - wxChoice *choice = new wxChoice(this, -1); + + wxChoice *choice = new wxChoice(this, wxID_ANY); FillClients(choice); - + subsizer = new wxBoxSizer(wxHORIZONTAL); - subsizer->Add(new wxStaticText(this, -1, _T("Client:")), 0, wxALIGN_CENTER_VERTICAL); + subsizer->Add(new wxStaticText(this, wxID_ANY, _T("Client:")), 0, wxALIGN_CENTER_VERTICAL); subsizer->Add(choice, 1, wxLEFT, 5); sizer->Add(subsizer, 0, wxALL | wxEXPAND, 10); subsizer = new wxBoxSizer(wxHORIZONTAL); - - m_list = new wxListCtrl(this, -1, wxDefaultPosition, wxSize(250, 300), + + m_list = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(250, 300), wxLC_REPORT | wxSUNKEN_BORDER); m_list->InsertColumn(0, _T("wxArtID")); subsizer->Add(m_list, 1, wxEXPAND | wxRIGHT, 10); - + wxSizer *subsub = new wxBoxSizer(wxVERTICAL); - m_canvas = new wxStaticBitmap(this, -1, wxBitmap(null_xpm)); + m_canvas = new wxStaticBitmap(this, wxID_ANY, wxBitmap(null_xpm)); subsub->Add(m_canvas); subsub->Add(100, 100); subsizer->Add(subsub); sizer->Add(subsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 10); - + wxButton *ok = new wxButton(this, wxID_OK, _T("Close")); ok->SetDefault(); sizer->Add(ok, 0, wxALIGN_RIGHT | wxALL, 10); - + SetSizer(sizer); - SetAutoLayout(TRUE); sizer->Fit(this); choice->SetSelection(6/*wxART_MESSAGE_BOX*/); @@ -157,7 +157,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent) void wxArtBrowserDialog::SetArtClient(const wxArtClient& client) { wxBusyCursor bcur; - + wxImageList *img = new wxImageList(16, 16); img->Add(wxIcon(null_xpm)); int index = 0;