ppescher / resizablelib

A set of MFC classes to easily make resizable windows
Other
55 stars 27 forks source link

InitThemeSettings can be simplyfied on Vista and later ... #22

Closed 0ric1 closed 4 years ago

0ric1 commented 4 years ago

The function InitThemeSettings in ResizableVersion.cpp can be simplyfied on Vista and later, because GetThemeAppProperties and IsAppThemed is available:

` ... if (!IsAppThemed()) return;

real_ThemeSettings = GetThemeAppProperties(); ... `

irwir commented 4 years ago

The gain is insignificant, but breaks compatibility with earlier Windows versions.

ppescher commented 4 years ago

I know old Windows versions are no longer supported by Microsoft, but I would like to keep compatibility when possible.

0ric1 commented 4 years ago

You could add #if WINVER >= _WIN32_WINNT_WIN6 than new code else old code.

irwir commented 4 years ago

POSReady was obsoleted only in April of 2019, while VS2017 is still getting updates and still can build for XP.

@Blonder

You could add #if WINVER >= _WIN32_WINNT_WIN6 than new code else old code.

It was already taken care of programmatically in the existing code. Conditional compilation would mean adding more source lines while trying to save a handful of bytes in binary code.