DATAPAD You can view or edit your text and binary files with this Windows utility. I wrote this program at one of my old jobs to edit print streams. Once in a while, I have the need to look at binary files, and other Windows tools such as Notepad and Wordpad don't cut it. So I decided to resurrect the tool and modify it for general use (and removing the company-specific features along the way). If you have questions or comments, or found bugs in this tool, you can email me at reymano@yahoo.com. |
||||||||
|
||||||||
Download datapad.zip Tested on WinXP but should work on previous Windows versions. |
||||||||
Basics You can open any file for edit with Datapad. It looks at the contents of the file to determine whether it's dealing with a text or binary file. If it's a binary file, Datapad will display the deafault of 64 characters per line (each line is considered one record) as shown below; for text files, the program will break the record according to where the carriage-return and/or line-feed characters are at. Cursor positions are displayed on the left and top side of the editing window as well as the status bar to help keep track of where you are in the file. The program only prints the standard alpha-numeric and special characters; all other characters are displayed with a period ("."). You can see their corresponding hexidecimal values by switching to hex mode which you can accessed from the "View" menu option or from the toolbar. Each record then takes up three lines on the screen. The first line shows the ASCII characters while the next two lines show the hex values. Since each ASCII character is one byte long, it takes two hexadecimal digits to represent them, one for each nibble (4 bits). For example, the ASCII value for character "G" is 71 or 47 in hex value. You can insert or overwrite either the regular characters or their hexdecimal counterparts with this program. Try changing the hex value 47 to 48 and see what happens. |
||||||||
|
||||||||
View the Datapad Help Page here.
Datapad Source Code EditData.cpp - Because of the Hex mode, the standard CEdit control provided by the MFC could not be used. Instead, I had to create my own version of the control by deriving one straight from CWnd. AppView.cpp - In keeping with MFC's document/view architecture, manipulation of the data file is controlled from this derivation of CView class. Cursor tracking and input handling all starts from here. |
||||||||