"Ann & Jason Edmeades" us@edmeades.me.uk wrote:
In the case of ownerdraw -> string -> ownerdraw, the calls do indeed work and keep the saved string. Debugging on windows seems to show the string is copied and saved as well, which concurs with the rest of the patch.
The fix (rather than the tests) is still accurate for this as far as I can tell.
Attached is new patch, which checks the rc of the SetMenuItemInfo (and InsertMenuItem) calls...
The fact that you need to intorduce the txtWasAllocated flag suggests that something is wrong. Also MF_OWNERDRAW certainly does not qualify as a MF_STRING alias. I'll try to play with your test case and see if I can find a better fix.