Detect Windows Style
Posted: Sat Dec 11, 2010 12:53 am
Is there a way i can do this? like If in windows 7, I wanna detect if the users is currently using aero style or the old windows 95 style.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Procedure DwmIsCompositionEnabled()
Protected *pfn,Lib,result
Lib = LoadLibrary_("dwmapi.dll")
If Lib
*pfn = GetProcAddress_(Lib, "DwmIsCompositionEnabled")
If *pfn
Result = CallFunctionFast(*pfn)
EndIf
FreeLibrary_(Lib)
EndIf
ProcedureReturn result
EndProcedure
Debug DwmIsCompositionEnabled()
Code: Select all
Prototype DwmIsCompositionEnabled(*pfEnabled)
Procedure DwmIsCompositionEnabled()
Protected fpIsCompositionEnabled.DwmIsCompositionEnabled
Protected Lib, result
Lib = OpenLibrary(#PB_Any, "dwmapi.dll")
If Lib
fpIsCompositionEnabled = GetFunction(Lib, "DwmIsCompositionEnabled")
If fpIsCompositionEnabled
fpIsCompositionEnabled(@result)
EndIf
CloseLibrary(Lib)
EndIf
ProcedureReturn result
EndProcedure
Debug DwmIsCompositionEnabled()