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. XP Styles in Visual Studio 2003

XP Styles in Visual Studio 2003

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studiowpfalgorithmstools
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.
  • _ Offline
    _ Offline
    __DanC__
    wrote on last edited by
    #1

    I am working on a DLL which hosts various dialogs and property sheets which is being developed in Visual Studio 2003. I would like to have Windows XP styled controls but not having much luck so far. I have tried using #define ISOLATION_AWARE_ENABLED 1 along with embedding a manifest and calling InitCommonControls(); in the constructor for the item but at best it does nothing, at worst it crashes. I have been searching for a way to do this and tried various tools which embed the manifest but they do not seem to have an effect. I have seen articles which suggest setting the manifest in the linker options but I cannot see the option so I believe this must be a 2005+ option. Is there a way to do this or is it just not possible in 2003 projects?

    S 1 Reply Last reply
    0
    • _ __DanC__

      I am working on a DLL which hosts various dialogs and property sheets which is being developed in Visual Studio 2003. I would like to have Windows XP styled controls but not having much luck so far. I have tried using #define ISOLATION_AWARE_ENABLED 1 along with embedding a manifest and calling InitCommonControls(); in the constructor for the item but at best it does nothing, at worst it crashes. I have been searching for a way to do this and tried various tools which embed the manifest but they do not seem to have an effect. I have seen articles which suggest setting the manifest in the linker options but I cannot see the option so I believe this must be a 2005+ option. Is there a way to do this or is it just not possible in 2003 projects?

      S Offline
      S Offline
      Sarath C
      wrote on last edited by
      #2

      Have you added the manifest to your application's resource file as follows?

      CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.manifest"

      Please check Using Windows XP Visual Styles[^] In the newer version of visual studio, embedding manifest is as follows by defining it in stdafx.h

      #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

      -Sarath. "Great hopes make everything great possible" - Benjamin Franklin

      My blog - Sharing My Thoughts, An Article - Understanding Statepattern

      _ 1 Reply Last reply
      0
      • S Sarath C

        Have you added the manifest to your application's resource file as follows?

        CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.manifest"

        Please check Using Windows XP Visual Styles[^] In the newer version of visual studio, embedding manifest is as follows by defining it in stdafx.h

        #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

        -Sarath. "Great hopes make everything great possible" - Benjamin Franklin

        My blog - Sharing My Thoughts, An Article - Understanding Statepattern

        _ Offline
        _ Offline
        __DanC__
        wrote on last edited by
        #3

        Thanks for the reply, I have tried adding the manifest as specified but it makes no difference. I have also defined SIDEBYSIDE_COMMONCONTROLS in my stdafx.h and called InitCommonControls() in my constructor all with no success. I read somewhere that I needed to set the resource ID to ISOLATIONAWARE_MANIFEST_RESOURCE_ID but that stops my DLL from registering. The only part of the "Using XP Visual Styles" I am not sure about it whether I am using the correct SDK. I have installed "Microsoft Platform SDK for Windows XP SP2" and specified the include and lib directories in the project. Is that all that is required to use the SDK or are there more steps I need to take?

        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