Changeset 2ec802829059…
Parent d7c481716ff1…
by
Changes to 2 files · Browse files at 2ec802829059 Showing diff from parent d7c481716ff1 Diff from another changeset...
@@ -9,7 +9,7 @@ std::string menuText;
std::string helpText;
std::string iconName;
- int idCmd;
+ UINT idCmd;
} MenuDescription;
MenuDescription menuDescList[] = {
@@ -110,12 +110,12 @@};
typedef std::map<std::string, MenuDescription> MenuDescriptionMap;
-typedef std::map<int, MenuDescription> MenuIdCmdMap;
+typedef std::map<UINT, MenuDescription> MenuIdCmdMap;
MenuDescriptionMap MenuDescMap;
MenuIdCmdMap MenuIdMap;
-void AddMenuList(int idCmd, const std::string& name)
+void AddMenuList(UINT idCmd, const std::string& name)
{
TDEBUG_TRACE("AddMenuList: idCmd = " << idCmd << " name = " << name);
MenuIdMap[idCmd] = MenuDescMap[name];
@@ -137,7 +137,7 @@ MenuIdMap.clear();
}
-void InsertMenuItemWithIcon(HMENU hMenu, int indexMenu, int idCmd,
+void InsertMenuItemWithIcon(HMENU hMenu, UINT indexMenu, UINT idCmd,
const std::string& menuText, const std::string& iconName)
{
MENUITEMINFO mi;
@@ -162,7 +162,7 @@ InsertMenuItem(hMenu, indexMenu, TRUE, &mi);
}
-void InsertSubMenuItemWithIcon(HMENU hMenu, HMENU hSubMenu, int indexMenu, int idCmd,
+void InsertSubMenuItemWithIcon(HMENU hMenu, HMENU hSubMenu, UINT indexMenu, UINT idCmd,
const std::string& menuText, const std::string& iconName)
{
MENUITEMINFO mi;
@@ -188,8 +188,8 @@ InsertMenuItem(hMenu, indexMenu, TRUE, &mi);
}
-void InsertMenuItemByName(HMENU hMenu, const std::string& name, int indexMenu,
- int idCmd, int idCmdFirst)
+void InsertMenuItemByName(HMENU hMenu, const std::string& name, UINT indexMenu,
+ UINT idCmd, UINT idCmdFirst)
{
TDEBUG_TRACE("InsertMenuItemByName: name = " << name);
MenuDescriptionMap::iterator iter = MenuDescMap.find(name);
@@ -301,7 +301,7 @@ HMENU hSubMenu = CreatePopupMenu();
if (hSubMenu)
{
- int indexSubMenu = 0;
+ UINT indexSubMenu = 0;
for( walk = entries ; *walk != EndOfList ; walk++ )
{
if( *walk == Separator )
@@ -349,18 +349,19 @@}
STDMETHODIMP
-CShellExt::GetCommandString(UINT idCmd, UINT uFlags, UINT FAR *reserved,
+CShellExt::GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT FAR *reserved,
LPSTR pszName, UINT cchMax)
{
*pszName = 0;
char *psz;
+ UINT idCmdU = static_cast<UINT>(idCmd)
TDEBUG_TRACE("CShellExt::GetCommandString: idCmd = " << idCmd);
- MenuIdCmdMap::iterator iter = MenuIdMap.find(idCmd);
+ MenuIdCmdMap::iterator iter = MenuIdMap.find(idCmdU);
if (iter != MenuIdMap.end())
{
- TDEBUG_TRACE("CShellExt::GetCommandString: name = " << MenuIdMap[idCmd].name);
- psz = (char*)MenuIdMap[idCmd].helpText.c_str();
+ TDEBUG_TRACE("CShellExt::GetCommandString: name = " << MenuIdMap[idCmdU].name);
+ psz = (char*)MenuIdMap[idCmdU].helpText.c_str();
}
else
{
|
@@ -79,7 +79,7 @@ // IContextMenu3
STDMETHODIMP QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi);
- STDMETHODIMP GetCommandString(UINT idCmd, UINT uFlags, UINT FAR *reserved, LPSTR pszName, UINT cchMax);
+ STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT FAR *reserved, LPSTR pszName, UINT cchMax);
STDMETHODIMP HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam);
STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pResult);
|
Loading...