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. ATL / WTL / STL
  4. XP Themes not woking in an ActiveX control in IE

XP Themes not woking in an ActiveX control in IE

Scheduled Pinned Locked Moved ATL / WTL / STL
c++comquestionlearning
5 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.
  • J Offline
    J Offline
    Jason De Arte
    wrote on last edited by
    #1

    I have an ATL ActiveX DLL control & in Internet Explorer, on an XP system with themes enabled - any dialogs that my control displays do not have any themes active! I've themed my EXE projects before with no issues. (manifest resource type=24 id=1, InitCommonControls, comctl32.lib, ect..). But for some reason when I apply the same modifications to my DLL - it doesn't work. The dialogs that I display from the control have a themed non-client area (the caption & 'x' close button), but the dialog client controls are not themed. I attempted to use the theme library (uxtheme.dll) to force the themeing of the dialog & its child controls, but that failed horribly (probably from a lack of understanding the theme lib), the best(???) I was able to accomplish is the removing of the theme from the non-client area. :sigh: Does any one know why my control's dialog doesn't show up as being themed in IE?? Thanks

    M 1 Reply Last reply
    0
    • J Jason De Arte

      I have an ATL ActiveX DLL control & in Internet Explorer, on an XP system with themes enabled - any dialogs that my control displays do not have any themes active! I've themed my EXE projects before with no issues. (manifest resource type=24 id=1, InitCommonControls, comctl32.lib, ect..). But for some reason when I apply the same modifications to my DLL - it doesn't work. The dialogs that I display from the control have a themed non-client area (the caption & 'x' close button), but the dialog client controls are not themed. I attempted to use the theme library (uxtheme.dll) to force the themeing of the dialog & its child controls, but that failed horribly (probably from a lack of understanding the theme lib), the best(???) I was able to accomplish is the removing of the theme from the non-client area. :sigh: Does any one know why my control's dialog doesn't show up as being themed in IE?? Thanks

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      In a DLL, the manifest should have an ID of 2, not 1. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0.1! | RightClick-Encrypt Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer.   -- Michael P. Butler in the Lounge

      J 1 Reply Last reply
      0
      • M Michael Dunn

        In a DLL, the manifest should have an ID of 2, not 1. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0.1! | RightClick-Encrypt Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer.   -- Michael P. Butler in the Lounge

        J Offline
        J Offline
        Jason De Arte
        wrote on last edited by
        #3

        I think I'm missing something else. I tried resource id's 1-16 for my manifest file & it still didn't work :( So as a sanity check I created to following quick ActiveX project in DevStudio6SP5 * File>New>Projects>ATL COM AppWizard * DLL Project, nothing checked, finish * Insert>New ATL Object,Category "Controls", Full Control * ATL Object Wizard Properties > ShortName = TestBob, left everything else as default * Add a WM_LBUTTONDBLCLK handler that displays a simple MessageBox OR if you're lazy & don't want to double click all the time... * Add a Button control to the window in your WM_CREATE handler (be sure to enable m_bWindowOnly) * Added a manifest resource, type 24, id=2 * Added ComCtl32.lib to the linker * In the constructor, added AtlInitCommonControls(ICC_WIN95_CLASSES|ICC_DATE_CLASSES|ICC_USEREX_CLASSES|ICC_COOL_CLASSES|ICC_INTERNET_CLASSES|ICC_PAGESCROLLER_CLASS|ICC_NATIVEFNTCTL_CLASS); Wanted to make sure I wasn't missing anything ;P Unfortunatly the buttons are still not themed. :confused: I even added 511 manifests to the project, numbered 1-512. Sort of a buckshot approch. Still no luck. Is there some obsure interface I need to implement? FYI: CPLs (Control Panel Applets) should have a manifest resource of 123

        M 1 Reply Last reply
        0
        • J Jason De Arte

          I think I'm missing something else. I tried resource id's 1-16 for my manifest file & it still didn't work :( So as a sanity check I created to following quick ActiveX project in DevStudio6SP5 * File>New>Projects>ATL COM AppWizard * DLL Project, nothing checked, finish * Insert>New ATL Object,Category "Controls", Full Control * ATL Object Wizard Properties > ShortName = TestBob, left everything else as default * Add a WM_LBUTTONDBLCLK handler that displays a simple MessageBox OR if you're lazy & don't want to double click all the time... * Add a Button control to the window in your WM_CREATE handler (be sure to enable m_bWindowOnly) * Added a manifest resource, type 24, id=2 * Added ComCtl32.lib to the linker * In the constructor, added AtlInitCommonControls(ICC_WIN95_CLASSES|ICC_DATE_CLASSES|ICC_USEREX_CLASSES|ICC_COOL_CLASSES|ICC_INTERNET_CLASSES|ICC_PAGESCROLLER_CLASS|ICC_NATIVEFNTCTL_CLASS); Wanted to make sure I wasn't missing anything ;P Unfortunatly the buttons are still not themed. :confused: I even added 511 manifests to the project, numbered 1-512. Sort of a buckshot approch. Still no luck. Is there some obsure interface I need to implement? FYI: CPLs (Control Panel Applets) should have a manifest resource of 123

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          Ah, I think you also need to #define ISOLATION_AWARE_ENABLED 1 in stdafx.h before all #includes. Check out this article[^] for all the hairy details. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0.1! | RightClick-Encrypt Actual sign at the laundromat I go to: "No tinting or dying."

          J 1 Reply Last reply
          0
          • M Michael Dunn

            Ah, I think you also need to #define ISOLATION_AWARE_ENABLED 1 in stdafx.h before all #includes. Check out this article[^] for all the hairy details. --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0.1! | RightClick-Encrypt Actual sign at the laundromat I go to: "No tinting or dying."

            J Offline
            J Offline
            Jason De Arte
            wrote on last edited by
            #5

            Wow, thanks Michael - that did the trick! I removed my ComCtl32.lib linker entry & the call to InitCommonControls & it still worked! So for future users that are having similar issues, All I needed for my ActiveX control was.. * A valid manifest resource type=24 with an ID=2 * #define ISOLATION_AWARE_ENABLED 1 in stdafx.h before all other #includes (I think that this is the article[^] you ment) Now I just want to know what the heck all this isolation stuff is & why it added 4k to the size of my DLL ;P I'll google for it later.

            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