-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix win32 classic menu theme display bug
Fix win32 classic menu theme display bug
- Loading branch information
1 parent
03d1c70
commit 67a7306
Showing
12 changed files
with
205 additions
and
86 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
GetStoreApp/WindowsAPI/PInvoke/Uxtheme/PreferredAppMode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace GetStoreApp.WindowsAPI.PInvoke.Uxtheme | ||
{ | ||
/// <summary> | ||
/// 菜单样式 | ||
/// </summary> | ||
public enum PreferredAppMode | ||
{ | ||
Default, | ||
AllowDark, | ||
ForceDark, | ||
ForceLight, | ||
Max | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace GetStoreApp.WindowsAPI.PInvoke.Uxtheme | ||
{ | ||
/// <summary> | ||
/// Uxtheme.dll 函数库 | ||
/// </summary> | ||
public static partial class UxthemeLibrary | ||
{ | ||
private const string Uxtheme = "uxtheme.dll"; | ||
|
||
/// <summary> | ||
/// 设置 win32 右键菜单的样式 | ||
/// </summary> | ||
/// <param name="preferredAppMode">菜单样式</param> | ||
[LibraryImport(Uxtheme, EntryPoint = "#135", SetLastError = false)] | ||
public static partial void SetPreferredAppMode(PreferredAppMode preferredAppMode); | ||
|
||
/// <summary> | ||
/// 刷新右键菜单样式 | ||
/// </summary> | ||
[LibraryImport(Uxtheme, EntryPoint = "#136", SetLastError = false)] | ||
public static partial void FlushMenuThemes(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
GetStoreAppWebView/WindowsAPI/PInvoke/Uxtheme/PreferredAppMode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace GetStoreAppWebView.WindowsAPI.PInvoke.Uxtheme | ||
{ | ||
/// <summary> | ||
/// 菜单样式 | ||
/// </summary> | ||
public enum PreferredAppMode | ||
{ | ||
Default, | ||
AllowDark, | ||
ForceDark, | ||
ForceLight, | ||
Max | ||
}; | ||
} |
Oops, something went wrong.