Hex Editor control

Hex Editor control

This article was submitted .

This Hex Editor control for WTL was developed because I needed to edit binary files while working inside my experimental development environment, BVRDE.

The control is a fairly standard Hex Editor, with selection support, clipboard and unlimited undo. It uses memory mapped files so it's possible to work with extremely large files without putting constraints on the operating system. It displays data as BYTE, WORD or DWORD sized values, and can operate in read-only mode as well.

The editor itself is a custom-drawn window - not deriving from any of the standard Window controls (the EDIT control in particular); with its own selection, undo and caret-management.

How to use it

The sample demonstrates how to use the control. It's just a standard control implementation - no magic tricks here!

The C++ source file that contains the necessary logic to implement the "universe" has about 800 lines of code, including a generous number of comments.

Source Code Dependencies

Microsoft Visual C++ 6.0
Microsoft WTL 7.5 Library

Download Files

DownloadSource Code and sample (48 Kb)