Softerra Hex Editor v.1.0
Compendium
See also: Control Implementation (CHexEditCtrl class)
General Information
| Programming Language |
C++ |
| Development Environment |
Microsoft Visual C++ 6.0 |
| Libraries |
MFC 6.0 |
| Operation Systems |
Windows 9x, NT, 2000 |
Required DLLs
| Debug |
Release |
| MFC42D.DLL |
6.0.8447.0 |
MFC42.DLL |
6.0.8665.0 |
| MFCO42D.DLL |
6.0.8447.0 |
MFC42.DLL |
6.0.8665.0 |
| |
MSVCRTD.DLL |
6.0.8447.0 |
Interface
Properties
| Type |
Name |
Description |
Default Value |
| OLE_COLOR |
ForeColor |
Text color |
|
| OLE_COLOR |
BackColor |
Background color |
|
| Short |
Appearance |
0 - flat, 1 - 3D |
|
| boolean |
ShowAddress |
True - show address column |
true |
| boolean |
ShowAscii |
True - show ASCII column |
true |
| Short |
Columns |
Number of data columns (0 - calculate automatically according to window width) |
8 |
| Short |
FontHeight |
Font height |
14 |
| Short |
DigitsInAddress |
Number of digits in the address field (allowed values - 4 or 8) |
4 |
| Short |
DigitsInData |
Data format:- 2 - byte
- 4 - word
- 8 - dword
|
2 |
| boolean |
AllowChangeSize |
False - deny all operations, which result in data length change in the overwrite mode |
false |
| boolean |
DataModified |
True - data has been modified |
N/A |
Note: If the data size exceeds 64K, the DigitsInAddress field always equals 8.
Methods
| SCODE SetData(VARIANT* pData, long dwStartAddr) |
|
| |
Transfer data to editing. |
| |
Parameters: |
| |
| |
pData |
- Contains one-dimensional SAFEARRAY of bytes (i.e. pData->vt == VT_ARRAY | VT_UI1) |
| |
dwStartAddr |
- Starting address value in the 'address field'. Irrespective of dwStartAddr, the data is displayed from the array's beginning. |
|
| |
An example of call using MFC: COleSafeArray arr; BYTE pbData[200] = { 1, 2, 3, 4, 5 }; arr.CreateOneDim ( VT_UI1, sizeof(pbData), pbData ); (or arr.CreateOneDim ( VT_UI1, length ) for a non-initialized array) m_ctlHexEdit.SetData ( arr ); The modified data exists in the same array, but its length may be modified in process of editing. |
| |
Displays the About Box dialog. |
Implementation
| Class |
Purpose |
Source Files |
| CHexEditApp |
Registration and unregistration OCX |
hexedit.cpp, hexedit.h |
| CHexEditPropPage |
Property page |
hexeditppg.cpp, hexeditppg.h |
| CHexEditCtrl |
Hex edit control |
hexedit.odl, hexeditctl.cpp, hexeditctl.h |
The CHexEditCtrl class is the implementation of control. Please find its detailed description here.
Hot Keys
| Hot Key |
Action |
| Shift + arrows, PG UP or PG DOWN |
Data selection |
| Ctrl+HOME |
Moving cursor to the beginning of data |
| Ctrl+END |
Moving cursor to the end of data |
| Ctrl+Shift+HOME |
Selection from the beginning of data |
| Ctrl+Shift+END |
Selection to the end of data |
| Ctrl+Tab |
Switch between the bytes column and the ascii column |
| Insert |
Switch between the insert mode and the overwrite mode |
| Del (insert mode) |
Removal of number under cursor |
| Del (overwrite mode) |
Filling selection with zeros |
| Ctrl+Ins |
Copy data to clipboard |
| Shift+Ins |
Paste data from clipboard |
| Shift+Del |
Cut data to clipboard |
| Ctrl+A |
Select all data |
The Cut, Copy, Paste and Select All commands are also available from the context menu.
Supported Clipboard Formats
| Format name |
Description |
| CF_TEXT |
Null-terminated, plain ANSI text in a global memory block |
| "BinaryData" |
Format used in hex editor Visual Studio |