NOTES: - This code is FREE for private use. - You may NOT use it in a commercial product without my written permission. - This is a preliminary version and will change. Use it at your own risk. - I'll try to keep the public and protected interfaces stable. - There are a couple of optional favors I'd like in return for this code - see below. - If you distribute this code please pass on the whole archive unmodified. 1) What it is. This is a BIG file editor. It looks a lot like a TFileWindow and should be capable of being used as a direct replacement for it in most cases. The major difference is that a TBFileWindow (the B is for Big) is not limited to 64K of text. In fact it is limited to 2 Gigabytes of text - if you have that much memory! Future versions may page to disk if there is enough demand. The biggest text file on my system is 200K so I haven't felt the need. 2) What's in the package. The archive you just extracted contains the following files: EDITTEST.CPP - A simple test program to create a TBFileWindow. EDITTEST.RC README.TXT - This file. BIGEDIT.CPP - The TBFileWindow class. Plus an improved TScroller. BIGEDIT.H To compile it create a project containing EDITTEST.CPP, BIGEDIT.CPP & EDITTEST.RC and make it. All the code is WIN30, WIN31 & STRICT compliant. There is a LOT of recursive code so a big stack is needed - I used 2048K (Yes, 2 Megabytes - I will be working on this). If weird things happen turn on stack checking as a first resort. You should also use the large memory model. Browsing the files will make more sense if you set your tabsize to 4. 3) Differences from TFileWindow. Most of the TFileWindow public & protected interfaces are implemented and some of the rest will be. The biggest difference is that there is no Windows edit control in this editor so there is no Editor data member. Any code that begins with MyFileWindow.Editor-> will not work. Any suggestions to get around this problem would be appreciated. NOTE: This code does trap and process all the WM & CM messages that the TEdit normally would - it's just the explicit calls that aren't implemented. A lot of them don't make much sense if there is more than 64K in the editor. CMEditUndo just brings up a message box at this time. This is next on my list. All of the streamable stuff is not implemented - I don't use it and I don't know anybody that does. If you need it let me know. Tabs are set to 4 average character widths instead of 8. 4) Bugs & Feechurs There are no known bugs in the code. I typed this yesterday and it promptly barfed and I lost 2 hours of typing. That'll learn me! Find and Replace are Sloooooooow - especially on big files with low hit rates. This is second on my list. Cursor Right & Left are a little slow. Cursor up and cursor down tend to drift left with variable pitch fonts. The behaviour on trying to clear a modified file is very basic - it just asks if you want to do it. A future version will bring up the Save (As) dialog automatically. This document was created with EDITTEST.EXE so it works. 5) Design philosophy. TBFileWindow is derived all the way from TWindow. The TEdit, TEditWindow & TFileWindow classes all contain that ^&%^% 64K edit control and are fundamentally limited by it. Also, some of their interfaces assume only 64K of text which is why there is no TBEdit or TBEditWindow classes. 6) The favors. There are a couple of favors I would appreciate in return for this code. THESE ARE OPTIONAL, you can still keep the code if you don't do them. I would appreciate any comments on the code (positive or negative) especially any bug reports. My friend Billy has been through hell in the last couple of years - he's had two rounds of major surgery and contracted diabetes. He's self employed and is raising two small children. Through it all he has remained cheerful and has done all he can to put food on the table. It would really blow him away to get some letters or cards telling him his luck is going to change - if you can include what you consider to be the value of this code it would be even better. His address is: Billy Swaen, 230 East Lane, Clark NJ 07066 There is no need to mention my name. If you aren't comfortable doing this then find somebody near you that needs help and give it to them. thanks, Terry Richards 58A Phelps Ave. New Brunswick NJ 08901 USA 908-545-6533 CIS ID 72240,1026