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. MDI application

MDI application

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++sysadmin
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.
  • T Offline
    T Offline
    The_Server
    wrote on last edited by
    #1

    How can I create an MDI application in MFC ?? A) NOT Doc/View B) Dialog Based there is a way in the MFC app wizard, at the end before 'Finish' Change from 'CView' to 'CFormView'. Then it's a dialog BUT Doc/View. Is there any easy other way ?? Name: STR BTW: for some of you that wished for CodeProject irc server I create a channle on DalNet called "#CodeProject"

    U 1 Reply Last reply
    0
    • T The_Server

      How can I create an MDI application in MFC ?? A) NOT Doc/View B) Dialog Based there is a way in the MFC app wizard, at the end before 'Finish' Change from 'CView' to 'CFormView'. Then it's a dialog BUT Doc/View. Is there any easy other way ?? Name: STR BTW: for some of you that wished for CodeProject irc server I create a channle on DalNet called "#CodeProject"

      U Offline
      U Offline
      Ulf Ohlen
      wrote on last edited by
      #2

      Don't know if this is an "easy" way, but it seems to work (I haven't tested it much). The idea is to replace the generated view window with a property page. 1. Generate a standard MDI project without Doc/View support. 2. Remove the generated CWnd derived view class from the project. 3. Add a FormView dialog resource and create a new CPropertyPage derived class attached to it. 4. In your CMDIChildWnd, replace the old view with an instance of your new CPropertyPage class. 5. In the child frame's WM_CREATE handler, remove the code to create the old view. Replace it with something like this:

      m_wndView.Create(IDD_MAINVIEW, this); // Create a CPropertyPage based view
      SetWindowLong(m_wndView.m_hWnd, GWL_STYLE, WS_CHILD | WS_VISIBLE); // Make it a child to the childframe
      m_wndView.SetDlgCtrlID(AFX_IDW_PANE_FIRST); // Set the view to be first pane.

      6. In CChildFrame::OnCmdMsg(), don't call the view's OnCmdMsg. -------------- "Aagh!! I'm a victim of a Random Act of Management!"

      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