reset mdi child view position

638 views Asked by At

I have a MDI application using CMAXMultiDocTemplate for child doc/view. Every time calling the OpenDocumentFile() will create and show a new child view. The first window position starts from X=0 and Y=0 and then every followed newly created child window has added an offset of X=29 and Y=29 by default to display all child windows on cascade style. If I close all child windows, the next newly create still using the current position to place the windows on bottom of the application main frame until total window number goes to 11.

Is there any way to reset the starting position of new created child window to X=0 and Y=0 whenever all child windows are closed?

Thanks.

CK

2

There are 2 answers

0
Nikolay On BEST ANSWER

No, there is no way to reset the "internal counter".

1
xMRi On

There is no way to reset the internal offsets.

But it is easy to use your own MDI Child Window class and to preset the window positions as you want. PreCreateWindow is a good location to specify the postions and size you want.