DIGIT-ARC read-only archive · snapshot: July 23, 2026

How Do one konw if WinXP is using theme (programatically)

3 posts · originally from https://geek.digit.in/community/threads/how-do-one-konw-if-winxp-is-using-theme-programatically.19051/

sms_solver
sms_solver Original post #1
Nov 20, 2005 at 5:49 PM
is there any way (API or likes) that let us know that the Windows XP is using the theme or not (using Standard) style.

This is needed because I am developing a program, and I have to arrange buttons and form's weight and height. Windows with theme take more space thus reduces actual workable area in the form.

I want to adjust buttons position accordingly.

can anybody help?
puja399
puja399 #2
Nov 20, 2005 at 10:48 PM
The Theme functions in Win XP are contained in uxtheme.dll. U can get the current theme with GetCurrentThemeName function. The syntax is:
Code:
HRESULT GetCurrentThemeName(
    LPWSTR pszThemeFileName,
    int dwMaxNameChars,
    LPWSTR pszColorBuff,
    int cchMaxColorChars,
    LPWSTR pszSizeBuff,
    int cchMaxSizeChars);
where:
Code:
pszThemeFileName
[out] Pointer to a string that receives the theme path and file name.
dwMaxNameChars
[in] Value of type int that contains the maximum number of characters allowed in the theme file name.
pszColorBuff
[out] Pointer to a string that receives the color scheme name. This parameter may be set to NULL.
cchMaxColorChars
[in] Value of type int that contains the maximum number of characters allowed in the color scheme name.
pszSizeBuff
[out] Pointer to a string that receives the size name. This parameter may be set to NULL.
cchMaxSizeChars
[in] Value of type int that contains the maximum number of characters allowed in the size name.

The function returns S_OK if successful, otherwise an error code.
siriusb
siriusb #3
Nov 21, 2005 at 12:51 AM
And this would be the source: [link]