WIN95/NT4 PROBLEMS WITH 7zFM MENU (LANGUAGE &
POPUP) PATCHED!
Since 7-zip seems to be built with WINVER > 0x0400
(and a Win32 SDK newer than the one shipped with
Visual Studio 6.0), strange incompatibilities were
introduced in 7-zip File Manager by MyLoadMenu.cpp:
menu language translation didn't work on Windows 95
and NT 4.0 (even with SP6); and the "File" menu
contained the (few) Explorer context-menu items only.
It all depends on the MIIM_STRING and MIIM_FTYPE
defines, that aren't recognized by version of Windows
prior to 4.10 (Win98).
Reading WINUSER.H, it seems that these two defines
can be safely replaced with MIIM_TYPE, letting
SetItemInfo() correctly change the MENUITEMINFO-
>dwTypeData even on those "old" O.S.es...
Patch for v. 4.08b follows (I hope it will work fine on
Windows 98/2000/ME/XP/2003, too!).
=CUT==CUT==CUT==CUT==CUT==CUT==CUT==CUT==C
UT==CUT==CUT==CUT==CUT==CUT==CUT=
--- MyLoadMenu.cpp Fri Oct 08 14:44:57 2004
+++ OLD\MyLoadMenu.cpp Sat Sep 25 00:30:22 2004
@@ -200,7 +200,7 @@
MENUITEMINFO menuInfo;
ZeroMemory(&menuInfo, sizeof(menuInfo));
menuInfo.cbSize = sizeof(menuInfo);
- menuInfo.fMask = MIIM_TYPE | MIIM_SUBMENU |
MIIM_ID;
+ menuInfo.fMask = MIIM_STRING | MIIM_SUBMENU |
MIIM_ID;
menuInfo.fType = MFT_STRING;
const int kBufferSize = 1024;
TCHAR buffer[kBufferSize + 1];
@@ -252,7 +252,7 @@
newString += shorcutString.Mid(tabPos);
}
menuInfo.dwTypeData = (LPTSTR)(LPCTSTR)
newString;
- menuInfo.fMask = MIIM_TYPE;
+ menuInfo.fMask = MIIM_STRING;
menu.SetItemInfo(i, true, &menuInfo);
// HMENU subMenu = menu.GetSubMenu(i);
}
@@ -306,7 +306,7 @@
MENUITEMINFO menuInfo;
ZeroMemory(&menuInfo, sizeof(menuInfo));
menuInfo.cbSize = sizeof(menuInfo);
- menuInfo.fMask = MIIM_STATE | MIIM_ID |
MIIM_TYPE;
+ menuInfo.fMask = MIIM_STATE | MIIM_ID |
MIIM_FTYPE | MIIM_STRING;
menuInfo.fType = MFT_STRING;
const int kBufferSize = 1024;
TCHAR buffer[kBufferSize + 1];
@@ -466,7 +466,7 @@
menuInfo.dwTypeData = (LPTSTR)(LPCTSTR)
menuString;
*/
- menuInfo.fMask = MIIM_STATE | MIIM_ID |
MIIM_TYPE;
+ menuInfo.fMask = MIIM_STATE | MIIM_ID |
MIIM_FTYPE | MIIM_STRING;
menuInfo.fType = MFT_STRING;
const int kBufferSize = 1024;
TCHAR buffer[kBufferSize + 1];
=CUT==CUT==CUT==CUT==CUT==CUT==CUT==CUT==C
UT==CUT==CUT==CUT==CUT==CUT==CUT=
P.S. Statically linking 7zFM.exe with HTMLHELP.lib makes
it certainly incompatible with original versions of
Windows 95 and Windows NT 4.0 (HTMLHELP.DLL was
first provided with ActiveDesktop/IE4 update).
Logged In: YES
user_id=65083
> P.S. Statically linking 7zFM.exe with HTMLHELP.lib makes
it certainly incompatible with original versions of
Windows 95 and Windows NT 4.0 (HTMLHELP.DLL was
first provided with ActiveDesktop/IE4 update).
Why?
Seems 7-zip doesn't refer to HTMLHELP.DLL statically.