Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with manifest file

Problem with manifest file

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestiondelphilearning
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sashoalm
    wrote on last edited by
    #1

    VS2008 puts a manifest file in my exe automatically (the "embedding manifest" build step). But when I start the exe it shows the dialogs in the classic theme. I opened the exe in the resource editor and noticed that the manifest lacked "Common Controls" section. How can I fix that?

    There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

    S 1 Reply Last reply
    0
    • S sashoalm

      VS2008 puts a manifest file in my exe automatically (the "embedding manifest" build step). But when I start the exe it shows the dialogs in the classic theme. I opened the exe in the resource editor and noticed that the manifest lacked "Common Controls" section. How can I fix that?

      There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

      S Offline
      S Offline
      sashoalm
      wrote on last edited by
      #2

      WTF?! Why does the New Project Wizard add the #ifdef _UNICODE...#endif

      #ifdef _UNICODE
      #if defined _M_IX86
      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
      #elif defined _M_IA64
      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
      #elif defined _M_X64
      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
      #else
      #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
      #endif
      #endif

      in the code that adds the XP style buttons. This code was created by the wizard, no changes from me. It basically means "I'll create a manifest for you unless your program is ANSI, in which case f**k you". When I removed the #ifdef everything worked without problems. The only purpose for putting it seems to be to make me waste an hour wondering why I don't have visual styles, and creating 2 projects one with manifest one without, and comparing them with WinMerge, before noticing this little insidious #ifdef. And I'm sure there are people who don't know about the whole manifest thing, they'd be stuck with ugly controls if they make an ANSI project. I've made my project ANSI from the beginning since I had to add a lot of code that won't compile if it's unicode.

      There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

      L 1 Reply Last reply
      0
      • S sashoalm

        WTF?! Why does the New Project Wizard add the #ifdef _UNICODE...#endif

        #ifdef _UNICODE
        #if defined _M_IX86
        #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
        #elif defined _M_IA64
        #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
        #elif defined _M_X64
        #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
        #else
        #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
        #endif
        #endif

        in the code that adds the XP style buttons. This code was created by the wizard, no changes from me. It basically means "I'll create a manifest for you unless your program is ANSI, in which case f**k you". When I removed the #ifdef everything worked without problems. The only purpose for putting it seems to be to make me waste an hour wondering why I don't have visual styles, and creating 2 projects one with manifest one without, and comparing them with WinMerge, before noticing this little insidious #ifdef. And I'm sure there are people who don't know about the whole manifest thing, they'd be stuck with ugly controls if they make an ANSI project. I've made my project ANSI from the beginning since I had to add a lot of code that won't compile if it's unicode.

        There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        sashoalm wrote:

        WTF?! Why does the New Project Wizard add the #ifdef _UNICODE...#endif

        Because technically... common controls 6 and above does not have full ANSI support. Some window messages will be returning Unicode text buffers if you use common controls 6 in an ANSI build. Depending on your application architecture... you may or may not bump into this limitation. Best Wishes, -David Delaune

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups