对话框关联的类如何修改

对话框关联的类怎么修改啊
按照向导建立了对话框关联RMSDlg类,现在想改成自己创建的类,怎么修改啊,菜鸟求解

------解决方案--------------------
给你一个参考:
BOOL CMultiDialogApp::InitInstance()
{
AfxEnableControlContainer();

// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
//
int nResponse;
while (m_iSteps) //!=0
{
nResponse=-1;
switch (m_iSteps)
{
case DIALOG_MAIN://main dialog 
{
CMultiDialogDlg dlg;
m_pCurrentDlg=&dlg;
nResponse = dlg.DoModal();
switch (nResponse)
{
case IDC_BUTTON1:// DialogExtract
m_iSteps=DIALOG_A;
break;
case IDC_BUTTON2:// DialogMKArc
m_iSteps=DIALOG_B;
break;
case IDCANCEL:
m_iSteps=DIALOG_NO;
break;
}
}
break;
case DIALOG_A://DialogA
{
CString ArcFileName;

char CurDir[MAX_PATH];
GetCurrentDirectory(MAX_PATH,CurDir);
char drive[MAX_PATH];
char dir[MAX_PATH];
char fname[MAX_PATH];
char ext[10];
_splitpath(ArcFileName,drive,dir,fname,ext);
//
CFileDialog fd(TRUE);//open
//you do not set: m_pMainWnd = &fd;

fd.m_ofn.lpstrTitle="Open Archive File"; 
fd.m_ofn.lpstrInitialDir=strcat(drive,dir);
fd.m_ofn.lpstrFile=strcat(fname,ext); 
fd.m_ofn.lpstrFilter="ARC archive file(*.arc)\0*.arc\0";
fd.m_ofn.Flags|=OFN_FILEMUSTEXIST;
//one file fd.m_ofn.Flags|=OFN_ALLOWMULTISELECT;
fd.m_ofn.Flags|=OFN_NODEREFERENCELINKS;// ".lnk"
//
if (fd.DoModal()==IDOK)
{// invalid file name will be prompted.
// file existence will be checked
ArcFileName=fd.GetPathName();
// afxDump<<ArcFileName;
CArcView ArcView;
// m_pMainWnd = &ArcView;
m_pCurrentDlg = &ArcView;
ArcView.m_ArcFileName = ArcFileName;
ArcView.DoModal();
}
// directory changed
SetCurrentDirectory(CurDir);
m_iSteps=DIALOG_NO;

}
break;
case DIALOG_B://DialogB
{
make_arc dlgB; 
m_pCurrentDlg=&dlgB;
nResponse = dlgB.DoModal();
switch (nResponse)
{
case IDOK:
m_iSteps=DIALOG_MAIN;
break;
case IDCANCEL:
m_iSteps=DIALOG_NO;
break;
}
}
// any other dialog
break;
default:
m_iSteps=DIALOG_NO;
}// end switch (m_iSteps)
//afxDump << m_iSteps << "\n" ;
m_pCurrentDlg=0;
}// end while m_iSteps
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}