c++ - From Qt, under Win7, how to know which window style is used for display? -


i'd workaround this bug. need know if user display configuration under window7 using "aero" or "classic" style.

is there way that?

i tried qapplication::style()->objectname() alsways returns me "windowsvista" whatever style selected....

that can done winapi. in case of windows 7 (and possibly vista, 8 , 10):

// true == aero theme, false == classic theme bool isaeroenabled() {     hmodule library = loadlibrary(l"dwmapi.dll");     bool result = false;     if (library) {         bool enabled = false;         hresult (winapi *pfn)(bool *enabled) = (hresult (winapi *)(bool *enabled))(getprocaddress(library, "dwmiscompositionenabled"));         result = succeeded(pfn(&enabled)) && enabled;         freelibrary(library);     }     return result; } 

for older windows versions please follow get windows theme? question.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -