mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 14:53:46 +00:00
CS fixes for dialogs on Windows.
This commit is contained in:
@@ -200,14 +200,14 @@ proc chooseDir*(window: PWindow, root: string = ""): string =
|
||||
BrowseInfo: TBrowseInfo
|
||||
DisplayName: array [0..MAX_PATH, char]
|
||||
TempPath: array [0..MAX_PATH, char]
|
||||
Result = ""
|
||||
result = ""
|
||||
#BrowseInfo.hwndOwner = Application.Handle
|
||||
BrowseInfo.pszDisplayName = DisplayName
|
||||
BrowseInfo.ulFlags = 1 #BIF_RETURNONLYFSDIRS
|
||||
lpItemID = SHBrowseForFolder(cast[LPBrowseInfo](addr(BrowseInfo)))
|
||||
if lpItemId != nil:
|
||||
discard SHGetPathFromIDList(lpItemID, TempPath)
|
||||
Result = $TempPath
|
||||
result = $TempPath
|
||||
discard GlobalFreePtr(lpItemID)
|
||||
else:
|
||||
var chooser = file_chooser_dialog_new("Select Directory", window,
|
||||
|
||||
@@ -10725,7 +10725,7 @@ type
|
||||
nMaxFileTitle*: DWORD
|
||||
lpstrInitialDir*: LPCTSTR
|
||||
lpstrTitle*: LPCTSTR
|
||||
Flags*: DWORD
|
||||
flags*: DWORD
|
||||
nFileOffset*: int16
|
||||
nFileExtension*: int16
|
||||
lpstrDefExt*: LPCTSTR
|
||||
|
||||
Reference in New Issue
Block a user