|
-
April 10th, 1999, 05:57 AM
#1
How can I control Child Window in MDI
Hi,
I need your help.
How can I control every Child Window in MDI.
I'd like to apply any different constant(number) to every Child Window.
How can I do that.
Please help me !!!!!
Thanke you in advance.
Drago
-
April 12th, 1999, 06:15 AM
#2
Re: How can I control Child Window in MDI
What do you mean by
> I'd like to apply any different constant(number) to every Child Window.
Dave
-
April 12th, 1999, 04:07 PM
#3
Define more exactly my question
Hi,
Thank you for interest to my question.
I mean that I can't recognize every child window.
I suppose that I must apply any mark to make recognize every child window.
Just for example: Opening a new File and add to it differents parameters
which are special for this document and after that control all views by this parameters. And then use GetFirsDocTemplatePosition() and GetNextDocTemplate() to control all views.
Waiting you reply.
Thank you.
Drago
-
April 13th, 1999, 04:11 AM
#4
Re: Define more exactly my question
I'm still not sure what you're trying to do, but if you want to be able to identify views according to the document type they are attached to, access them via the document itself with GetFirstViewPosition/GetNextView.
If you want to identify individual view instances by some criterion, you'll need to give them a method you can use to query their identity, based on that criterion.
If you want to identify views by their class type, use run-time type identification, or the new-style dynamic cast.
Dave
-
April 13th, 1999, 02:36 PM
#5
Thank you very much Dave !
I'd like to thank you for this answer. You describe my problem exactly(to identify individual view instances by some criterion). Now I understood what must I do, but if it's posible please give me more information about this.
Thank you once again.
Drago
-
October 13th, 1999, 03:19 AM
#6
Re: How can I control Child Window in MDI
Hi! I have the same problem. If you know how to solve it replay me please.
Thanks
-
October 16th, 1999, 02:45 AM
#7
Re: How can I control Child Window in MDI
Hi Victoria,
I remembered that my problem was that I could not got a pointer of each MDI Child Window and use it for access to MDI Child's.
Here what I had done:
For storing each pointer to MDI Child I use CObList object. And when I open a new Document I put a pointer of this document using AddHead(this). And when I close a document I remove it's poiter from this CObList using:
POSITION posDoc = pList->Find(this);
pList->RemoveAt(posDoc);
Where pList is declare in CMyFrame.h like that:
CObList* pList;
For each MDI Child Window you have a Document. And when you have a poiter to this Document you are able to control a View's of MDI Child Windows with:
POSITION pos = pDoc->GetFirstViewPosition();
while (pos != NULL)
{
CView pView = pDoc->GetNexView(pos)
}
This pDoc is pointer to your CDocument derived class. You store it into CObList. And you have a pointer to your class derived from CDocument for each open MDI Child Window.
I hope that help you.
Please let me know if this work or not.
[email protected]
Regards: Drago
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|