public SIZE?GetThemePartSize(int partId, int stateId, ThemeSize themeSize) { HResult hr = UxThemeExNativeMethods.UxGetThemePartSize( themeFile, theme, IntPtr.Zero, partId, stateId, null, themeSize, out SIZE value); return(Found(hr) ? value : (SIZE?)null); }
public static extern int GetThemePartSize(SafeThemeHandle hTheme, SafeDCHandle hdc, int part, int state, PRECT pRect, ThemeSize eSize, out Size size);
public static extern SIZE GetThemePartSize( SafeThemeHandle hTheme, HandleRef hdc, int iPartId, int iStateId, CRECT prc, ThemeSize eSize);
public static extern HResult GetThemePartSize( SafeThemeHandle hTheme, IntPtr hdc, int iPartId, int iStateId, CRECT prc, ThemeSize eSize, out SIZE psz);
public static extern int GetThemePartSize(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] CRECT prc, ThemeSize eSize, [Out] SIZE psz);
public Size?GetPartSize(IDeviceContext graphics, int partId, int stateId, Rectangle?destRect, ThemeSize themeSize) { using (var hdc = new Gdi32.SafeDCHandle(graphics)) { Size sz; if (0 != GetThemePartSize(hTheme, hdc, partId, stateId, destRect, themeSize, out sz)) { return(null); } return(sz); } }