Implement loading resource bundle from Windows resources

This allows to use resources defined in the .rc files under MSW instead
of embedding them in the program text as arrays.
This commit is contained in:
Vadim Zeitlin
2021-09-25 00:49:15 +01:00
parent 97f6c85d9b
commit b33df7360a
15 changed files with 815 additions and 62 deletions

View File

@@ -244,6 +244,24 @@ wxBitmapBundle wxBitmapBundle::FromBitmaps(const wxVector<wxBitmap>& bitmaps)
return wxBitmapBundle(new wxBitmapBundleImplSet(bitmaps));
}
// MSW has its own, actually working, version, in MSW-specific code.
#ifndef __WXMSW__
/* static */
wxBitmapBundle wxBitmapBundle::FromResources(const wxString& WXUNUSED(name))
{
wxFAIL_MSG
(
"Loading bitmaps from resources not available on this platform, "
"don't use this function and call wxBitmapBundle::FromBitmaps() "
"instead."
);
return wxBitmapBundle();
}
#endif // __WXMSW__
wxSize wxBitmapBundle::GetDefaultSize() const
{
if ( !m_impl )