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
|
BrowseInfo: TBrowseInfo
|
||||||
DisplayName: array [0..MAX_PATH, char]
|
DisplayName: array [0..MAX_PATH, char]
|
||||||
TempPath: array [0..MAX_PATH, char]
|
TempPath: array [0..MAX_PATH, char]
|
||||||
Result = ""
|
result = ""
|
||||||
#BrowseInfo.hwndOwner = Application.Handle
|
#BrowseInfo.hwndOwner = Application.Handle
|
||||||
BrowseInfo.pszDisplayName = DisplayName
|
BrowseInfo.pszDisplayName = DisplayName
|
||||||
BrowseInfo.ulFlags = 1 #BIF_RETURNONLYFSDIRS
|
BrowseInfo.ulFlags = 1 #BIF_RETURNONLYFSDIRS
|
||||||
lpItemID = SHBrowseForFolder(cast[LPBrowseInfo](addr(BrowseInfo)))
|
lpItemID = SHBrowseForFolder(cast[LPBrowseInfo](addr(BrowseInfo)))
|
||||||
if lpItemId != nil:
|
if lpItemId != nil:
|
||||||
discard SHGetPathFromIDList(lpItemID, TempPath)
|
discard SHGetPathFromIDList(lpItemID, TempPath)
|
||||||
Result = $TempPath
|
result = $TempPath
|
||||||
discard GlobalFreePtr(lpItemID)
|
discard GlobalFreePtr(lpItemID)
|
||||||
else:
|
else:
|
||||||
var chooser = file_chooser_dialog_new("Select Directory", window,
|
var chooser = file_chooser_dialog_new("Select Directory", window,
|
||||||
|
|
|
||||||
|
|
@ -10725,7 +10725,7 @@ type
|
||||||
nMaxFileTitle*: DWORD
|
nMaxFileTitle*: DWORD
|
||||||
lpstrInitialDir*: LPCTSTR
|
lpstrInitialDir*: LPCTSTR
|
||||||
lpstrTitle*: LPCTSTR
|
lpstrTitle*: LPCTSTR
|
||||||
Flags*: DWORD
|
flags*: DWORD
|
||||||
nFileOffset*: int16
|
nFileOffset*: int16
|
||||||
nFileExtension*: int16
|
nFileExtension*: int16
|
||||||
lpstrDefExt*: LPCTSTR
|
lpstrDefExt*: LPCTSTR
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue