# Odd behaviour of the Windows native filechooser dialog (and other native dialogs)

**URL:** <https://forum.juce.com/t/odd-behaviour-of-the-windows-native-filechooser-dialog-and-other-native-dialogs/20616>\
**Category:** Windows\
**Created:** [January 16, 2017, 4:49am UTC](https://forum.juce.com/t/odd-behaviour-of-the-windows-native-filechooser-dialog-and-other-native-dialogs/20616 "2017-01-16T04:49:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roeland-2](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/roeland-2/32/738_2.png) [@roeland-2](https://forum.juce.com/u/roeland-2)\
**Post date:** [January 16, 2017, 4:49am UTC](https://forum.juce.com/t/odd-behaviour-of-the-windows-native-filechooser-dialog-and-other-native-dialogs/20616/1 "2017-01-16T04:49:55Z")

</div>

There are a few issues with the Windows file chooser dialog. All of this can be reproduced by the Juce demo app. Perhaps related to the [Calloutbox issue](https://forum.juce.com/t/calloutbox-destroyed-when-using-native-file-dialog/20599).

- The dialog appears in the task bar, and the alt-tab windows switcher as a separate top level window
- unlike every other dialog box, this one doesn’t get the focus if you try to click on the main window. The standard behaviour of Windows (flickering the window border) also doesn’t work.
- Alt-tab is broken: If you try to focus on the main window, no window gets the focus.

If you try with the other native popup dialogs, the issue is worse. Not only does the focus not work, but if the dialog is hidden behind another window, it won’t pop up, making it appear like your app just hangs.

Not sure why that is (in the debugger everything looks OK). My guess it’s the trick with the [`parentWindow` component](https://github.com/julianstorer/JUCE/blob/master/modules/juce_gui_basics/native/juce_win32_FileChooser.cpp#L241) — normally `of.hwndOwner` would be initialized with the `HWND` of the main window.
