| Version: 3.2.2

Classes | Macros
bmpbndl.h File Reference

## Classes

class | wxBitmapBundle
| Contains representations of the same bitmap in different resolutions. More...
class | wxBitmapBundleImpl
| Base class for custom implementations of wxBitmapBundle. More...

## Macros

#define | wxBITMAP_BUNDLE_2(name)
| Creates a wxBitmapBundle from resources on the platforms supporting them or from two embedded bitmaps otherwise. More...

## Macro Definition Documentation

## ◆ wxBITMAP_BUNDLE_2

#define wxBITMAP_BUNDLE_2 | ( |  | name | ) |

Creates a wxBitmapBundle from resources on the platforms supporting them or from two embedded bitmaps otherwise.

This macro use wxBitmapBundle::FromResources() with the provide name, which must be an identifier and not a string, i.e. used without quotes, on the platforms where it works and wxBitmapBundle::FromBitmaps() with `name_png` and `name_2x_png` arrays containing PNG data elsewhere.

Using it allows to avoid using preprocessor checks in the common case when just two bitmaps (for standard and high DPI) are embedded in the application code. Note that all bitmaps defined in the resources, even if there are more than 2 of them.

Example of use:

toolBar->AddTool(wxID_OPEN, wxBITMAP_BUNDLE_2(open));
wxBITMAP_BUNDLE_2
#define wxBITMAP_BUNDLE_2(name)
Creates a wxBitmapBundle from resources on the platforms supporting them or from two embedded bitmaps...
Definition: bmpbndl.h:645
wxID_OPEN
@ wxID_OPEN
Definition: defs.h:606

Include file:

    #include <wx/bmpbndl.h>

Since
  3.1.6