public VisualTheme(IWin32Window window, string classList, OpenThemeDataOptions opt = OpenThemeDataOptions.None) { var ptr = OpenThemeDataEx(new HandleRef(window, window?.Handle ?? IntPtr.Zero), classList, opt); hTheme = new SafeThemeHandle(ptr); if (hTheme.IsInvalid) { throw new Win32Exception(); } }
public static extern IntPtr OpenThemeDataEx(IntPtr hWnd, string classList, OpenThemeDataOptions dwFlags);