mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
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:
committed by
GitHub
parent
d7a07dc7c8
commit
3f44ad186d
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user