8

I have a large legacy application which is showing up with a perpetually grey border on every Windows 8 machine we run it on, while the other windows for other apps accurately use a color derived from the desktop background. For the life of me I can't find out why.

I've tried my best google-fu to crawl MSDN for APIs to control this but came up empty. The app looks like all others in Windows XP, Vista, and 7...just Windows 8 is grey in color. We definitely haven't added Win8 specific code to treat this otherwise.

It's just an MFC window on the outside, but inside it embeds a .NET/WPF component and a Direct3D 9-enabled visual area.

My best guess is it could somehow be related to having a Direct3D surface in the window, but I couldn't validate that anywhere.

Any help would be greatly appreciated!

Thanks

Edit: The grey matches the effect of not having focus, and we definitely do play games with window focus...so that could be it.

SentientAI
  • 401
  • 3
  • 8
  • I do not have a solution for this. It is a known issue for some time now: http://stackoverflow.com/questions/12946642/problems-using-cdialogex-class-that-get-solved-using-cdialog-class-instead – cha Dec 04 '12 at 04:09
  • We may have different issues. I don't inherit from CDialogEx and when I minimize/restore, the color is still grey for me. – SentientAI Dec 04 '12 at 17:37

2 Answers2

2

The problem was a developer overloaded OnNcActivate() and returned TRUE at the end. They needed to call up to the baseclass's (CWnd) OnNcActivate instead.

This was visible on Windows 7 as well if you looked close enough.

SentientAI
  • 401
  • 3
  • 8
1

The Desktop in Windows 8 does not use transparency in window borders like Windows 7 and Vista did with the Aero Themes. If you are move the focus to another top window in your app, this could explain why your seeing the grey border. Try changing the colors for windows without the focus to something discernable from grey to verify that is what you are seeing.

borrillis
  • 656
  • 4
  • 7