ppescher / resizablelib

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

Fix comment, and suppress warning. #8

Closed irwir closed 5 years ago

irwir commented 5 years ago

This was the only warning when compiling the library, and suppression for one method was enough.

ppescher commented 5 years ago

Hi, just back from some vacations... I was reading about the GetVersionEx API deprecation. Not sure what is the correct way to handle this... does the API still return what the library expects?

irwir commented 5 years ago

Hi. Vacation was good, I hope.

The proper way to handle the deprecation depends on desired backward compatibility.

The library code tried to handle small differences in old Windows versions, and starting from Windows XP these checks probably could be dropped. That would be even more relevant for VS 2013 and later which could target only for Windows XP and above.

Pragma was the cheapest way to suppress the warning and keep whatever was left from backward compatibility. The old API call in this respect is good enough, while non-deprecated API did not exist in Windows XP.

ppescher commented 5 years ago

Hi irwir, Vacation was good, thanks. I had some good walking on the Dolomites mountains.

I'm not sure whether I want to embark in a review of all the compatibility checks and workarounds I used in this library. The code base is very old, I guess I had Windows 2000 when I first started and ther is no way I could verify proper behavior again on old platforms, but I would like to keep compatibility at least with Windows XP. So I guess it will stay as it is for now. Even if this may change in the future.

irwir commented 5 years ago

no way I could verify proper behavior again on old platforms

It is possible with virtual machines, but quite pointless in many cases. Old VS do not mix well with new Windows, and new VS would not install in Windws XP. Of course, no explicit support for old systems could be promised without proper testing.

For example, out-of-the-box version 1.3 in VC++ 6.0. Workspace or project files would not even be opened correctly, and recreated project did not compile. It was compiling in VS 2003 years ago, but I do not have that old Studio installed to try the latest code. Minor changes might be required, even though newer features, such as initializers in declarations, were avoided intentionally.

ppescher commented 5 years ago

I was thinking about run-time compatibility. I surely don't pretend to be able to build and debug with VC++ 6.0 anymore. But having Windows XP still supported at run-time is something I'd like to keep.