Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Is there a way to tell if Aero and Glass is in use on vista and win 7 ?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Jun 30, 2016 3:56 AM Last Post By: Asger Joergensen
Asger Joergensen

Posts: 370
Registered: 11/18/08
Is there a way to tell if Aero and Glass is in use on vista and win 7 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 4:51 AM
Hi there

Is there a way to tell if Aero and Glass is in use on vista and win 7 ?

I need to change the appearance of my program if it isn't.

Thanks in advance
Best regards
Asger
Martin van der ...

Posts: 57
Registered: 7/14/02
Re: Is there a way to tell if Aero and Glass is in use on vista and win 7 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 5:48 AM   in response to: Asger Joergensen in response to: Asger Joergensen
Yes, this: https://msdn.microsoft.com/en-us/library/windows/desktop/aa969518(v=vs.85).aspx

Note that if you need to support Windows versions older than Vista, you'll need to make sure that the dwmapi library is not statically linked, but dynamically loaded in some way otherwise your application won't start without it.
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Is there a way to tell if Aero and Glass is in use on vista and win 7 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 3:06 PM   in response to: Martin van der ... in response to: Martin van der ...
Martin van der Plas wrote:
Yes, this: https://msdn.microsoft.com/en-us/library/windows/desktop/aa969518(v=vs.85).aspx

Thanks for your answer.
That seem to work on my Win 7, but when I run it on my win 10 it say Aero is Enabled even though my Win 10
show no Aero glass or any such features, so this does not really do the trick in my case.

Is there any way to know if the glass borders / caption is showing ?

Best regards
Asger
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there a way to tell if Aero and Glass is in use on vista and win7 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 3:21 PM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger wrote:

That seem to work on my Win 7, but when I run it on my win 10
it say Aero is Enabled

Per the note in the documentation:

Note: As of Windows 8, DWM composition is always enabled. If an app declares
Windows 8 compatibility in their manifest, this function will receive a value
of TRUE through pfEnabled. If no such manifest entry is found, Windows 8
compatibility is not assumed and this function receives a value of FALSE
through pfEnabled. This is done so that older programs that interpret a value
of TRUE to imply that high contrast mode is off can continue to make the
correct decisions about rendering their images. (Note that this is a bad
practice—you should use the SystemParametersInfo function with the SPI_GETHIGHCONTRAST
flag to determine the state of high contrast mode.)

--
Remy Lebeau (TeamB)
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Is there a way to tell if Aero and Glass is in use on vista and win7 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 3:27 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:

Per the note in the documentation:

Note: As of Windows 8, DWM composition is always enabled. If an app declares
Windows 8 compatibility in their manifest, this function will receive a value
of TRUE through pfEnabled. If no such manifest entry is found, Windows 8
compatibility is not assumed and this function receives a value of FALSE
through pfEnabled. This is done so that older programs that interpret a value
of TRUE to imply that high contrast mode is off can continue to make the
correct decisions about rendering their images. (Note that this is a bad
practice—you should use the SystemParametersInfo function with the SPI_GETHIGHCONTRAST
flag to determine the state of high contrast mode.)

Yes I've seen that Remy, but that does not help me at all. :(

Do you know anything that can help me in my quest ?

Best regards
Asger
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Is there a way to tell if Aero and Glass is in use on vista andwin7 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 29, 2016 4:43 PM   in response to: Asger Joergensen in response to: Asger Joergensen
Asger wrote:

Yes I've seen that Remy, but that does not help me at all. :(

It explains the "it say Aero is Enabled even though my Win 10 show no Aero
glass" part, because of the "As of Windows 8, DWM composition is always enabled"
caveat. The fact that it is returning TRUE on Win10 means your app "declares
Windows 8 compatibility in [its] manifest".

Why do you need to detect Aero in the first place? What are you really trying
to accomplish with the information? You said "I need to change the appearance
of my program if it isn't", but you did not explain why. Maybe there is
a different solution to your core issue.

--
Remy Lebeau (TeamB)
Asger Joergensen

Posts: 370
Registered: 11/18/08
Re: Is there a way to tell if Aero and Glass is in use on vista andwin7 ?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 30, 2016 3:56 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:

Why do you need to detect Aero in the first place? What are you really trying
to accomplish with the information? You said "I need to change the appearance
of my program if it isn't", but you did not explain why. Maybe there is
a different solution to your core issue.

Picture of my problem: http://asger-p.dk/Win7and10.png
Missing the thick frame and Aero look.

I could maybe just check if it is a Windows newer than 7 and then only on win 7 and Vista
check if Aero is on, but I have seen that it is possible to get the Vista look on Win 10,
so that's why I would prefer to check if big borders and glassy look is in use.

Any idears ?

Thanks in advance
Best regards
Asger
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02