Add support for loading wxIconBundle from MS Windows resource

This commit is contained in:
pbfordev
2017-05-18 22:51:01 +02:00
parent 2893f894ab
commit 062f7c4137
3 changed files with 114 additions and 0 deletions

View File

@@ -58,6 +58,11 @@ public:
// initializes the bundle with a single icon
wxIconBundle(const wxIcon& icon);
#ifdef __WINDOWS__
// initializes the bundle with the icons from a group icon stored as an MS Windows resource
wxIconBundle(const wxString& resourceName, WXHINSTANCE module);
#endif
// default copy ctor and assignment operator are OK
// adds all the icons contained in the file to the collection,
@@ -70,6 +75,11 @@ public:
void AddIcon(wxInputStream& stream, wxBitmapType type = wxBITMAP_TYPE_ANY);
#endif // wxUSE_STREAMS && wxUSE_IMAGE
#ifdef __WINDOWS__
// loads all the icons from a group icon stored in an MS Windows resource
void AddIcon(const wxString& resourceName, WXHINSTANCE module);
#endif
// adds the icon to the collection, if the collection already
// contains an icon with the same width and height, it is
// replaced