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

Re: [eiffel_software] Eiffel vision in 6.8 - strange colours and rendering

Expand Messages
  • Peter Gummer
    ... Just a follow-up to this old thread ... We recently moved to a new build server, which automatically builds our EiffelVision application for Windows.
    Message 1 of 11 , Aug 2, 2012
      On 15/06/2011, Emmanuel Stapf [ES] wrote:

      >> Manu, does this mean that we now have to deploy the xxx.exe.manifest
      >> file with our application if we want our users to see the new theme too?
      >
      > This is the easiest thing to do indeed. If you do not want the manifest file, then
      > you would have to provide a Windows resource file that reference the manifest (not
      > necessarily the one automatically generated).



      Just a follow-up to this old thread ...

      We recently moved to a new build server, which automatically builds our EiffelVision application for Windows. Someone had already installed some .NET tools on the server, but they didn't need C so I had to install the Microsoft C tools for our Eiffel builds. I couldn't get it to work -- whatever they had installed was incompatible with anything that I could find to download -- so I decided to let the server build with MingW instead.

      Unfortunately, compiling with MingW didn't give us the Windows visual styles. Most notably, tooltips weren't working.

      So the point of this email is to say that, if you want to build EiffelVision applications with MingW, you really do need the manifest file. The changes made in EiffelStudio 6.8, which provide Windows visual styles automatically, only work with the Microsoft compiler. Here is revision 86088, which Iliyan Gochev mentioned earlier in this thread:

      --- Src/library/wel/Clib/disptchr.c (revision 86087)
      +++ Src/library/wel/Clib/disptchr.c (revision 86088)
      @@ -24,6 +24,10 @@
      #include "wel_globals.h"
      #include "wel.h"

      +/* Pragma for automatically linking against Common Controls 6.0 */
      +#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
      +

      But revision 86090 made it apply only for Microsoft C:

      +#ifdef _MSC_VER
      +/* Pragma for automatically linking against Common Controls 6.0 */
      +#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
      +#endif
      +

      Therefore, compiling with MingW doesn't give us the Windows visual styles.


      One way to fix this is to deploy the manifest as a separate file.

      Another fix (which we've chosen) is to instruct the resource compiler to use it by adding this to the end of the .rc file:

      // The manifest for enabling Windows visual styles is required for compilation with MingW.
      // (Microsoft C doesn't need it because disptchr.c in WEL has a #pragma for it, but it does no harm putting it here too.)
      // It has to appear at the end, else MinGW will ignore it.
      // We also have to redefine CREATEPROCESS_MANIFEST_RESOURCE_ID and RT_MANIFEST because the definitions in MingW's
      // version of winuser.h produce syntax errors.

      #undef CREATEPROCESS_MANIFEST_RESOURCE_ID
      #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
      #undef RT_MANIFEST
      #define RT_MANIFEST 24
      CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "adl_workbench.exe.manifest"


      This is Microsoft's explanation:
      http://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).aspx

      This is a MingW view of things:
      http://sourceforge.net/apps/mediawiki/libwdi/index.php?title=Reuse#Creating_a_Windows_GUI_application_that_use_the_latest_Windows_visual_enhancements_.28Aero_Glass_look_on_Vista_or_Windows_7.29.2C_even_if_compiled_from_MinGW.2Fcygwin

      - Peter Gummer
    Your message has been successfully submitted and would be delivered to recipients shortly.