I am using gVim's confirm() function to pop a dialog waiting for the user to click a button. However, there seems to be a difference in the appearance of the dialog when called from .gvimrc:
Using the command: :let MyTestV = confirm("IN MY_GVIMRC") generates the following dialog:

When this line (sans the :) is added in a .gvimrc (and the .vimrc as well) file, the following appears when a new gVim is opened:

Note that the dialog appears before the actual gVim window appears on the screen.
1) Why is there a difference in the appearance of the two dialogs?
2) Where can I put the command so that the dialog appears as expected?