Skip to content

Excluding child window events #17

@Dr-Hex

Description

@Dr-Hex

Hi,
I'm trying to subscribe create window event and exclude one emitted by children.
However, it seems the child windows is still generating events.
Can you suggest please, what is wrong here:

            var winEventObservable = WinEventHook.Create(
                Dapplo.Windows.Enums.WinEvents.EVENT_OBJECT_CREATE 
                ).Where(winEventInfo => 
                winEventInfo.IsSelf &&
                winEventInfo.ObjectIdentifier == Dapplo.Windows.User32.Enums.ObjectIdentifiers.Window
                )
                .Select(info => InteropWindowFactory.CreateFor(info.Handle).Fill())
                .Subscribe(interopWindow =>
                {
                    Console.WriteLine("Window created: {0}. Title = {1}", interopWindow.Handle, interopWindow.Caption);
                    replaySubject.OnNext(interopWindow);
                }, exception => Console.WriteLine("An error occured: {0}", exception));

Thank you for the nice project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions