SetParent() private méthode

private SetParent ( HWND child, HWND newParent ) : BOOL
child HWND
newParent HWND
Résultat BOOL
Exemple #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);
        }
        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);
        }