MDI - active window title

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

MDI - active window title

Post 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.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: MDI - active window title

Post 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.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: MDI - active window title

Post 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.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: MDI - active window title

Post by Vasyl-Tracker Dev Team »

Hi,

We will check this trouble.

Thanks.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: MDI - active window title

Post 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.
Attachments
Test.zip
(90.35 KiB) Downloaded 286 times
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
anovy
User
Posts: 164
Joined: Mon Feb 08, 2010 8:48 am

Re: MDI - active window title

Post 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.
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: MDI - active window title

Post 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.
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Post Reply