summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP/src/GPGw/passdialog.cpp
blob: 0263edb6e364f7c3830187825e3d95a05b35e072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "../commonheaders.h"
#include "gpgw.h"

char dlgpassphrase[passphrasesize];

INT_PTR CALLBACK PassphraseDialogProcedure(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
  switch(msg)
  {
    case WM_INITDIALOG:
      SetDlgItemText(hdlg, IDC_USERID, (char *)lparam);
    break;
    case WM_COMMAND:
      switch(LOWORD(wparam))
      {
        case IDOK:
          memset(dlgpassphrase, 0, sizeof(dlgpassphrase));
          GetDlgItemText(hdlg, IDC_PASSPHRASE, dlgpassphrase, _countof(dlgpassphrase));
        case IDCANCEL:
          EndDialog(hdlg, wparam);
          return TRUE;
        break;
      }
    break;
  }

  return FALSE;
}