Update nf-uxtheme-setwindowtheme.md#1936
Conversation
|
|
||
|
|
||
| When <i>pszSubAppName</i> and <i>pszSubIdList</i> are <b>NULL</b>, the theme manager removes the previously applied associations. You can prevent visual styles from being applied to a specified window by specifying an empty string, (L" "), which does not match any section entries. | ||
| When <i>pszSubAppName</i> and <i>pszSubIdList</i> are <b>NULL</b>, the theme manager removes the previously applied associations. You can prevent visual styles from being applied to a specified window by specifying an empty string, (L""), which does not match any section entries. |
There was a problem hiding this comment.
I think this space is deliberate and we should correct the text instead. After a quick glance, it does appear uxtheme!SetWindowTheme behaves differently if "", " ", or nullptr is passed in.
| When <i>pszSubAppName</i> and <i>pszSubIdList</i> are <b>NULL</b>, the theme manager removes the previously applied associations. You can prevent visual styles from being applied to a specified window by specifying an empty string, (L""), which does not match any section entries. | |
| When <i>pszSubAppName</i> and <i>pszSubIdList</i> are <b>NULL</b>, the theme manager removes the previously applied associations. You can prevent visual styles from being applied to a specified window by specifying a string with a space, (L" "), which does not match any section entries. |
There was a problem hiding this comment.
If pass L"", SetWindowTheme will assign L"$" to the property, which does not match anything.
And L" " does not match anything too, because no theme atom named " ".
SetWindowTheme compares income string with L"" explicitly, and uses L"$" replace it. So I think this should be the preset input for this function, rather than L" ".
There was a problem hiding this comment.
The current implementation has the $ logic, but I wonder if that's supported downlevel with older releases. If so, then I agree!
There was a problem hiding this comment.
As far as I know, Windows keeps this behavior since NT5. Imoh, the key is it compares L"", so this should be the preset input, whatever it replaces empty string by L"$" or L" " or others. Thanks for your attention : )
There was a problem hiding this comment.
Sounds good to me, feel free to mark as resolved.
An empty string should not contain such a space