News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ShineInHex - hex view/edit control

Started by ramguru, January 14, 2006, 06:33:09 PM

Previous topic - Next topic

Jupiter

ok, no del/move, but 'Fill with...' can be easily implemented. may be useful to fill block with zeros or any other chars.

layout:
add horizontal bar at the top where position index will be placed, coz when I resize dialog, I must how many bytes are shown per line
like this:
Offset |  1 2 3 4 5 6 7 8 9 A B C D E F |

Quotecollapse/expand a range of data
for this we need +1 thin vertical pane just before address column, there will be:
colored parts with different colors for collapsed/expanded blocks and
  • or [-] for collapsing/expanding

    Quotestatusbar in non-client area, that will add faster search opportunity, various status information.
    I think that callback for parent window will be better solution: in this case host application may handle status bar or any other window for output.
    anyway at first time it can be implemented as built-in control feature.
EnJoy!

ramguru

Quote from: Jupiter on January 20, 2007, 05:23:29 PM
Quotestatusbar in non-client area, that will add faster search opportunity, various status information.
I think that callback for parent window will be better solution: in this case host application may handle status bar or any other window for output.
anyway at first time it can be implemented as built-in control feature.
I will tell ya a secret, I have no idea how to implement these callbacks  :toothy
However, I think less code left to user, more handled internally - better...

As soon as I know I'm totally screwed up with math in university, I'll be free to implement these things...

Jupiter

good luck and patience with math

about callbacks:
host sends message to control with msg code "set call back" (HEXM_SET_CALLBACK) with pointer to callback proc as param
like this:
call from host:
invoke SendMessage,hWndHexEd,HEXM_SET_CALLBACK,addr EditCallback,INIT_FLAGS
in your control:
you'll check (IsBadCodePtr) and store ptr to callback, then you can call it when you need to notify main window:
_call pHostCallBack,hWnd,Msg,wParam,lParam
EnJoy!

ramguru

New version will look similarly:



Now I'm working on smoother selection, later will implement folding. Don't know how much it can take 'cause folding can be tricky...

six_L

regards

mnemonic

Just here to say that I like this tiny application - nice job.  :U

I don't know how it is handled at the moment, but it would be nice if the apllication doesn't load the whole file into memory but just a small part that actually is displayed plus some buffer for smooth scrolling.
Be kind. Everyone you meet is fighting a hard battle.--Plato
-------
How To Ask Questions The Smart Way

Jupiter

@ mnemonic
ShineInHex control do not load file, it's a task of host application (checkout Test_... in .zip archive)

@ ramguru
shine ;)
EnJoy!

ramguru

Thanks for good words guys,

Quote from: mnemonic on January 23, 2007, 03:50:43 PM
I don't know how it is handled at the moment, but it would be nice if the apllication doesn't load the whole file into memory but just a small part that actually is displayed plus some buffer for smooth scrolling.

The only reason for me not to use FileMapping was possibility to save modified file later. If I were using FileMapping all changes would be directly made. Since I've not implemented "Undo" this wouldn't be very correct from the point of casual user. Today when I take a look at CreateFileMapping I've noticed PAGE_WRITECOPY which may let to save changes later...

mnemonic

Quote from: Jupiter on January 23, 2007, 06:03:57 PMShineInHex control do not load file, it's a task of host application (checkout Test_... in .zip archive)
That's why I talked from the "apllication" and not from the "control". :wink
Be kind. Everyone you meet is fighting a hard battle.--Plato
-------
How To Ask Questions The Smart Way

ramguru

Sorry guys for not posting an update, I'm seriously stuck with that folding. Hell knows what was in my mind when I'd decided to implement that feature, it involves so many things (too many). And now CPU consumption is very high when using ClearType fonts in fullscreen-mode, it makes me nervous and think that I'm doing a crap...

ramguru

update

New features:

  • Gradient support
  • test app saves settings in ini file
  • test app uses filemapping (WARNING YOU'LL BE MAKING DIRECT CHANGES NO UNDO, NO SAVE LATER)
  • added info field shows current pos or selection size
  • added input mode text indicator (HEX/ANSI)
  • many internal things changed ...

Now I'm thinking about RP project and I have lots of motion to accelerate its development ...

Jupiter

great update!
thank you.
I'll check Resource Puncher too.

EnJoy!

ramguru

Thanks friend your feedback keeps me going!

PBrennick

Very nice but is in dire need of an UNDO/REDO. or just an UNDO, al least. I do not think filemapping should be implemented without it.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

ramguru

Thanks, Paul you probably are right, these my warnings are no excuse for me not implementing Undo/Redo features. I'll see what I can do, it will take a while, but it will be implemented, if everything is going to be smoothly (now I'm thinking about unlimited undo/redo)...