Skip to content

Commit

Permalink
Some little flags usage for win32 file dialogs
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 8, 2021
1 parent 576ffb6 commit 3b4b946
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dgl/src/WindowPrivateData.cpp
Expand Up @@ -544,6 +544,11 @@ bool Window::PrivateData::openFileBrowser(const Window::FileBrowserOptions& opti
ofn.lpstrFile = fileNameW.data();
ofn.nMaxFile = (DWORD)fileNameW.size();

// flags
ofn.Flags = OFN_PATHMUSTEXIST;
if (options.buttons.showHidden == FileBrowserOptions::kButtonVisibleChecked)
ofn.Flags |= OFN_FORCESHOWHIDDEN;

// TODO synchronous only, can't do better with WinAPI native dialogs.
// threading might work, if someone is motivated to risk it.
if (GetOpenFileNameW(&ofn))
Expand Down

0 comments on commit 3b4b946

Please sign in to comment.