Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Launching a CMiniFrame/CDocument/CView from CDialog

Launching a CMiniFrame/CDocument/CView from CDialog

Scheduled Pinned Locked Moved C / C++ / MFC
helparchitecturetutorialdiscussionlearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mustafa
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • M 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

      L Offline
      L Offline
      l a u r e n
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups