A second tutorial: Part 7 Tidy up

This tutorial makes a  simple wxWidgets program to edit XPM format files

Tidy the program up...

My code is here Things you may like to try Manipulating the toolbar
You can create a toolbar, with bitmaps by  choosing a menu zone replica of a menu item, right clicking it and choose Add to Toolbar

Use the program to create a couple of 16x16 images. Use them to replace the toolbar images, by right clicking on the toolbar images, and choosing Change Image. Watch the statusbar to help identify the command which will be executed by the toolbar bitmaps
 

Add to code to Load / Save other icon types
wxWidgets will read/write a whole range of image files, including MS-Windows format icons.
To Load different types of files, the code just needs to be changed in one line of the wxFileDialog code, like this....
    wxFileDialog dialog(this, "Open as", "", myFilename,
        "MS Icon files (*.ico)|*.ico|MS Cursor files (*.cur)|*.cur|XPM files (*.xpm)|*.xpm|All files (*.*)|*.*",
        wxOPEN); // for opening files
 

The wxImage Handlers will automatically detect and save in the correct file type
 

wxHatch Home link to wxhatch help index