Use wxHAS_IMAGES_IN_RESOURCES instead of explicit platform checks.
Add a special symbol which is defined only if the icons and other images (e.g. cursor) are in the separate resource files and don't need to be embedded as XPMs in the main program. This makes the checks more clear and more customizable as it's enough to change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform checks. Closes #14050. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -160,14 +160,18 @@ enum wxStockCursor
|
||||
// macros
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#if defined(__WINDOWS__) || defined(__WXPM__)
|
||||
#define wxHAS_IMAGES_IN_RESOURCES
|
||||
#endif
|
||||
|
||||
/* Useful macro for creating icons portably, for example:
|
||||
|
||||
wxIcon *icon = new wxICON(sample);
|
||||
|
||||
expands into:
|
||||
|
||||
wxIcon *icon = new wxIcon("sample"); // On wxMSW
|
||||
wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK
|
||||
wxIcon *icon = new wxIcon("sample"); // On Windows
|
||||
wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK/Linux
|
||||
*/
|
||||
|
||||
#ifdef __WXMSW__
|
||||
|
Reference in New Issue
Block a user