<Swing Dev> RFR: 6422025: ThemeReader.cpp can be updated for VC7

Sergey Bylokhov serb at openjdk.java.net
Fri Nov 6 22:13:00 UTC 2020


On Fri, 6 Nov 2020 18:17:30 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Some of the type definitions have been imported from `UxTheme.h` to the `ThemeReader.cpp` because at that time we supported the windows OS below XP as well as VC6.
>> 
>> It is time to use `UxTheme.h ` directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly.
>> 
>> mach5 is green
>
> src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp line 126:
> 
>> 124:         DTRACE_PRINTLN("Loaded UxTheme.dll\n");
>> 125:         OpenThemeDataFunc = (PFNOPENTHEMEDATA)GetProcAddress(hModThemes,
>> 126:                                                         "OpenThemeData");
> 
> Can't we use the functions directly? I mean we can link to `UxTheme.lib` and load the `UxTheme.dll` automatically.
> Dynamic loading was necessary for Windows versions before Windows XP where `UxTheme.dll` doesn't exist.

That's was my comment in the description about:

>  It is time to use UxTheme.h directly, note I did not change how we load this library(JDK_LoadSystemLibrary(), as suggested in the comments of the bug it is not necessary that the application will use the win L&F and it is not necessary to link it directly,

 also, the native win L&F is an optional thing.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1090


More information about the swing-dev mailing list