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

Status
Not open for further replies.

sms_solver

In the zone
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

In the zone
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.
 
Status
Not open for further replies.
Top Bottom