SetParent() private method

private SetParent ( HWND child, HWND newParent ) : BOOL
child HWND
newParent HWND
return BOOL
Ejemplo n.º 1
0
        private INativeWindow ConstructMessageWindow()
        {
            INativeWindow nativeWindow = (INativeWindow) new NativeWindow();

            nativeWindow.ProcessEvents();
            Functions.SetParent((nativeWindow.WindowInfo as WinWindowInfo).WindowHandle, Constants.MESSAGE_ONLY);
            nativeWindow.ProcessEvents();
            return(nativeWindow);
        }
Ejemplo n.º 2
0
        INativeWindow ConstructMessageWindow()
        {
            Debug.WriteLine("Initializing input driver.");
            Debug.Indent();

            // Create a new message-only window to retrieve WM_INPUT messages.
            INativeWindow native = new NativeWindow();

            native.ProcessEvents();
            WinWindowInfo parent = native.WindowInfo as WinWindowInfo;

            Functions.SetParent(parent.Handle, Constants.MESSAGE_ONLY);
            native.ProcessEvents();

            Debug.Unindent();
            return(native);
        }