If our app is already running when a file is double clicked, the confirmation dialog appears behind the active windows. Also, calling toFront on the app’s DocumentWindow components has no effect, since the app is not active. I added the MB_SETFOREGROUND flag to the MessageBox call in showNativeDialogBox, which solves both of these problems:
return MessageBox (0, bodyText, title,
MB_SETFOREGROUND | ((isOkCancel) ? MB_OKCANCEL : MB_OK)) == IDOK;
I can’t think of a case where you want a MessageBox to appear, but not in the foreground, so this seems like a reasonable change.