Solved

Find HexEdit Control C++

Posted on 2007-11-15
3
347 Views
Last Modified: 2013-12-04
Hello,

hope to get some help here. I am looking for a control (MFC) to view data in Hex format. Like a normal HexEditor will do. (Adress, Hex, ASCII).
The control i need must have following methods:

- Print (Printer/Paper) Text Formated as in the Control
- Save Data to textfile (Text Formated as in the Control).

Like I give of block of 128 Bytes to the Control. It shows me the 126 Bytes in 16 Byte rows.
Similar to : 000000 0x00 0x00 0x00 .... 0x00  0x00  .............
I want to receive the data as a string like formated above. Not the Byte array.

Freeware or Commercial. I have no problem to pay for those things.  I found some controls but none of the mcan print or save the data as viewed inside the control.

Thanks,

Ingo
0
Comment
Question by:Ocrana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20295638
Well, it is a very specific requirement, there are some commercial controls like this:
http://www.filedudes.com/Hex_Editor_ActiveX_Control-download-27563.html
it prints and copies to clipboard but doesn't save. You won't find any exact match.

There are lots of open-source hex controls at www.codeproject.com, just search there for the keywords: hex editor
0
 
LVL 40

Accepted Solution

by:
evilrix earned 500 total points
ID: 20296785
Converting data bytes to hex isn't hard. Why not just write a converter and just display the output in your control of choice?
// Q&D example of hexing data
#include <iostream>
#include <sstream>
#include <iomanip>
 
char const DATA[] = "any old data";
 
int _tmain(int argc, _TCHAR* argv[])
{
	std::stringstream ss;
 
	for(char const * p = DATA; *p ; ++p)
	{
		ss << std::hex << static_cast<int>(*p);
	}
 
	std::cout << ss.str();
}

Open in new window

0
 
LVL 40

Expert Comment

by:evilrix
ID: 20296804
I should point out that the point of the previous example was to show how to hex bytes not how to parse the aw data. My Q&D example will parse until I hits a NULL char. Obviously this won't work if your data contains NULLs. You should, of course, choose an appropriate 8-bit safe method for traversing your data. I kept it simple, on purpose, so as not to obfuscate the point I was making.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Arduino EDI - Programming language 3 128
operator overload: incompatible type and too many params 5 99
Finding Divisors 5 61
learn programming 8 95
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question