Does anyone have a point struc and precedure they want to share. I would be too embarrased to show what I've done here. I have the worst time understanding the API manual. If I can work this out I can fix my "hex editor" and will post it immediately with souce code.
Posted on 2003-12-01 16:44:45 by mrgone
The structure must be in DLL because I was getting "symbol redifinition" errors. I took out the Point Struc and it appears to work now.:)

It appears the edit window only knows how to back space but not reinsert a new character. It also appears the graphic representation of actual memory has a limit of 6K so that if a file is larger than 6k the edit function emediately deletes the character or byte and shifts the remainder of the file back one address byte making the buffer full again and therefore no new characters can be inserted.
Posted on 2003-12-01 18:50:57 by mrgone
Does anyone have experience using this fuction and smoothly scrolling through complete file? I found that this function absolutely correlates to the byte what I spoke of previously about the 6K memory limit. The graphic in the edit box using this function stops displaying after 6K of the file data representation. This gives the ability to backspace one byte and insert a byte or if you backspace two bytes you can insert two bytes. I'm looking to scroll smoothly through the file using this function unstead of WM_SETTEXT but to appears as if I did. Any suggested techniques. I can find caret positions but they are only useful for visible portion of rectangle and adjust defaults as you scroll through text.
Posted on 2003-12-02 09:49:37 by mrgone
Yes, the edit window will only hold so much.. a richedit window holds more but still has a limit. I would suggest calculating the filelength, dividing by roughly 6k to get file pointers that reference 6k of file each - then do an 'FSEEK' on the specific location to load up the buffer into the editbox.

Scrolling through manually using the editbox will cause alot of harddisk access, turning your platters to dust :) Not really but still I think FSEEKing is the way to go. Display the number of 'pages', where a page is <=5K (divisible by 2) so it will fit into an editbox without complaining. Go up/down the pages and use the vertical scrollbar for the contents.

EDIT: you should be able to scroll smoothly too, instead of pages.. when you get down to the last screenfull, do an 'fseek' - read-ahead, or while scrolling up, fseek backwards about 6k and grab the info.. the reason I say use fseek is, if you encounter a 1Mb .exe or a 64Mb data file, then loading it all into memory at once won't choke your puter up.. or would it.. now I'm confused.
Posted on 2003-12-03 01:49:34 by drarem