473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Need some advice for a hex editor

I would like to make a quick little hex editor so I need to display hex
string pairs like a grid- if anyone is familiar with hex editors you'll know
what I mean. I could accomplish this by using a regular TextBox and using
monospace font and just adding a space between each pair so it would look
like "A5 76 FF 3B" etc...

Another approach I guess would be to have a plain white pane and then
manually draw the strings- calculating proper x y coords.

What approach you think is better?

I would need to add functionality where I can both select a string of hex
value or click on one to highlight it (not just one character a pair but the
whole pair) So If I clicked the 5 in A5 the whole pair would be selected,
they should really act as one individual entity since it is one byte
represented in 2 digit hex.

I'll also need to add searching and pattern matching so if I use a TextBox
and throw in space all over it might make it more difficult to do this.
Any suggestions?
Nov 17 '05 #1
2 2097
On Thu, 29 Sep 2005 10:31:05 -0700, "=?Utf-8?B?TXJOb2JvZHk=?="
<Mr******@discussions.microsoft.com> wrote:
I would like to make a quick little hex editor so I need to display hex
string pairs like a grid- if anyone is familiar with hex editors you'll know
what I mean. I could accomplish this by using a regular TextBox and using
monospace font and just adding a space between each pair so it would look
like "A5 76 FF 3B" etc...
This would be the best I think (at least, that's what I would do) IF
you meant only to read out the values.
Another approach I guess would be to have a plain white pane and then
manually draw the strings- calculating proper x y coords.
Editing these would be iffy, to say the least.
You would have to store the coordinates with each value so as to
"find" them again.
What approach you think is better?
But if I wanted to edit and store back the modified values, I would
store each byte in a grid as it is read from the file and then read
them from that grid to save them back to the file: no need of any
structure, the grid being the data storage "class".
I would need to add functionality where I can both select a string of hex
value or click on one to highlight it (not just one character a pair but the
whole pair) So If I clicked the 5 in A5 the whole pair would be selected,
they should really act as one individual entity since it is one byte
represented in 2 digit hex.

I'll also need to add searching and pattern matching so if I use a TextBox
and throw in space all over it might make it more difficult to do this. Any suggestions?


Nov 17 '05 #2
I would do the text box thing and select the two on a click event or
something.

--
William Stacey [MVP]

"MrNobody" <Mr******@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
I would like to make a quick little hex editor so I need to display hex
string pairs like a grid- if anyone is familiar with hex editors you'll
know
what I mean. I could accomplish this by using a regular TextBox and using
monospace font and just adding a space between each pair so it would look
like "A5 76 FF 3B" etc...

Another approach I guess would be to have a plain white pane and then
manually draw the strings- calculating proper x y coords.

What approach you think is better?

I would need to add functionality where I can both select a string of hex
value or click on one to highlight it (not just one character a pair but
the
whole pair) So If I clicked the 5 in A5 the whole pair would be selected,
they should really act as one individual entity since it is one byte
represented in 2 digit hex.

I'll also need to add searching and pattern matching so if I use a TextBox
and throw in space all over it might make it more difficult to do this.
Any suggestions?

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Heather Stovold | last post by:
Wow - deciding to program in python sure requires a lot of decisions! So far: I've decided on python for the programming language. I've decided on wxpython for the GUI.... I've decided on...
10
by: Beach Potato | last post by:
Dear Y'all: I'm about to start porting a big old project written in anscient version of Delphi to something more stable, robust, supportable and maybe even portable. Since I haven't seriously...
2
by: dinoo | last post by:
I need your help I want to know what other options user have if he does not have Microsoft Word on his machine I would like to use word sort of application for formatting documents, these...
4
by: Marquisha | last post by:
If this is off-topic, please forgive me. But I thought this might be the perfect spot to get some advice about how to proceed with a project. Working on a Web site design for a nonprofit...
7
by: Cmorriskuerten | last post by:
HI, I learned C by reading a book (C in 21 days, Sams), no I just want to go on. Some people gave me the advice to write a program like a text- editor, is that a good desicion? Thanks in...
6
by: Pete | last post by:
Hi - I have 200 past meeting minutes to convert from text to html with an already settled-on tested css stylesheet. So all I need is an editor where I can highlight text and maybe hit the right f...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
2
by: Hans Artm | last post by:
Hi, We are developing a site that needs to be localized (english + spanish). The site has a lot of "static" pages with a lot of text, and some dynamic pages. We are unsure how to develop the...
4
by: kpierce8 | last post by:
I'm a novice developer at best and often work with the R statistical programming language. I use an editor called TINN-R which allows me to write a script, then highlight a few lines and send them...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.