예제 #1
0
파일: Win32.cs 프로젝트: liaoyu45/LY
        public static IntPtr TillDesktop(this IntPtr self)
        {
            var p = Win32ApiWrapper.GetParent(self);

            if (p == IntPtr.Zero || p == desktop)
            {
                return(self);
            }
            return(TillDesktop(p));
        }
예제 #2
0
파일: Win32.cs 프로젝트: liaoyu45/LY
        public static bool SameOrBelongTo(this IntPtr self, IntPtr target)
        {
            if (self == target)
            {
                return(true);
            }
            var p = Win32ApiWrapper.GetParent(self);

            if (p.ToInt32() == 0)
            {
                return(false);
            }
            if (p == target)
            {
                return(true);
            }
            return(SameOrBelongTo(p, target));
        }