warn = "If you cancel this dialog, the message will be sent in cleartext.\n"
warn = "If you cancel this dialog, the message will be sent in cleartext.\n\n"
recipient_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam){    static struct recipient_cb_s * rset_cb;    static int rset_state = 1;    NMHDR * notify;    HWND hrset;    BOOL flag;    const char *warn;    int i;    switch (msg) {    case WM_INITDIALOG:	rset_cb = (struct recipient_cb_s *)lparam;	initialize_rsetbox (GetDlgItem (dlg, IDC_ENC_RSET1));	load_rsetbox (GetDlgItem (dlg, IDC_ENC_RSET1));	initialize_rsetbox (GetDlgItem (dlg, IDC_ENC_RSET2));	if (!rset_cb->unknown_keys) {	    ShowWindow (GetDlgItem (dlg, IDC_ENC_INFO), SW_HIDE);	    ShowWindow (GetDlgItem (dlg, IDC_ENC_NOTFOUND), SW_HIDE);	}	else	    initialize_keybox (dlg, rset_cb);	CheckDlgButton (dlg, IDC_ENC_OPTARMOR, BST_CHECKED);	center_window (dlg, NULL);	SetForegroundWindow (dlg);	return TRUE;    case WM_SYSCOMMAND:	if (wparam == SC_CLOSE)	    EndDialog (dlg, TRUE);	break;    case WM_NOTIFY:	notify = (LPNMHDR)lparam;	if (notify	    && (notify->idFrom == IDC_ENC_RSET1	    ||  notify->idFrom == IDC_ENC_RSET2)	    && notify->code ==  NM_DBLCLK)	    copy_item (dlg, notify->idFrom, -1);	break;    case WM_COMMAND:	switch (HIWORD (wparam)) {	case BN_CLICKED:	    if ((int)LOWORD (wparam) == IDC_ENC_OPTSYM) {		rset_state ^= 1;		EnableWindow (GetDlgItem (dlg, IDC_ENC_RSET1), rset_state);		EnableWindow (GetDlgItem (dlg, IDC_ENC_RSET2), rset_state);		ListView_DeleteAllItems (GetDlgItem (dlg, IDC_ENC_RSET2));	    }	    break;	}	switch( LOWORD( wparam ) ) {	case IDOK:	    flag = IsDlgButtonChecked( dlg, IDC_ENC_OPTARMOR );	    if( flag )		rset_cb->opts |= OPT_FLAG_ARMOR;	    flag = IsDlgButtonChecked( dlg, IDC_ENC_OPTSYM );	    if( flag ) {		rset_cb->opts |= OPT_FLAG_SYMETRIC;		EndDialog( dlg, TRUE );	    }	    keycache_new (&rset_cb->rset);	    	    hrset = GetDlgItem( dlg, IDC_ENC_RSET2 );	    for( i=0; i < ListView_GetItemCount( hrset ); i++ ) {		gpgme_key_t key;		char keyid[32], valid[32];		ListView_GetItemText (hrset, i, 3, keyid, sizeof (keyid)-1);		ListView_GetItemText (hrset, i, 4, valid, sizeof (valid)-1);		key = find_gpg_key(keyid, 0);		keycache_add(&rset_cb->rset, key);		if (strcmp (valid, "FULL") && strcmp (valid, "ULTIMATE"))		    rset_cb->opts |= OPT_FLAG_FORCE;	    }	    EndDialog (dlg, TRUE);	    break;	case IDCANCEL:	    warn = "If you cancel this dialog, the message will be sent in cleartext.\n"		   "Do you really want to cancel?";	    i = MessageBox (dlg, warn, "Recipient Dialog", MB_ICONWARNING|MB_YESNO);	    if (i == IDNO)		return FALSE;	    rset_cb->opts = OPT_FLAG_CANCEL;	    rset_cb->rset = NULL;	    EndDialog (dlg, FALSE);	    break;	}	break;    }    return FALSE;}