Page 1 of 1

MDI - active window title

Posted: Sun Apr 25, 2010 7:16 am
by anovy
Hi,
In the classic MDI mode (no tabbed view) the active document window has never title with 'active style'. It happens also in your FullDemo example, so I think it is not problem of my container. In your standalone XChange viewer the active window has correct title.

Along the OLE guidelines the container should call the IOleInPlaceActiveObject::OnFrameWindowActivate method which notifies the object when the container’s top-level frame window is activated or deactivated. I do this in my container, but this does not help. So it seems that your implementation of this method is dummy or insufficient.

Re: MDI - active window title

Posted: Mon Apr 26, 2010 1:52 pm
by Vasyl-Tracker Dev Team
Hi, anovy.

This issue will be fixed in the next build.
But you must call IOleInPlaceActiveObject::OnFrameWindowActivate when the container’s top-level frame window is activated or deactivated (in the new build).
Thanks for your hint. :wink:

Best
Regards.

Re: MDI - active window title

Posted: Mon May 17, 2010 2:07 pm
by anovy
Hi,
I just checked the new version 2.0.51, the IOleInPlaceActiveObject::OnFrameWindowActivate is supported, however:

- The MDI window frame is still invalid if the user switches between MDI windows. I can bypass this by calling the IOleInPlaceActiveObject::OnFrameWindowActivate method after receiving document change notification message, but I'm not sure if such approach is correct. Why you don't save the last state so you can draw the frame correctly during any subsequent change?

- The document name in MDI frame does not contain asterisk if the document is changed. In 'Tabbed Documents' mode the asterisk is displayed.

Re: MDI - active window title

Posted: Tue May 18, 2010 6:29 pm
by Vasyl-Tracker Dev Team
Hi,

We will check this trouble.

Thanks.

Re: MDI - active window title

Posted: Thu Jun 03, 2010 1:32 pm
by Vasyl-Tracker Dev Team
Hi anovy.
The MDI window frame is still invalid if the user switches between MDI windows. I can bypass this by calling the IOleInPlaceActiveObject::OnFrameWindowActivate method after receiving document change notification message, but I'm not sure if such approach is correct.
You may call IOleInPlaceActiveObject::OnFrameWindowActivate after receiving activating/deactivating message (WM_ACTIVATE) by your(!) top-level window.
I tried it in my test application - this method works properly (see attachment).
- The document name in MDI frame does not contain asterisk if the document is changed.
This issue will be fixed in the next build.

Thanks.

Re: MDI - active window title

Posted: Fri Jun 04, 2010 1:22 pm
by anovy
Of course I'm calling IOleInPlaceActiveObject::OnFrameWindowActivate while processing WM_ACTIVATE in my top-lewel window procedure (see my previous entry). And IOleInPlaceActiveObject::OnFrameWindowActivate works. I did not claim that it does not work. I only pointed to a fact, that The MDI window frame is still invalid if the user switches between MDI windows. This can be bypassed by calling IOleInPlaceActiveObject::OnFrameWindowActivate also outside WM_ACTIVATE message, however this approach is outside the OLE guidelines. I think you should save in some your internal flag the state of the top-level window (active/inactive) along last OnFrameWindowActivate call and then draw the active MDI window frame accordingly in all subsequent cases. Now you draw the active MDI window frame correctly within the OnFrameWindowActivate method, however all subsequent changes are drawn incorrectly.

Re: MDI - active window title

Posted: Fri Jun 04, 2010 2:14 pm
by Vasyl-Tracker Dev Team
Hi, anovy.
The MDI window frame is still invalid if the user switches between MDI windows
I'm afraid I cannot reproduce this issue in all my test applications (if I understand you correctly).

Can you send us a simple example application reproducing this problem (both source code and the compiled app pls) Zipped?

Thanks.