-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update nf-uxtheme-setwindowtheme.md #1936
base: docs
Are you sure you want to change the base?
Conversation
@@ -86,7 +86,7 @@ If this function succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>H | |||
The theme manager retains the <i>pszSubAppName</i> and the <i>pszSubIdList</i> associations through the lifetime of the window, even if visual styles subsequently change. The window is sent a <a href="/windows/desktop/winmsg/wm-themechanged">WM_THEMECHANGED</a> message at the end of a <b>SetWindowTheme</b> call, so that the new visual style can be found and applied. | |||
|
|||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me, feel free to mark as resolved.
An empty string should not contain such a space