Office 2010 Theme Focus Issue

Report TD 5.x and 6.x bugs and possible workarounds.
kseddie

Office 2010 Theme Focus Issue

Post by kseddie » 11 May 2015, 06:00

Hi

We have a focus issue when the theme is set to Office 2010. The issue is when two forms are open (on top of each other, with the X button just visible of the background form). If you move the mouse to the X of the background form so that the X has focus (is red) and then move them mouse back to the X of the front form and click, the result is that the background form is maximised instead of the front form closing.

For some reason the focus remains on the background form, made obvious by the maximising and the fact that the X of the front form does not go red.

I have attached a test.exe. Click on Form 1 and then Form 2 and then follow the instructions.

If the theme is set to native windows xp or office xp this does not happen.

We would really like to stay with the office 2010 theme, is there any fix to this issue?

Thanks K
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Office 2010 Theme Focus Issue

Post by Dave Rabelink » 11 May 2015, 06:24

Please attach the source also. The ZIP only contains the executable.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

kseddie

Re: Office 2010 Theme Focus Issue

Post by kseddie » 11 May 2015, 22:27

Oops, sorry. Source code attached.
You do not have the required permissions to view the files attached to this post.

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Office 2010 Theme Focus Issue

Post by Dave Rabelink » 12 May 2015, 08:05

I tested this on TD6.3 and the issue is there also.

It applies to all office themes 2007 and 2010, not only 2010.
And only when the form is a MDI child.

So better move this thread to bug reports.

As for a workaround, I checked that WM_NCHITTEST on the hWNdFrame of the window which is on top is send multiple times.
It seems that one or more of them are coming from the other form. In those cases it returns HTNOWHERE, which should be one of the HT caption button constants.

The only workaround I can think of (no idea if this will actually work) is to subclass the messages from hWndFrame, detect that the mouse enters the form and capture the mouse explicitly on hWndFrame. It might force the detection of the correct WM_NCHITTEST.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 3 guests