New Utility: New+ (#33136)

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
This commit is contained in:
Christian Gaarden Gaardmark
2024-09-19 09:12:24 -07:00
committed by GitHub
parent d7a07dc7c8
commit 3f44ad186d
95 changed files with 3116 additions and 59 deletions

View File

@@ -26,6 +26,11 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
}
public static string GetFolderDialog(IntPtr hwndOwner)
{
return GetFolderDialogWithFlags(hwndOwner, 0);
}
public static string GetFolderDialogWithFlags(IntPtr hwndOwner, uint ulFlags)
{
// windows MAX_PATH with long path enable can be approximated 32k char long
// allocating more than double (unicode) to hold the path
@@ -37,7 +42,7 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
browseInfo.PidlRoot = IntPtr.Zero;
browseInfo.PszDisplayName = null;
browseInfo.LpszTitle = null;
browseInfo.UlFlags = 0;
browseInfo.UlFlags = ulFlags;
browseInfo.Lpfn = null;
browseInfo.LParam = IntPtr.Zero;
browseInfo.IImage = 0;
@@ -61,5 +66,10 @@ namespace Microsoft.PowerToys.Settings.UI.Helpers
return sb.ToString();
}
public struct FolderDialogFlags
{
public const uint _BIF_NEWDIALOGSTYLE = 0x00000040;
}
}
}