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