Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 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);
Esempio n. 6
0
 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);
     }
 }