예제 #1
0
        private void RelocateWindow(PerPixelAlphaWindow w)
        {
            if (_rightOffset == -1)
            {
                var r       = NativeThemeUtils.GetTitleBarInfoEx(Handle);
                var rectBtn = r.GetRectangle(CchildrenTitlebarConstants.CchildrenTitlebarMinimizeButton);
                var rectTbl = r.rcTitleBar;
                _rightOffset = rectTbl.Width - (rectTbl.right - rectBtn.left);
            }

            w.Left = Left + Width - BtnsOffset - _rightOffset;
            w.Top  = Top;
        }
 private static Size QueryTitlebarButtonSize()
 {
     return(NativeThemeUtils.GetTitleBarInfoEx()
            .GetRectangle(CchildrenTitlebarConstants.CchildrenTitlebarMinimizeButton).Size);
 }