

There are three main built-in search mechanisms: the standard (dialog-based) Find / Replace / Find In Files / Mark, the dialog-free Next / Previous search-navigation, and the Incremental Search.Īll keyboard shortcuts mentioned below are the default values, but are configurable in the Shortcut Mapper. Generating a count of matches is also possible. You can also mark search results with a bookmark on their lines, or highlight the textual results themselves.

Once I knew that, it was just a matter of figuring out the right mix of Win32 function calls to get an HWND for that UI element, and then sending key inputs there.There are multiple methods to search (and replace) text in files. Spy++ revealed that the Notepad child window I was after was the “Edit” window. The second post will talk about using windows hooks to capture input and share the Snake game I built that uses pretty much all the stuff described in both of these posts. I’ll also talk about the ray tracer that I built that rendered into Notepad. This first post will talk about how Memory Scanners work, and how I used one to turn notepad.exe into a 30+ fps capable render target. It seemed like writing up the stuff I learned might make for an interesting read, and give me a chance to show off the dumb stuff I built at the same time, so that’s what these next couple blog posts will be about.ĭue to length, I’ve split the writeup into two blog posts. I ended up making a Snake game and a small ray tracer that use stock Notepad for all input and rendering tasks, and got to learn about DLL Injection, API Hooking and Memory Scanning along the way. Then I spent way too much of my free time doing exactly that. While reading about it, I had the thought that it would be really cool to see something similar that worked with stock Windows Notepad. A few months back, there was a post on Reddit ( link), which described a game that used an open source clone of Notepad to handle all its input and rendering.
