root/PassPhraseDlg.cpp

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. CPassPhraseDlg
  2. DoDataExchange
  3. BEGIN_MESSAGE_MAP
  4. OnOK
  5. SetFlag

/*
 * Copyright (C) 2002-2003 chik, s.hiranaka
 * For license terms, see the file COPYING in this directory.
 */

// PassPhraseDlg.cpp : インプリメンテーション ファイル
//

#include "stdafx.h"
#include "Pochy.h"
#include "PassPhraseDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPassPhraseDlg ダイアログ


CPassPhraseDlg::CPassPhraseDlg(CWnd* pParent /*=NULL*/)
        : CDialog(CPassPhraseDlg::IDD, pParent)
{
        //{{AFX_DATA_INIT(CPassPhraseDlg)
                // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します。
        //}}AFX_DATA_INIT
}


void CPassPhraseDlg::DoDataExchange(CDataExchange* pDX)
{
        CDialog::DoDataExchange(pDX);
        //{{AFX_DATA_MAP(CPassPhraseDlg)
        DDX_Control(pDX, IDC_EDIT1, m_ec);
        //}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPassPhraseDlg, CDialog)
        //{{AFX_MSG_MAP(CPassPhraseDlg)
        //}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPassPhraseDlg メッセージ ハンドラ

BOOL CPassPhraseDlg::OnInitDialog() 
{
        CDialog::OnInitDialog();
        
        // TODO: この位置に初期化の補足処理を追加してください
        m_ec.SetFocus();
        return FALSE;  // コントロールにフォーカスを設定しないとき、戻り値は TRUE となります
                      // 例外: OCX プロパティ ページの戻り値は FALSE となります
}

void CPassPhraseDlg::OnOK()
{
        // TODO: この位置にその他の検証用のコードを追加してください
        CString buf;
        m_ec.GetWindowText(buf);
        switch(m_flag){
                case GPG:
                        ((CPochyApp*)AfxGetApp())->m_gpg_passphrase = buf;
                        break;
                case POP:
                        ((CPochyApp*)AfxGetApp())->m_pop_passphrase = buf;
                        break;
        }
        CDialog::OnOK();
}

void CPassPhraseDlg::SetFlag(int flag)
{
        m_flag = flag;
}

/* [<][>][^][v][top][bottom][index][help] */