--- a/src/ui/Windows/ThisMfcApp.cpp
+++ b/src/ui/Windows/ThisMfcApp.cpp
@@ -770,7 +770,7 @@
           }
           // get password from user
           StringX passkey;
-          CCryptKeyEntry dlg(NULL);
+          CCryptKeyEntry dlg(isEncrypt);
           INT_PTR nResponse = dlg.DoModal();
 
           if (nResponse == IDOK) {