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. New Document in MDI application

New Document in MDI application

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • A Offline
    A Offline
    AllAtSea
    wrote on last edited by
    #1

    I have written a 6502 assembler/diassembler but here is something that has me stumped. I want the disassembler routine to create a new document in which to place it's output. I use a public function in the App class to call OnFileNew(). The new document is created, but not activated, so the disassembler sends it's output to the document that was active when it was called. When the disassembler exits the new document IS active. In other words: I press the disassemble button, a new child window appears but the output from the disassembler goes into the window under it. When the disassembler exits and I type on the keyboard, the keystrokes go into the new child window, the one I wanted to display the output from the disassembler. Could anyone out there show me a code fragment that creates a new document and makes it active please? I program for fun.

    G 1 Reply Last reply
    0
    • A AllAtSea

      I have written a 6502 assembler/diassembler but here is something that has me stumped. I want the disassembler routine to create a new document in which to place it's output. I use a public function in the App class to call OnFileNew(). The new document is created, but not activated, so the disassembler sends it's output to the document that was active when it was called. When the disassembler exits the new document IS active. In other words: I press the disassemble button, a new child window appears but the output from the disassembler goes into the window under it. When the disassembler exits and I type on the keyboard, the keystrokes go into the new child window, the one I wanted to display the output from the disassembler. Could anyone out there show me a code fragment that creates a new document and makes it active please? I program for fun.

      G Offline
      G Offline
      georgeraafat
      wrote on last edited by
      #2

      How do you choose which window to write to? or which document/view to write to? Looks to me that you create the new document/view successfully, but you are still targetting the older (current) document/view... If that's the case, look for how to enumerate documents in the MDI app and then you can direct your output to the write document... gmileka

      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