Call SetWindowPos instead of ShowWindow in EndDialog.
Attach a file by drag & drop or click to upload