Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy
GetThemeFilename (uxtheme)
 
.
Summary
Gets the filename of the current visual style

C# Signature:

[DllImport("uxtheme", ExactSpelling=true, CharSet=CharSet.Unicode)]
public extern static Int32 GetThemeFilename(IntPtr hTheme, int iPartId, int iStateId, int iPropId, StringBuilder themeFileName, int themeFileNameLength);

VB .NET Signature:

Declare Auto Function GetThemeFilename Lib "uxtheme.dll" (hTheme as IntPtr, iPartId as Integer, iStateId as Integer, themeFileName as Integer, themeFileNameLength as Integer) As Integer

User-Defined Types:

None.

Parameters

    hTheme
    [in] Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.
    iPartId
    [in] Value of type int that specifies the part that contains the filename property. See Parts and States.
    iStateId
    [in] Value of type int that specifies the state of the part. See Parts and States.
    iPropId
    [in] Value of type int that specifies the property to retrieve. May be one of the following values.

    TMT_IMAGEFILE
        The filename of the image associated with this part and state, or the base filename for multiple images associated with this part and state.
    TMT_IMAGEFILE1
        The filename of the first scaled image associated with this part and state, for support of different resolutions.
    TMT_IMAGEFILE2
        The filename of the second scaled image.
    TMT_IMAGEFILE3
        The filename of the third scaled image.
    TMT_IMAGEFILE4
        The filename of the fourth scaled image.
    TMT_IMAGEFILE5
        The filename of the fifth scaled image.
    TMT_STOCKIMAGEFILE
        Not used.
    TMT_GLYPHIMAGEFILE
        The filename for the glyph image associated with this part and state.

    pszThemeFilename
    [out] Pointer to a buffer that receives the retrieved file name.
    cchMaxBuffChars
    [in] Value of type int that receives the maximum number of characters in the file name

Notes:

None.

Tips & Tricks:

You could use this to get the theme file name, change this style temporarily, and then set it back!

Sample Code:

Please add some!

Alternative Managed API:

TODO

Documentation

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions