Exemplo n.º 1
0
        internal static void SetTitleAndIconVisibility(IntPtr hwnd, bool visible)
        {
            if (isSupported)
            {
                const WinApi.WTNCA mask = WinApi.WTNCA.NoDrawCaption | WinApi.WTNCA.NoDrawIcon | WinApi.WTNCA.NoSysMenu;
                var flags = visible ? default(WinApi.WTNCA) : mask;

                var options = new WinApi.WTA_OPTIONS { Flags = flags, Mask = mask };
                WinApi.SetWindowThemeAttribute(hwnd, WinApi.WINDOWTHEMEATTRIBUTETYPE.NonClient,
                    ref options, WinApi.WTA_OPTIONS.Size);
            }
        }
Exemplo n.º 2
0
        internal static void SetTitleAndIconVisibility(IntPtr hwnd, bool visible)
        {
            if (isSupported)
            {
                const WinApi.WTNCA mask = WinApi.WTNCA.NoDrawCaption | WinApi.WTNCA.NoDrawIcon | WinApi.WTNCA.NoSysMenu;
                var flags = visible ? default(WinApi.WTNCA) : mask;

                var options = new WinApi.WTA_OPTIONS {
                    Flags = flags, Mask = mask
                };
                WinApi.SetWindowThemeAttribute(hwnd, WinApi.WINDOWTHEMEATTRIBUTETYPE.NonClient,
                                               ref options, WinApi.WTA_OPTIONS.Size);
            }
        }