wxBitmapBundle for wxMenuItem on MSW

This commit is contained in:
Alexander Koshelev
2022-01-28 16:28:18 +03:00
parent e5e9794607
commit 27be2ed641
6 changed files with 130 additions and 42 deletions

View File

@@ -69,6 +69,12 @@ public:
// containing this position.
bool MSWGetRadioGroupRange(int pos, int *start, int *end) const;
#if wxUSE_MENUBAR
virtual void Attach(wxMenuBarBase *menubar) wxOVERRIDE;
#endif
void SetupBitmaps();
#if wxUSE_ACCEL
// called by wxMenuBar to build its accel table from the accels of all menus
bool HasAccels() const { return !m_accels.empty(); }
@@ -220,6 +226,16 @@ protected:
// common part of all ctors
void Init();
void SetupBitmaps();
void OnDPIChanged(wxDPIChangedEvent& event)
{
// need to reset bitmaps
SetupBitmaps();
event.Skip();
}
WXHMENU m_hMenu;
// Return the MSW position for a wxMenu which is sometimes different from