CS fixes for dialogs on Windows.
This commit is contained in:
parent
3354f7e098
commit
16e0cda136
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue