[Bug 4004] New: InsertMenuItem, GetMenuString fails with MFT_OWNERDRAW

Wine Bugs wine-bugs at winehq.org
Mon Dec 5 19:20:08 CST 2005


http://bugs.winehq.org/show_bug.cgi?id=4004

           Summary: InsertMenuItem, GetMenuString fails with MFT_OWNERDRAW
           Product: Wine
           Version: 0.9.1.
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P4
         Component: wine-gui
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: andrew7webb at comcast.net


A Menu item containing a string, which is also owner drawn cannot be retrieved 
with GetMenuString.

A very short C program (attached) will work on windows but fail on wine.

The crucial code is:

MENUITEMINFO mii;
mii.fMask= MIIM_FTYPE | MIIM_STRING;
mii.fType= MFT_OWNERDRAW;
...
if ( InsertMenuItem( hMenu, uItem, fByPosition, &mii ) ) {
	if ( GetMenuString( hMenu, uItem, strback, 99, MF_BYPOSITION ) ) {
		MessageBox( 0, "GetMenuString worked.", strback, MB_OK );
	} else {
		MessageBox( 0, "GetMenuString failed.", title, MB_OK );	
	}

GetMenuString will fail on wine, but succeed on windows.


After examining the problem , it appears that the relevant source code is the 
function SetMenuItemInfo_common, the function GetMenuStringA, and the macro 
IS_STRING_ITEM in user/menu.c  The concept of having a string and the 
MF_OWNERDRAW specified seems to cause trouble in the macro.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list