#11244 closed defect (fixed)
Check menu item bug on Vista
Reported by: | malcompl | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | wxMSW | Version: | stable-latest |
Keywords: | wxMenu | Cc: | |
Blocked By: | Blocking: | ||
Patch: | yes |
Description
I found bug in menu on Windows Vista.
If we set the bitmaps to check item (bitmap with std or less size), changing status not change the bitmap, because function GetHBitmapForMenu always return HBITMAP for checked bitmap.
I attach small patch ;)
Index: src/msw/menu.cpp =================================================================== --- src/msw/menu.cpp (wersja 62133) +++ src/msw/menu.cpp (kopia robocza) @@ -399,7 +399,7 @@ pItem->SetBitmap(img, checked); } - return GetHbitmapOf(pItem->GetBitmap()); + return GetHbitmapOf(pItem->GetBitmap(checked)); } } #endif // wxUSE_IMAGE
Attachments (1)
Change History (7)
comment:1 Changed 12 years ago by malcompl
Changed 12 years ago by malcompl
comment:2 Changed 12 years ago by VZ
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 12 years ago by malcompl
Thanks for appiled, but what about rest patch, I mean first check if item is checkable and set bitmap before set hbmpItem?
comment:4 Changed 12 years ago by vadz
- Resolution fixed deleted
- Status changed from closed to reopened
Sorry, I didn't realize the attached patch was not the same one that you put inline so I just applied the part which I saw manually.
Will check in the rest (into ownerdraw-refactor branch) soon.
comment:5 Changed 12 years ago by VZ
- Resolution set to fixed
- Status changed from reopened to closed
comment:6 Changed 11 years ago by VZ
Note: See
TracTickets for help on using
tickets.
I updated patch to fix some other problem in checkable menu item with bitmaps.
Please apply this patch to owner-drawn branch too if it's is possible, I would be glad.