GetThemePartSize (uxtheme)
Last changed: -128.210.192.215

.
Summary
TODO - a short description

C# Signature:

[DllImport("uxtheme", ExactSpelling=true)]
public extern static Int32 GetThemePartSize(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, ref RECT pRect, ThemeSize eSize, out SIZE size);

[DllImport("uxtheme", ExactSpelling=true)]
public extern static Int32 GetThemePartSize(IntPtr hTheme, IntPtr hdc, int iPartId, int iStateId, int pRect, ThemeSize eSize, out SIZE size);

VB .NET Signature:

Public Declare Function GetThemePartSize Lib "uxtheme.dll" (ByVal hTheme As IntPtr, ByVal hdc As IntPtr, ByVal iPartId As Integer, ByVal iStateId As Integer, ByRef prc As Rectangle, ByVal eSize As THEMESIZE, ByRef psz As Size) As Integer

User-Defined Types:

SIZE

RECT

ThemeSize

C# User-Defined Types:

public enum WindowPart : int

{

    WP_CAPTION = 1,
    WP_SMALLCAPTION = 2,
    WP_MINCAPTION = 3,
    WP_SMALLMINCAPTION = 4,
    WP_MAXCAPTION = 5,
    WP_SMALLMAXCAPTION = 6,
    WP_FRAMELEFT = 7,
    WP_FRAMERIGHT = 8,
    WP_FRAMEBOTTOM = 9,
    WP_SMALLFRAMELEFT = 10,
    WP_SMALLFRAMERIGHT = 11,
    WP_SMALLFRAMEBOTTOM = 12,
    WP_SYSBUTTON = 13,
    WP_MDISYSBUTTON = 14,
    WP_MINBUTTON = 15,
    WP_MDIMINBUTTON = 16,
    WP_MAXBUTTON = 17,
    WP_CLOSEBUTTON = 18,
    WP_SMALLCLOSEBUTTON = 19,
    WP_MDICLOSEBUTTON = 20,
    WP_RESTOREBUTTON = 21,
    WP_MDIRESTOREBUTTON = 22,
    WP_HELPBUTTON = 23,
    WP_MDIHELPBUTTON = 24,
    WP_HORZSCROLL = 25,
    WP_HORZTHUMB = 26,
    WP_VERTSCROLL = 27,
    WP_VERTTHUMB = 28,
    WP_DIALOG = 29,
    WP_CAPTIONSIZINGTEMPLATE = 30,
    WP_SMALLCAPTIONSIZINGTEMPLATE = 31,
    WP_FRAMELEFTSIZINGTEMPLATE = 32,
    WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33,
    WP_FRAMERIGHTSIZINGTEMPLATE = 34,
    WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35,
    WP_FRAMEBOTTOMSIZINGTEMPLATE = 36,
    WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37,
    WP_FRAME = 38,

}

public enum WindowPartState : int

{

    // Frame States
    FS_ACTIVE = 1,
    FS_INACTIVE = 2,

    // Caption States
    CS_ACTIVE = 1,
    CS_INACTIVE = 2,
    CS_DISABLED = 3,

    // Max Caption States
    MXCS_ACTIVE = 1,
    MXCS_INACTIVE = 2,
    MXCS_DISABLED = 3,

    // Min Caption States
    MNCS_ACTIVE = 1,
    MNCS_INACTIVE = 2,
    MNCS_DISABLED = 3,

    // Horizontal Scrollbar States
    HSS_NORMAL = 1,
    HSS_HOT = 2,
    HSS_PUSHED = 3,
    HSS_DISABLED = 4,

    // Horizontal Thumb States
    HTS_NORMAL = 1,
    HTS_HOT = 2,
    HTS_PUSHED = 3,
    HTS_DISABLED = 4,

    // Vertical Scrollbar States
    VSS_NORMAL = 1,
    VSS_HOT = 2,
    VSS_PUSHED = 3,
    VSS_DISABLED = 4,

    // Vertical Thumb States
    VTS_NORMAL = 1,
    VTS_HOT = 2,
    VTS_PUSHED = 3,
    VTS_DISABLED = 4,

    // System Button States
    SBS_NORMAL = 1,
    SBS_HOT = 2,
    SBS_PUSHED = 3,
    SBS_DISABLED = 4,

    // Minimize Button States
    MINBS_NORMAL = 1,
    MINBS_HOT = 2,
    MINBS_PUSHED = 3,
    MINBS_DISABLED = 4,

    // Maximize Button States
    MAXBS_NORMAL = 1,
    MAXBS_HOT = 2,
    MAXBS_PUSHED = 3,
    MAXBS_DISABLED = 4,

    // Restore Button States
    RBS_NORMAL = 1,
    RBS_HOT = 2,
    RBS_PUSHED = 3,
    RBS_DISABLED = 4,

    // Help Button States
    HBS_NORMAL = 1,
    HBS_HOT = 2,
    HBS_PUSHED = 3,
    HBS_DISABLED = 4,

    // Close Button States
    CBS_NORMAL = 1,
    CBS_HOT = 2,
    CBS_PUSHED = 3,
    CBS_DISABLED = 4

}

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

TODO

Documentation