예제 #1
0
 public static void DrawThemeTextActive(
     Graphics aGraph,
     string aText,
     Point aLocation,
     SUxTextProperties aProp
     )
 {
     IntPtr lPriHdc = aGraph.GetHdc();
     VisualStyleRenderer lRenderer = new VisualStyleRenderer(VisualStyleElement.Window.Caption.Active);
     DTTOPTS lOpts = new DTTOPTS();
     lOpts.dwSize = Marshal.SizeOf(lOpts);
     lOpts.dwFlags = DTT_COMPOSITED | DTT_GLOWSIZE | DTT_TEXTCOLOR;
     lOpts.crText = ColorTranslator.ToWin32(aProp.color);
     lOpts.iGlowSize = aProp.glowSize;
     RECT ltBounds = new RECT(0, 0, aProp.bounds.Width, aProp.bounds.Height);
     DrawThemeTextEx(
                 lRenderer.Handle,
                 lPriHdc,
                 0, 0,
                 aText,
                 -1,
                 (int)(aProp.flags),
                 ref ltBounds,
                 ref lOpts
             );
 }
예제 #2
0
        public static void DrawThemeTextActive(
            Graphics aGraph,
            string aText,
            Point aLocation,
            SUxTextProperties aProp
            )
        {
            IntPtr lPriHdc = aGraph.GetHdc();
            VisualStyleRenderer lRenderer = new VisualStyleRenderer(VisualStyleElement.Window.Caption.Active);
            DTTOPTS             lOpts     = new DTTOPTS();

            lOpts.dwSize    = Marshal.SizeOf(lOpts);
            lOpts.dwFlags   = DTT_COMPOSITED | DTT_GLOWSIZE | DTT_TEXTCOLOR;
            lOpts.crText    = ColorTranslator.ToWin32(aProp.color);
            lOpts.iGlowSize = aProp.glowSize;
            RECT ltBounds = new RECT(0, 0, aProp.bounds.Width, aProp.bounds.Height);

            DrawThemeTextEx(
                lRenderer.Handle,
                lPriHdc,
                0, 0,
                aText,
                -1,
                (int)(aProp.flags),
                ref ltBounds,
                ref lOpts
                );
        }