-#if USE_COLOURDLG_GENERIC
-void MyFrame::ChooseColourGeneric(wxCommandEvent& WXUNUSED(event))
-{
- wxColourData data;
- data.SetChooseFull(true);
- for (int i = 0; i < 16; i++)
- {
- wxColour colour(i*16, i*16, i*16);
- data.SetCustomColour(i, colour);
- }
-
- wxGenericColourDialog *dialog = new wxGenericColourDialog(this, &data);
- if (dialog->ShowModal() == wxID_OK)
- {
- wxColourData retData = dialog->GetColourData();
- wxColour col = retData.GetColour();
-// wxBrush *brush = wxTheBrushList->FindOrCreateBrush(&col, wxSOLID);
- myCanvas->SetBackgroundColour(col);
- myCanvas->ClearBackground();
- myCanvas->Refresh();
- }
- dialog->Destroy();
-}
-#endif // USE_COLOURDLG_GENERIC
-