Esempio n. 1
0
        public bool DrawThemeBackground(UxThemeElements eName, IntPtr hDC, int nPartID, int nStateID, ref RECT BGRect, IntPtr pClipRect)
        {
            IntPtr hTheme = GetTheme(eName);

            if (hTheme != IntPtr.Zero)
            {
                return(ThemeRoutines.DrawThemeBackground(hTheme, hDC, nPartID, nStateID, ref BGRect, pClipRect) == 0);
            }

            return(false);
        }
Esempio n. 2
0
        public bool DrawThemeBackground(UxThemeElements eName, IntPtr hDC, int nPartID, int nStateID, ref Rectangle BGRect, ref Rectangle ClipRect)
        {
            IntPtr hTheme = GetTheme(eName);

            if (hTheme != IntPtr.Zero)
            {
                RECT BGRECT   = BGRect;
                RECT ClipRECT = ClipRect;

                return(ThemeRoutines.DrawThemeBackground(hTheme, hDC, nPartID, nStateID, ref BGRECT, ref ClipRECT) == 0);
            }

            return(false);
        }
Esempio n. 3
0
        public IntPtr GetTheme(UxThemeElements eName)
        {
            string strName = Enum.GetName(typeof(UxThemeElements), eName);

            if (EnsureTheme(strName))
            {
                IntPtr pTheme;

                if (m_pLoadedThemes.TryGetValue(strName, out pTheme))
                {
                    return(pTheme);
                }
            }

            return(IntPtr.Zero);
        }
Esempio n. 4
0
        public bool GetThemeInt(UxThemeElements eName, int nPartID, int nStateID, int nPropID, out int nPropVal)
        {
            IntPtr hTheme = GetTheme(eName);

            return(ThemeRoutines.GetThemeInt(hTheme, nPartID, nStateID, nPropID, out nPropVal) == 0);
        }
Esempio n. 5
0
        public bool GetThemeBackgroundRegion(UxThemeElements eName, IntPtr hDC, int nPartID, int nStateID, ref RECT windowRect, out IntPtr pRegion)
        {
            IntPtr hTheme = GetTheme(eName);

            return(ThemeRoutines.GetThemeBackgroundRegion(hTheme, hDC, nPartID, nStateID, ref windowRect, out pRegion) == 0);
        }
Esempio n. 6
0
        public bool GetThemeBackgroundRegion(UxThemeElements eName, IntPtr hDC, int nPartID, int nStateID, Rectangle windowRect, out IntPtr pRegion)
        {
            RECT winRECT = windowRect;

            return(GetThemeBackgroundRegion(eName, hDC, nPartID, nStateID, ref winRECT, out pRegion));
        }
Esempio n. 7
0
        public bool GetThemeBackgroundContentRect(UxThemeElements eName, IntPtr hDC, int nPartID, int nStateID, ref RECT windowRect, out RECT contentRect)
        {
            IntPtr hTheme = GetTheme(eName);

            return(ThemeRoutines.GetThemeBackgroundContentRect(hTheme, hDC, nPartID, nStateID, ref windowRect, out contentRect) == 0);
        }
Esempio n. 8
0
        public bool IsThemeBackgroundPartiallyTransparent(UxThemeElements eName, int nPartID, int nStateID)
        {
            IntPtr hTheme = GetTheme(eName);

            return(ThemeRoutines.IsThemeBackgroundPartiallyTransparent(hTheme, nPartID, nStateID) == 0);
        }