Either create the dialog with CreateDialog. Than the dialog is modeless, but still needs a working message loop. This should be the normal way. You can hide and show the dialog, or destroy it and recreate it anytime you want.
There is another way, depending on how you want to use this dialog. You can start a second UI frame, and launch the dialog either modal or modeless there. This dialog has the advantage to be always responsible even the main thread is busy.