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. Document/View Architecture - having 1doc and 2 Views

Document/View Architecture - having 1doc and 2 Views

Scheduled Pinned Locked Moved C / C++ / MFC
architecturetutorialquestion
2 Posts 1 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.
  • A Offline
    A Offline
    Alex H 1983
    wrote on last edited by
    #1

    i just want to know if this is possible to have another View Class in MDI and make some Child window that uses this View Class. for example a list classes in a MDI: CChildFrame CMainFrame CMyDoc CMyView -> base class are CView CMy2View -> i added this View Class that its base is not the same as CMyView base class and i want to have a Child Window that use this view class. is this possible or any suggestion? thanks in advance.:)

    A 1 Reply Last reply
    0
    • A Alex H 1983

      i just want to know if this is possible to have another View Class in MDI and make some Child window that uses this View Class. for example a list classes in a MDI: CChildFrame CMainFrame CMyDoc CMyView -> base class are CView CMy2View -> i added this View Class that its base is not the same as CMyView base class and i want to have a Child Window that use this view class. is this possible or any suggestion? thanks in advance.:)

      A Offline
      A Offline
      Alex H 1983
      wrote on last edited by
      #2

      i findout smthing, i have to set a Base class to both CMDIChildWnd and my own base class. and it seems that i have to Set BEGIN_MESSAGE_MAP(CMy2View, CMDIChildWnd) is it true that the only way that a Child Window obey a View class is to make it with this line : CMDIChildWnd::Create(...) So to having a ChildWindow i have to set base to CMDIChildWnd and then i will lose my own base class, i mean i cant use OnPaint() Coz i have to set Message map to CMDIChildWnd. :confused: Any Suggestion ?

      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