CFindReplaceDialog::CFindReplaceDialog

更新 : 2007 年 11 月

CFindReplaceDialog オブジェクトを構築します。

CFindReplaceDialog( );

解説

CFindReplaceDialog オブジェクトは new 演算子を使ってヒープ領域に構築します。CFindReplaceDialog オブジェクトの構築の詳細については、CFindReplaceDialog クラスの概要を参照してください。ダイアログ ボックスを表示するには、Create メンバ関数を使います。

使用例

// m_pFRDlg is a pointer to a class derived from CFindReplaceDialog 
// which defines variables used by the FINDREPLACE structure. 
// InitFindReplaceDlg creates a CFindReplaceDialog and initializes
// the m_fr with the data members from the derived class
void CMyRichEditView::InitFindReplaceDlg() 
{
   if(NULL == m_pFRDlg)
   {
      m_pFRDlg = new CMyFindReplaceDialog();  // Must be created on the heap

      m_pFRDlg->Create(TRUE, _T(""), _T(""), FR_DOWN, this); 

      m_pFRDlg->m_fr.lStructSize = sizeof(FINDREPLACE);
      m_pFRDlg->m_fr.hwndOwner = this->m_hWnd;
      m_pFRDlg->m_fr.lpstrFindWhat = m_pFRDlg->GetFindWhatStr();
      m_pFRDlg->m_fr.lpstrReplaceWith = m_pFRDlg->GetReplaceWithStr();
      m_pFRDlg->m_fr.wFindWhatLen =  m_pFRDlg->GetFindWhatStrLen();
      m_pFRDlg->m_fr.wReplaceWithLen =  m_pFRDlg->GetReplaceWithStrLen();
   }
}

必要条件

ヘッダー : afxdlgs.h

参照

参照

CFindReplaceDialog クラス

階層図

CFindReplaceDialog::Create

その他の技術情報

CFindReplaceDialog のメンバ