Comments (4)
@augustoproiete, some complications. I do get a handle to a RichEditD2DTP window, but the text is never shown there. Digging further into it.
from serilog-sinks-notepad.
Excellent. Thanks @bstordrup
from serilog-sinks-notepad.
OK. Found the issue. It seems like there has been a change in the structure of Notepad. I think it might be an internal structuring change in the application.
The version of Notepad that I have supports multiple documents in the same instance, so the RichEditD2DPT is not a direct child of the MainWindowHandle - it is located inside another window with ClassName "NotepatTextBox".
The structure is illustrated on the image.
- Entry 0 is the main window with class name Notepad
- Entry 4 is a window with class name NotepadTextBox. Parent window is Entry 0
- Entry 5 is a window with class name RichEditD2PDT. Parent window is Entry 4.
I think earlier, RichEditD2PDT had the Main window a direct parent. So my change is that if I do not find a window handle by the direct FindWindowEx call with RichEditD2DPT, the child windows below MainWindowHandle is enumerated and the RichEditD2DPT handle is returned.
from serilog-sinks-notepad.
A new issue now is that the Notepad application can have multiple documents open, and hence have multiple entries in the list with class name RichEditD2DPT. Then which one should be selected? It seems like the last one opened is the first one being found, so returning that one should be safe.
from serilog-sinks-notepad.
Related Issues (9)
- Convert sink to PeriodicSink HOT 1
- Update Serilog.Sinks.Notepad build process to use Cake v2.0.0
- Add net5.0 target to Serilog.Sinks.Notepad HOT 1
- Access error to Notepad window HOT 5
- Finding a renamed notepad process
- Update Serilog.Sinks.Notepad build process to use Cake v2.3.0
- Update serilog-sinks-notepad build process to use Cake v3.0.0
- Add support for .NET 6.0 & Serilog 2.12.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serilog-sinks-notepad.