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

[path] Win32: fix gui calculations for VS2012 builds

Expand Messages
  • Mike Williams
    Hi, 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
    Message 1 of 4 , Jul 17, 2013
    • 0 Attachment
      Hi,

      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.

      TTFN

      Mike
      --
      There you go thinking again!

      --
      --
      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.
    • Bram Moolenaar
      ... 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
      Message 2 of 4 , Jul 17, 2013
      • 0 Attachment
        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.


        --
        For society, it's probably a good thing that engineers value function over
        appearance. For example, you wouldn't want engineers to build nuclear power
        plants that only _look_ like they would keep all the radiation inside.
        (Scott Adams - The Dilbert principle)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        --
        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.
      • Mike Williams
        ... 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
        Message 3 of 4 , Jul 17, 2013
        • 0 Attachment
          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.

          Mike
          --
          EXPERIENCE - experience is a wonderful thing. It enables you to
          recognise a mistake when you make it again.

          --
          --
          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.
        • Ken Takata
          Hi, ... Same issue was discussed here: https://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
          Message 4 of 4 , Jul 18, 2013
          • 0 Attachment
            Hi,

            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:
            https://connect.microsoft.com/VisualStudio/feedback/details/753224/regression-getsystemmetrics-delivers-different-values
            and here:
            https://bugzilla.mozilla.org/show_bug.cgi?id=758280

            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 @@
            #endif
            #ifndef PROTO
            # include <windows.h>
            +# ifdef SM_CXPADDEDBORDER
            +# undef SM_CXPADDEDBORDER
            +# endif
            +# define SM_CXPADDEDBORDER 92
            #endif

            Is undef needed?
            I think the following is enough:

            # ifndef SM_CXPADDEDBORDER
            # define SM_CXPADDEDBORDER 92
            # endif


            Regards,
            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.