win95/unicode

Chris January chris at atomice.net
Wed Nov 10 15:13:58 CET 2004


> When compiling for win95 we must remove all higher stuff.
> So, are the definitions in qt_windows.h really necessary?
> 
> I think they don't depend on the _MSC_VER marco, all the 
> macros are defined in the SDK headers
> 
>    - SPI_GETKEYBOARDCUES in WinUser.h: #if(WINVER >= 0x0500)
>    - WM_MOUSEWHEEL       in WinUser.h: #if (_WIN32_WINNT >= 
> 0x0400) || (_WIN32_WINDOWS > 0x0400)
>    - WM_MOUSEHOVER       in WinUser.h: #if((_WIN32_WINNT >= 
> 0x0400) || (WINVER >= 0x0500))
>    - WM_MOUSELEAVE       in WinUser.h: #if((_WIN32_WINNT >= 
> 0x0400) || (WINVER >= 0x0500))
> 
> With the correct target platform settings the extra 
> definitions could be avoided:
> 
> Minimum system required    Macros to define
> 
> Windows Server 2003       _WIN32_WINNT=0x0502
>                                  WINVER=0x0502
> 
> Windows XP                _WIN32_WINNT=0x0501
>                                  WINVER=0x0501
> 
> Windows 2000              _WIN32_WINNT=0x0500
>                                  WINVER=0x0500
> 
> Windows NT 4.0            _WIN32_WINNT=0x0400
>                                  WINVER=0x0400
> 
> Windows Me               _WIN32_WINDOWS=0x0500
>                                  WINVER=0x0500
> 
> Windows 98              _WIN32_WINDOWS=0x0410
>                                  WINVER=0x0410
> 
> Windows 95              _WIN32_WINDOWS=0x0400
>                                  WINVER=0x0400
> 
> (  
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/winprog/winprog/using_the_windows_headers.asp  )
> 
> 
> It works with the SDK; other should check it for their setup, 
> especially for mingw.
> 
> Attached is are patches to compile for win95 with the
> Macros:
>   _WIN32_WINDOWS=0x0400
>   WINVER=0x0400
>   with and without UNICODE

I'd rather the same binary ran on all Windows platforms rather than
providing separate binaries for different platforms. With the scheme you
have suggested above I must compile one binary for Windows 95 with
WINVER=0x0400 and another for Windows XP with WINVER=0x0501 to use WinXP
features. IMHO, we should define WINVER and _WIN32_WINDOWS to the highest
possible values, but then conditionally use the new features in later
versions depending on the version of Windows we are running on.

Chris



More information about the kde-cygwin mailing list