Mercurial > dwindows
changeset 1910:000a94a1ddc1
Fix a couple issues revealed by upgrading to Visual Studion 2015...
Fixed a problem with wide strings via _snprintf() in dw_window_get_font().
Fixed a problem on x64 with dw_named_memory_new() by using constant.
Added compatibility info to the manifests to support Windows 10.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 06 Oct 2015 02:56:46 +0000 |
parents | cb5f9aa9aebb |
children | 102fca5f2e19 |
files | win/dw.c win/dw.dll.x64.manifest win/dw.dll.x86.manifest win/dwtest.exe.x64.manifest win/dwtest.exe.x86.manifest |
diffstat | 5 files changed, 60 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Sat Sep 19 10:47:46 2015 +0000 +++ b/win/dw.c Tue Oct 06 02:56:46 2015 +0000 @@ -2861,7 +2861,7 @@ DW_GREEN_VALUE(back), DW_BLUE_VALUE(back))); SelectObject((HDC)mp1, thiscinfo->hbrush); - return (LONG)(intptr_t)thiscinfo->hbrush; + return (LRESULT)(intptr_t)thiscinfo->hbrush; } } #ifdef AEROGLASS @@ -2882,7 +2882,7 @@ DeleteObject(thiscinfo->hbrush); thiscinfo->hbrush = CreateSolidBrush(_dw_transparencykey); SelectObject((HDC)mp1, thiscinfo->hbrush); - return (LONG)thiscinfo->hbrush; + return (LRESULT)thiscinfo->hbrush; } } } @@ -4901,7 +4901,7 @@ italic = " Italic"; height = MulDiv(abs(lf.lfHeight), 72, GetDeviceCaps (hdc, LOGPIXELSY)); ReleaseDC(handle, hdc); - _snprintf( str, 100, "%d.%s%s%s", height, lf.lfFaceName, bold, italic ); + _snprintf( str, 100, "%d.%s%s%s", height, WideToUTF8(lf.lfFaceName), bold, italic ); } } if ( oldfont ) @@ -11310,7 +11310,7 @@ sa.lpSecurityDescriptor = &_dwsd; sa.bInheritHandle = FALSE; - handle = CreateFileMapping((HANDLE)0xFFFFFFFF, &sa, PAGE_READWRITE, 0, size, UTF8toWide(name)); + handle = CreateFileMapping(INVALID_HANDLE_VALUE, &sa, PAGE_READWRITE, 0, size, UTF8toWide(name)); if(!handle) return 0;
--- a/win/dw.dll.x64.manifest Sat Sep 19 10:47:46 2015 +0000 +++ b/win/dw.dll.x64.manifest Tue Oct 06 02:56:46 2015 +0000 @@ -7,6 +7,20 @@ type="win32" /> <description>Dynamic Windows</description> +<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Windows 10 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + <!-- Windows 8.1 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + <!-- Windows Vista --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!-- Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + <!-- Windows 8 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + </application> +</compatibility> <dependency> <dependentAssembly> <assemblyIdentity
--- a/win/dw.dll.x86.manifest Sat Sep 19 10:47:46 2015 +0000 +++ b/win/dw.dll.x86.manifest Tue Oct 06 02:56:46 2015 +0000 @@ -7,6 +7,20 @@ type="win32" /> <description>Dynamic Windows</description> +<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Windows 10 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + <!-- Windows 8.1 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + <!-- Windows Vista --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!-- Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + <!-- Windows 8 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + </application> +</compatibility> <dependency> <dependentAssembly> <assemblyIdentity
--- a/win/dwtest.exe.x64.manifest Sat Sep 19 10:47:46 2015 +0000 +++ b/win/dwtest.exe.x64.manifest Tue Oct 06 02:56:46 2015 +0000 @@ -7,6 +7,20 @@ type="win32" /> <description>Dynamic Windows Test</description> +<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Windows 10 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + <!-- Windows 8.1 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + <!-- Windows Vista --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!-- Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + <!-- Windows 8 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + </application> +</compatibility> <dependency> <dependentAssembly> <assemblyIdentity
--- a/win/dwtest.exe.x86.manifest Sat Sep 19 10:47:46 2015 +0000 +++ b/win/dwtest.exe.x86.manifest Tue Oct 06 02:56:46 2015 +0000 @@ -7,6 +7,20 @@ type="win32" /> <description>Dynamic Windows Test</description> +<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> + <application> + <!-- Windows 10 --> + <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> + <!-- Windows 8.1 --> + <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> + <!-- Windows Vista --> + <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> + <!-- Windows 7 --> + <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> + <!-- Windows 8 --> + <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> + </application> +</compatibility> <dependency> <dependentAssembly> <assemblyIdentity