Launching a CMiniFrame/CDocument/CView from CDialog
-
Hi All, Been stuck with this problem for quite sometime now, tried some other discussion group - no help, hope someone here can help me.... I would like to launch a CMiniFrameWnd/CDocument/CView derived objects from a Dialog based program (Doc/View was not selected during AppWizard).This window is a floating window above MyDialog and contains all the built-in Doc/View architecture when launched. This is what I have done up to now:- BOOL CTestApp::InitInstance() { Other stuffs..... CSingleDoctemplate* pDocTemplate; pDocTemplate=new CSingleDocTemplate( IDR_MINIFRAME, // I also have a problem understanding the string // resource needed for this value here, no menu, // no icon RUNTIME_CLASS(CMyDoc), RUNTIME_CLASS(CMyMiniFrame), RUNTIME_CLASS(CMyView)); AddDocTemplate(pDocTemplate); CMyDlg dlg; int nResponse=dlg.DoModal(); etc etc } void CMyDlg::OnButton1() { // Here is where I would like to launch my floating Doc/View Frame // I have no idea how to do it...... } Thanks For any help :-) Mustafa
-
Hi All, Been stuck with this problem for quite sometime now, tried some other discussion group - no help, hope someone here can help me.... I would like to launch a CMiniFrameWnd/CDocument/CView derived objects from a Dialog based program (Doc/View was not selected during AppWizard).This window is a floating window above MyDialog and contains all the built-in Doc/View architecture when launched. This is what I have done up to now:- BOOL CTestApp::InitInstance() { Other stuffs..... CSingleDoctemplate* pDocTemplate; pDocTemplate=new CSingleDocTemplate( IDR_MINIFRAME, // I also have a problem understanding the string // resource needed for this value here, no menu, // no icon RUNTIME_CLASS(CMyDoc), RUNTIME_CLASS(CMyMiniFrame), RUNTIME_CLASS(CMyView)); AddDocTemplate(pDocTemplate); CMyDlg dlg; int nResponse=dlg.DoModal(); etc etc } void CMyDlg::OnButton1() { // Here is where I would like to launch my floating Doc/View Frame // I have no idea how to do it...... } Thanks For any help :-) Mustafa
given that a dialog will by default be modal it will have the focus of your app until it closes ... to launch another dialog would be trivial ... launching a non-modal window would be like launching a modeless dialog as far as i can tell ... you would have to post a message to the modeless window if the modal dialog closed also if you didn't include doc/view support during appwizard phase a lot of support code will not be included so as far as i can see you'll be doing a lot of work to get it done ... can you not structure your app differently to make life easier? :suss: mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them