[bug 4004] MenuItemInfo vs GetMenuString - Try 2

Rein Klazes wijn at wanadoo.nl
Fri Dec 30 06:12:32 CST 2005


On Mon, 26 Dec 2005 21:50:54 -0000, you wrote:

>Glancing through the patch, I see what you are trying to do, and some
>comments (and remember this is just from a glance so far)
>
>1. I'm not sure the MENU_SetItemData for the ownerdraw case is correct as it
>doesn't actually take a copy of the data, it saves the pointer. I'm pretty
>sure Windows would take a copy (It does when inserting). In fact the
>ownerdraw code doesn't set text, just dwitemdata in this routine

I do not understand where the problem is. As you say, In the ownerdraw
case only the dwItemData field is filled, which is not supposed to be a
pointer to something the code should know or care about.

>
>2. SetMenuItemInfo_common, In the MIIM_TYPE case for ownerdraw - You would
>lose the dwtypedata value for ownerdraw with text

Yup that bit was suspect but my testing framework was not able to test
that. Now it is and indeed the text is preserved, unless new text
overwrites it.

>3. Unrelated but just spotted, GetMenuItemInfo_common doesn't return
>dwTypeData for ownerdraw what TYPE is used, can we add a test to confirm
>that?

Tests added, I could not find anything wrong with the behavior.

I have sent the updated patch to wine-patches this time. 

Rein.



More information about the wine-devel mailing list