private bool IsCommonCtrl6() { // Cache this value for efficenty if ( bGotIsCommonCtrl6 == false ) { DLLVERSIONINFO dllVersion = new DLLVERSIONINFO(); // We are assummng here that anything greater or equal than 6 // will have the new XP theme drawing enable dllVersion.cbSize = Marshal.SizeOf(typeof(DLLVERSIONINFO)); WindowsAPI.GetCommonControlDLLVersion(ref dllVersion); bGotIsCommonCtrl6 = true; isCommonCtrl6 = (dllVersion.dwMajorVersion >= 6); } return isCommonCtrl6; }
public extern static int GetCommonControlDLLVersion(ref DLLVERSIONINFO dvi);
public extern static int GetCommonControlDLLVersion(ref DLLVERSIONINFO dvi);