IsWindow() private method

private IsWindow ( ClientWindowHandle window ) : int
window ClientWindowHandle
return int
Example #1
0
        private static ClientWindowHandle FindHandle()
        {
            ClientWindowHandle hWnd;

            if (NativeMethods.IsWindow(hWnd = NativeMethods.FindWindowA("Ultima Online", null)) != 0)
            {
                return(hWnd);
            }

            if (NativeMethods.IsWindow(hWnd = NativeMethods.FindWindowA("Ultima Online Third Dawn", null)) != 0)
            {
                return(hWnd);
            }

            Console.WriteLine("not found :/");

            return(ClientWindowHandle.Invalid);
        }
Example #2
0
        private static ClientWindowHandle FindHandle()
        {
            ClientWindowHandle hWnd;

            if (NativeMethods.IsWindow(hWnd = NativeMethods.FindWindowA("Ultima Online", null)) != 0)
            {
                return(hWnd);
            }

            if (NativeMethods.IsWindow(hWnd = NativeMethods.FindWindowA("Ultima Online Third Dawn", null)) != 0)
            {
                return(hWnd);
            }
            if (NativeMethods.IsWindow(hWnd = NativeMethods.FindWindowA("OgreGLWindow", null)) != 0)
            {
                m_Is_Iris2 = true;
                return(hWnd);
            }

            return(ClientWindowHandle.Invalid);
        }