shell32: Get rid of the internal _InsertMenuItem function.
This commit is contained in:
parent
cf8c1d60a1
commit
7a4e3a1011
|
@ -172,9 +172,6 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16,LPCSTR,UINT16,WORD);
|
|||
BOOL16 WINAPI ShellAbout16(HWND16,LPCSTR,LPCSTR,HICON16);
|
||||
BOOL16 WINAPI AboutDlgProc16(HWND16,UINT16,WPARAM16,LPARAM);
|
||||
|
||||
void WINAPI _InsertMenuItem (HMENU hmenu, UINT indexMenu, BOOL fByPosition,
|
||||
UINT wID, UINT fType, LPCSTR dwTypeData, UINT fState);
|
||||
|
||||
static inline BOOL SHELL_OsIsUnicode(void)
|
||||
{
|
||||
/* if high-bit of version is 0, we are emulating NT */
|
||||
|
|
|
@ -768,9 +768,21 @@ static void ShellView_MergeFileMenu(IShellViewImpl * This, HMENU hSubMenu)
|
|||
|
||||
if(hSubMenu)
|
||||
{ /*insert This item at the beginning of the menu */
|
||||
_InsertMenuItem(hSubMenu, 0, TRUE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
|
||||
_InsertMenuItem(hSubMenu, 0, TRUE, IDM_MYFILEITEM, MFT_STRING, "dummy45", MFS_ENABLED);
|
||||
MENUITEMINFOA mii;
|
||||
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE;
|
||||
mii.wID = 0;
|
||||
mii.fType = MFT_SEPARATOR;
|
||||
InsertMenuItemA(hSubMenu, 0, TRUE, &mii);
|
||||
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.dwTypeData = (LPSTR)"dummy45";
|
||||
mii.fState = MFS_ENABLED;
|
||||
mii.wID = IDM_MYFILEITEM;
|
||||
mii.fType = MFT_STRING;
|
||||
InsertMenuItemA(hSubMenu, 0, TRUE, &mii);
|
||||
}
|
||||
TRACE("--\n");
|
||||
}
|
||||
|
@ -788,9 +800,13 @@ static void ShellView_MergeViewMenu(IShellViewImpl * This, HMENU hSubMenu)
|
|||
MENUITEMINFOA mii;
|
||||
static char view[] = "View";
|
||||
|
||||
_InsertMenuItem(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, 0, MFT_SEPARATOR, NULL, MFS_ENABLED);
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE;
|
||||
mii.wID = 0;
|
||||
mii.fType = MFT_SEPARATOR;
|
||||
InsertMenuItemA(hSubMenu, FCIDM_MENU_VIEW_SEP_OPTIONS, FALSE, &mii);
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA;
|
||||
mii.fType = MFT_STRING;
|
||||
|
|
|
@ -177,38 +177,7 @@ static ULONG WINAPI ISvItemCm_fnRelease(IContextMenu2 *iface)
|
|||
return refCount;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* ICM_InsertItem()
|
||||
*/
|
||||
void WINAPI _InsertMenuItem (
|
||||
HMENU hmenu,
|
||||
UINT indexMenu,
|
||||
BOOL fByPosition,
|
||||
UINT wID,
|
||||
UINT fType,
|
||||
LPCSTR dwTypeData,
|
||||
UINT fState)
|
||||
{
|
||||
MENUITEMINFOA mii;
|
||||
|
||||
ZeroMemory(&mii, sizeof(mii));
|
||||
mii.cbSize = sizeof(mii);
|
||||
if (fType == MFT_SEPARATOR)
|
||||
{
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE;
|
||||
}
|
||||
else
|
||||
{
|
||||
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
|
||||
mii.dwTypeData = (LPSTR) dwTypeData;
|
||||
mii.fState = fState;
|
||||
}
|
||||
mii.wID = wID;
|
||||
mii.fType = fType;
|
||||
InsertMenuItemA( hmenu, indexMenu, fByPosition, &mii);
|
||||
}
|
||||
|
||||
static void WINAPI _InsertMenuItemW (
|
||||
static void _InsertMenuItemW (
|
||||
HMENU hmenu,
|
||||
UINT indexMenu,
|
||||
BOOL fByPosition,
|
||||
|
|
Loading…
Reference in New Issue