CS fixes for dialogs on Windows.

This commit is contained in:
Dominik Picheta
2014-10-05 20:22:07 +01:00
parent 3354f7e098
commit 16e0cda136
2 changed files with 3 additions and 3 deletions

View File

@@ -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,

View File

@@ -10725,7 +10725,7 @@ type
nMaxFileTitle*: DWORD
lpstrInitialDir*: LPCTSTR
lpstrTitle*: LPCTSTR
Flags*: DWORD
flags*: DWORD
nFileOffset*: int16
nFileExtension*: int16
lpstrDefExt*: LPCTSTR