The search and replace dialogs in version 2.4 and higher of the brainchild control are non-modal. This will require you to call the newly introduced API
IsNonModalDialogMessage() in the main message loop of your application. Old code using the control should be updated. Failure to do so will result in shortcut keys and tab/shift tab navigation not working.
The compiled binaries archive contains the compiled versions of brainchild.dll, bcc.cpl, BCDemo.exe and brainchild.ocx. Please note that the setup as explained below is still needed to make it all work.
Brain child is an editor control which supports all the bells like syntax coloring, multi-level undo/redo etc. The editor control comes in three parts.
- Brainchild.dll which is the editor control. It is the core component which is written in C.
- BCC.cpl which is the configuration control panel applet. This is written in C++ and depends on my ClassLib library.
- Brainchild.ocx which is an ActiveX wrapper for the control. It is written in C++ using MFC. This OCX makes it possible to used the brainchild control in VB or .NET applications.
In addition, I have included a simple MDI editor demonstration program called BCDemo which is written in C++ and also depends on my ClassLib library.
Brainchild supports most modern editor capabilities including:
- Syntax-coloring, fully configurable. Syntax coloring is supported both on screen and on printer output.
- Multi-level undo/redo. Maximum number of hops configurable.
- Line numbers.
- Fully configurable keyboard mappings.
- OLE drag and drop support.
- Automatic/smart indentation.
- Automatic case fixing.
How to get started
I have not included an installer package. This means that you must follow several steps to get the editor up and running.
- Download the source code (DLL, CPL, OCX (optional), BCDemo) or the compiled binaries. If you decide to use the compiled binaries, you still need to download the DLL source code. It contains necessary setup files which you will need to get things running. If you use the compiled binaries only, you can go to step 7.
- Download, setup and compile the ClassLib C++ library.
- Compile the brainchild DLL.
- Compile the brainchild CPL.
- Compile and register the brainchild OCX (optional).
- Compile the BCDemo demonstration program.
- Create a directory on your hard disk where you can put the brainchild configuration files.
- Copy the directory Defaults, which you can find in the DLL source zip, including all its contents to the created directory.
- Open RegEdit.
- Add the key HKEY_LOCAL_MACHINE\Software\BCDLL\CurrentVersion. (Be careful using the registry editor!)
- In the key, add the string value
Settings and set its value to the directory you created for the brainchild configuration files.
To get the demonstration program up and running, copy the branchild.dll, brainchild.ocx and bcc.cpl files to the directory containing the BCDemo executable and you should be able to run the demonstration program. Do not forget to register the OCX if you want to use it. You can use RegSvr32 to register the OCX. Once you get it up and running, you might also want to download the HTMLHelp docs. It will explain, how to use brainchild in your own programs and how to use the configuration tool.
- Enhanced the Find and Replace dialogs.
- Much better printer support.
- Added support for background colors.
- Added bracket and line highlighting.
- Added an ActiveX wrapper so that brainchild can be used in VB and .NET apps.
- Added support for hyperlinks.
- Fixed some bugs.
- Fixed a couple of nasty bugs.
- Support for loading and saving Unicode files (limited support for loading and saving only).
- Added case-fixing. When turned on, this will automagically fix keyword casing. Suggested by Zodiakon.
This version includes a WTL wrapper and a small WTL demonstration program (VS6 workspace only) by Ernest Laurentin which you can download using the links above. For this release, only the Brainchild_dll.zip and Brainchild_help.zip were updated. The Brainchild_wtl.zip was added. The BCC.cpl and BCDemo source were not updated so version 2.1 users do not have to download these. Also note that the VS7 solution is a Visual Studio .NET 2002 solution. I presume you can load this into Visual Studio .NET 2003 without any problems.
- The control now loads if the registry keys are not set. If they are, the directory configured must have the "Defaults" directory including contents copied into it.
- Added the
LoadParserFromMemory() APIs including corresponding messages. These will allow you to add parser files at run time.
- Fixed a nasty bug which could crash brainchild after receiving a
WM_DESTROY. This has been fixed.
- Line numbers. The control now supports the possibility to show line numbers.
- Some bug fixes. Mostly small rendering bugs when run under Windows XP.
- Initial release on the CodeProject.
The control has been re-written several times over the last years. To get it to where it is now, I have based some of the code on the work of Andrei Stcherbatchenko's CrystalEdit component. The code which was based on his work mostly covers the undo/redo and text buffer stuff.