Dialog windows should be transient for the main window they were spawned from, this allows windows managers to e.g. keep the dialog on top of the main window, or center the dialog over the main window.
On Windows(tm), this function will and put the child window on top of the parent, much as the window would have done in X.