Loading ...
Sorry, an error occurred while loading the content.

Re: [path] Win32: fix gui calculations for VS2012 builds

Expand Messages
  • Ken Takata
    Hi, ... Same issue was discussed here: https://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
    Message 1 of 4 , Jul 18 3:38 PM

      2013/07/18 Thu 1:18:15 UTC+9 Mike Williams wrote:
      > On 17/07/2013 16:56, Bram Moolenaar wrote:
      > >
      > > Mike Williams wrote:
      > >
      > >> Attached is a first pass at a patch to fix various issues with the GVIM
      > >> Window on Windows when building with Visual Studio 2012. I have tested
      > >> that VS2010 are still ok, but it needs testing with other Windows
      > >> compilers - VC6, 7, 8 and 9, Borland C, Mingw and so on.
      > >
      > > I'm building the distributed executable with Visual C++ 2008. The
      > > resulting executable has the widest range of Windows versions where it
      > > works.
      > >
      > > If needed you can check the compiler version and/or the system version
      > > at runtime.
      > I am not expecting any regressions with the patch - as Andre pointed out
      > the system call has been around since the last century so they should
      > all support it. I protected the local definition of the pp symbol for
      > the new metric to cope with different build environments to get around
      > any need for compilation or run-time checks. But it would still be nice
      > for users of other Windows compilers to check for any unexpected
      > consequences.

      Same issue was discussed here:
      and here:

      The difference is caused by subsystem version in the PE header.
      I think Mike's patch is right solution.
      I also tested with VC6 and worked fine.

      BTW, I have one question:

      --- a/src/os_win32.h
      +++ b/src/os_win32.h
      @@ -102,6 +102,10 @@
      #ifndef PROTO
      # include <windows.h>
      +# ifdef SM_CXPADDEDBORDER
      +# undef SM_CXPADDEDBORDER
      +# endif
      +# define SM_CXPADDEDBORDER 92

      Is undef needed?
      I think the following is enough:

      # ifndef SM_CXPADDEDBORDER
      # define SM_CXPADDEDBORDER 92
      # endif

      Ken Takata

      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      You received this message because you are subscribed to the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    Your message has been successfully submitted and would be delivered to recipients shortly.