Platform support for older Windows version (Windows NT 3.5/4.0, Win2k and Windows XP)
Opened this issue · 0 comments
Discussed in #29
Originally posted by chazste March 4, 2023
@davepl I have another idea to shave a few bytes from tiny original by deleting a function call. But after a little thought I realized that the change would most likely keep the program from running correctly on anything prior to Windows Vista, but it definitely works fine on Windows 10 (and presumably 11, though I can't test that easily). So since I suspected it was broken on older versions of Windows I reached out my left hand and turned on my Win2k laptop (yes I am one of THOSE people). So as is TinyOriginal.exe does not run on Win2k at all. It exits when the call to CreateWindowEx fails. This is true on Windows XP as well.
So my question is would you prefer the fix for Win2k, or a slightly smaller TinyOriginal that runs correctly on Win 10? Specifically the proposed change would be to not call GetClientRect and use the rcPaint from the paint struct. This depends on DWM and the compositor which is why I believed it would render incorrectly on Windows versions prior to Vista. (Or is it 7, I never used Vista)
As an aside while investigating the behavior on Win2k I actually read the docs for WNDCLASSEXA and discovered that COLOR_3DSHADOW is not a valid HBRUSH to pass to RegisterClassEx. It does seem to work but its not in the contract 😃