CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2010
    Posts
    121

    Why an application is no longer "themable" if I use local uxtheme.dll file?

    I created a themed application and I put the uxtheme.dll inside it,
    then there is no "theming" effect...
    But when I remove that local file, then keep using the syswow64 one,
    it works very well.
    How come uxtheme.dll must be located in syswow64?

    How come I can't have every standalone shell program to theme itself?
    Thanks
    Jack
    Last edited by luckiejacky; July 10th, 2017 at 11:02 PM.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Why an application is no longer "themable" if I move out the uxtheme.dll file?

    It probably has to do with running a 32 bit app on a 64 bit system. Where the uxtheme.dll resides depends on whether its a 32 bit or a 64 bit dll. When th8s works, it's because you found the bit version that matches your app.

    For a better explanation, read up on syswow64 in msdn..

  3. #3
    Join Date
    Dec 2010
    Posts
    121

    Re: Why an application is no longer "themable" if I move out the uxtheme.dll file?

    I am afraid that with a 64bit app and a 64bit module, the app is still not able to be themed....
    I've tested.

    Actually, upon calling on GetProcAddress, the call did succeed, but when I OpenThemeData,
    the HTHEME handle is NULL....

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Why an application is no longer "themable" if I move out the uxtheme.dll file?

    From MSDN:
    "If no match is found NULL is returned."

  5. #5
    Join Date
    Dec 2010
    Posts
    121

    Re: Why an application is no longer "themable" if I move out the uxtheme.dll file?

    But the thing came out funny was the class was just "BUTTON"

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Why an application is no longer "themable" if I move out the uxtheme.dll file?

    Follow the basics for WinAPI programming: when you get NULL returned from an API, the general approach is to call GetLastError. Have you verified in msdn that calling GetLastError is correct for the APIs you are using and are you calling it?

  7. #7
    Join Date
    Dec 2010
    Posts
    121

    Re: Why an application is no longer "themable" if I move out the uxtheme.dll file?

    The Error Message Says:
    Code:
    ERROR_NOT_FOUND
    0x80070490
    
    May be used to indicate that the device supports a property, but that property value is currently empty or uninitialized. May be used to indicate that the internal context for a long-running operation no longer exists, as the operation has completed or has been cancelled. Examples of such operations include bulk properties, object enumeration, transfer, and invoking device service methods. Applications should retry the operation from the beginning. May be used to indicate that the specified object does not exist. The child object may be outside of the device service hierarchy.

  8. #8
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Why an application is no longer "themable" if I move out the uxtheme.dll file?

    Quote Originally Posted by luckiejacky View Post
    The Error Message Says:
    Code:
    ERROR_NOT_FOUND
    0x80070490
    
    May be used to indicate that the device supports a property, but that property value is currently empty or uninitialized. May be used to indicate that the internal context for a long-running operation no longer exists, as the operation has completed or has been cancelled. Examples of such operations include bulk properties, object enumeration, transfer, and invoking device service methods. Applications should retry the operation from the beginning. May be used to indicate that the specified object does not exist. The child object may be outside of the device service hierarchy.
    Are you calling GetLastError immediately after a function fails? Do you know which function is failing? I ask because it certainly isn't clear from your posts (first you mention that GetProcAddress is failing and then you mention BUTTON class - kind of all over the board there).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured