Fix menu with MIIM_IMAGE style
maxime.bellenge at wanadoo.fr
Sun May 8 07:55:35 CDT 2005
I found that my previous patch to add support for MIIM_BITMAP was not
totally correct. It didn't take into account when not all items were
having the flag set. Now Winzip menues are looking as they should.
It has been reported a regression with my last patch by Timm Reasbeck
with TablEdit Demo. If you take revision 1.18 of menu.c (the one without
my patch). The "File" menu of tabledit displays an "import" item. With
my patch it was no longer visible. However, I discovered that if you
simply add a field to the internal POPUPMENU structure which make the
structure be 64 bytes long, the application no longer displays the
"import" item. Any other length don't expose this behavior.
I thought it might be related to LOCAL_Alloc doing bad things when
allocating 64bytes (used in CreateMenu), but IMHO, after testing many
applications I don't think. So I assume tabledit is doing something with
the HMENU but I haven't found what.
This is why there is a DWORD unused in the structure. I tried putting
the unused variable everywhere is the structure and the application
works. To sum up every size different from 64 bytes long make the
application work. The behavior is only present with this application,
all the other ones I have tested work with a 64 byte long structure.
Alexandre I think you will not accept this patch, but I would really
appreciate your feedback and the one from anyone who may have an
* Fix MIIM_BITMAP handling when not all items of the menu have this
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2822 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050508/12e708c5/menu4.bin
More information about the wine-patches