[bug 4004] MenuItemInfo vs GetMenuString
Ann & Jason Edmeades
us at edmeades.me.uk
Fri Dec 23 17:37:12 CST 2005
The test program on the bug highlights that an owner draw menu items data
field is still interpreted and stored as a string, and that it only changes
then a call specifically changes that field. Therefore you can call
GetMenuString on an ownerdraw menu item and get a correctly ansi/Unicode
copy of the string.
Additionally it does mean that we cant rely on the current type to decide
whether to free the saved copy of the text, because you can go String ->
Bitmap (although it wouldn't make sense in practice), and hence the simplest
solution it to remember it it was allocated.
The attached patch resolves the reported problem and a couple of related
issues which got identified when I started testing the area to exercise my
new code (the same fix resolves them all). All pass under XP and wine (with
patch) but I haven't tried on any other windows version.
Copy and store the dwTypeData of a menu item even for a ownerdraw item, and
ensure the memory allocations/freeing occurs correctly
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10176 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20051223/1f251a25/4004.obj
More information about the wine-patches