OpenJDK / jdk / jdk
changeset 3242:928d499ce8b6
6489447: Apply the more robust fix for 6449933 to dolphin and 6ux
Reviewed-by: malenkov
author | rupashka |
---|---|
date | Tue, 07 Jul 2009 14:11:06 +0400 |
parents | 6fd229e009e7 |
children | 584da5a15e55 |
files | jdk/src/windows/native/sun/windows/ShellFolder2.cpp |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/jdk/src/windows/native/sun/windows/ShellFolder2.cpp Mon Jul 06 14:32:04 2009 +0400 +++ b/jdk/src/windows/native/sun/windows/ShellFolder2.cpp Tue Jul 07 14:11:06 2009 +0400 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -981,6 +981,15 @@ hBitmap = (HBITMAP)LoadImage(libShell32, IS_WINVISTA ? TEXT("IDB_TB_SH_DEF_16") : MAKEINTRESOURCE(216), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); + + if (hBitmap == NULL) { + // version of shell32.dll doesn't match OS version. + // So we either are in a Vista Compatibility Mode + // or shell32.dll was copied from OS of another version + hBitmap = (HBITMAP)LoadImage(libShell32, + IS_WINVISTA ? MAKEINTRESOURCE(216) : TEXT("IDB_TB_SH_DEF_16"), + IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); + } } if (hBitmap == NULL) { libComCtl32 = LoadLibrary(TEXT("comctl32.dll"));