Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
I have a mostly-command-line application that uses a wxFileDialog as a file chooser at one point (to select a file to upload via FTP). This works great on Linux, but on Windows it hangs when I call ShowModal() on wxFileDialog. There is no root window in this application and I have no idea whether that's a factor in the hang.
I'm willing to fake a root window without showing it if it's required (but you'll need to tell me how), but showing an actual parent window is a no go.
I have no experience with wxWidgets on winblows but:
(1) The wxFileDialog is itself a "top level window" because its parent is NULL. The dialog has no parent.
(2) You are trying to show this top level window as ShowModal(). This can cause troubles. It depends how modal dialogs are implemented by the operating system.
Moreover, do not delete the dialog. Use Destroy() instead. I recommend a modification:
Destroy schedules the delete for later but will first empty the event queue, which means that if there are events in the queue that refer to the window being deleted these events won't cause a crash when being processed
"Keyboard not detected. Press F1 to continue"
-- Windows