Programmer’s Notepad has long needed an improved Regular Expressions engine. Currently PN uses PCRE for all tasks but searching Scintilla. This is because PCRE doesn’t support searching anything but a memory buffer - i.e. it doesn’t support iterators. We need iterator (or indirect access) support because a regex engine for a text editor can’t expect [...]
Category Archives: vc++
Regular Expressions Enhancements
Programmer’s Notepad currently uses two different regex engines for different parts of code:
The excellent PCRE: Used by the PN code for matching output strings and in a couple of other internal bits of code.
The tiny engine built into Scintilla. This is a very limited regular expressions engine, designed for embedded scintilla use rather than use [...]
XmlLite
MSDN Magazine points to an interesting lightweight Xml reader/writer framework for non-managed use called XmlLite.
It uses a COM interface (via IUnknown etc.) without the overhead of actually instantiating via COM (COM Lite). XmlLite is basically a port of XmlReader and XmlWriter from the .NET framework to native C++ - providing a significant speed boost over [...]
XP “Visual Styles” Manifests in Visual Studio 2005
I’ve been doing some work in Visual Studio 2005 and it no longer supports embedding your XML manifest file through resources. Instead you have to specify some additional manifest dependencies - because of course that’s easier?!
I can never remember how to do this and rather than duplicate the information here, I’ll link to Jim Mathies’ [...]
Visual C++ 2005 stringstream leak
I spent about five or six hours on Friday last week chasing down a memory leak that had appeared in some software at work that had previously been trouble free. I eventually tracked the leak down to a library used in multiple products that didn’t seem to leak elsewhere. Every time I used the library [...]
Visual C++ 2005 Resource Editor Not Working
One of my guys at work had a problem with his new VS 2005 install, everything worked fine for compiling but he couldn’t actually edit his resources. For some reason he would get error: RC1107, and the resource editor would refuse to list or show resources of any type.
Bizarrely, the fix for the bug is [...]
Visual Studio: Stop Building That Project!
I regularly work on a Visual Studio solution at work with 40+ individual projects in it. Irritatingly, many of them have begun to suffer from the “always rebuilt” problems that recent versions of Visual Studio (2002-2005) have shown. I decided to try and fix these things today and so here are a list of things [...]
Building DirectDraw projects with VS2005
DirectDraw has been deprecated by Microsoft and the headers are no longer included by default with Visual Studio 2005. If you get an error about being unable to find ddraw.h then you need to install the latest DirectX SDK (Dec 2005 or greater is compatible with VS 2005).
If you still have missing headers (perhaps “amvideo.h” [...]
Alpha Blended Toolbar Images on XP+
I wanted the next release of PN to have some nicer icons, as the roughness of the toolbar images was jarring. The best way to get good looking smooth images on a toolbar is to use images with an alpha channel. Unfortunately this is only supported in XP and up, but I think it’s a [...]
Middle Click Close in Visual Studio
A long time ago I added middle-click to close tabs in PN - a popular choice. At the time I moaned about this not being supported in Visual Studio. When the VS 2005 development betas were out, myself and many others requested this feature.
Microsoft’s response was that this was not a standard windows UI feature [...]