![]() |
|
#1
|
|||
|
|||
Transferring Data between documentsHi there
I have been working awhile with my mfc multiple document interface program, and have reached a point where i would like it to include a different type of document in the program and also to be able to transfer data from instances of the original document type to it. I have made a new document and view type and can open it, this was simple. But i've found it quite difficult to see where in the whole program one can access the different instances of the docs running within the program. Is this not a common task? Do you need to transfer data back to the main appplication object and then trasfer it out to other documents that way? Or will i be forced to just use a view with splitter windows and just go between them. It seems as if each view is like a completely separate program. Any rough pointers as to how i might go about this would be a great help. Cheers Nick |
|||
|
#2
|
|||
|
|||
Forgot to mention!I'm using mfc with Visual C++ 6.0 by the way!
|
|
#3
|
|||
|
|||
|
As I understood you have different kind of documents and you want to access form one doc to data of another. If that what it is then here is how you do it:
CPP / C++ / C Code:
|
|
#4
|
|||
|
|||
|
Well that looks blooming marvelous thankyou so much, i couldn't find that info anywhere.
|
|
#5
|
|||
|
|||
|
Yeah i got the info from one doc to another, that's great, but could you tell me where i specify the name ("SomeName"). In fact in my app the little box that comes up asking which document type you want to open has the same name twice in it, though they do create different documents. Obviously i have diffferent names for the Doc and View though this dosent show in the aforementioned box. Is it done somewhere with new CMultiDocTemplate()?
Any more help much appreciated! Nick |
|
#6
|
|||
|
|||
|
Quote:
CPP / C++ / C Code:
IDR_ANOTHERNAMETYPE and IDR_SOMENAMETYPE are both strings and menus. Menu I suppose you know how to do, but string is a bit tricky. Example for IDR_SOMENAMETYPE string and SomeName doc name: \nSomeName\nSomeName\nSomeName Files (*.aaa)\n.aaa\nSomeProject.Document\SomeName Document Look in CDocTemplate::GetDocString(..) explanation for more details. |
|
#7
|
|||
|
|||
|
Hmm, still having some trouble changing that string but i'll work something out.
Cheers again my friend, you've been a great help. |
Recent GIDBlog
Master?s Degree by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 13:12 |
| Mrs | stacy12 | C Programming Language | 14 | 05-Feb-2005 18:02 |
| Transferring data between arrays | butters | C Programming Language | 3 | 07-Jul-2004 22:55 |
| [CONTEST?]Data Structure Test | dsmith | C Programming Language | 2 | 06-Jun-2004 15:13 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The