diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index a88672e6..cc5c6660 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1236,18 +1236,19 @@ static void FORCE_INLINE NSISCALL RefreshComponents(HWND hwTree, HTREEITEM *item TreeView_SetItem(hwTree, &item); } - // workaround for bug #1397031 + // workaround for bug #1397031 A.K.A #434 // - // windows 95 doesn't erase the background of the state image - // before it draws a new one. because of this parts of the old + // Windows 95 & NT4 doesn't erase the background of the state image + // before it draws a new one. Because of this parts of the old // state image will show where the new state image is masked. // - // to solve this, the following line forces the background to - // be erased. sadly, this redraws the entire control. it might + // To solve this, the following line forces the background to + // be erased. sadly, this redraws the entire control. It might // be a good idea to figure out where the state images are and // redraw only those. - InvalidateRect(hwTree, NULL, TRUE); + if (IsWin95NT4()) // Checking for < IE4 is probably better but more work + InvalidateRect(hwTree, NULL, TRUE); } int NSISCALL TreeGetSelectedSection(HWND tree, BOOL mouse) diff --git a/Source/exehead/util.h b/Source/exehead/util.h index b8b3696a..51f272d2 100644 --- a/Source/exehead/util.h +++ b/Source/exehead/util.h @@ -69,6 +69,7 @@ void NSISCALL myRegGetStr(HKEY root, const TCHAR *sub, const TCHAR *name, TCHAR extern DWORD g_WinVer; // GetVersion() +#define IsWin95NT4() ( sizeof(void*) == 4 && LOBYTE(g_WinVer) == 0x04 ) #define NSIS_WINVER_WOW64FLAG ( sizeof(void*) > 4 ? ( 0 ) : ( 0x40000000 ) ) #define IsWow64() ( sizeof(void*) > 4 ? ( FALSE ) : ( g_WinVer & NSIS_WINVER_WOW64FLAG ) ) #define SystemSupportsAltRegView() ( sizeof(void*) > 4 ? ( TRUE ) : ( IsWow64() ) )