flat assembler
Message board for the users of flat assembler.

Index > Windows > RichEdit and EM_STREAMIN

Author
Thread Post new topic Reply to topic
moriman



Joined: 01 Apr 2006
Posts: 55
Location: Northern Ireland
moriman 13 Jul 2006, 22:46
Hi,

I've found a few examples of using EM_STREAMIN but don't understand them Confused

Assume I have the following situation...

A richedit control and a file.
The file is 223,741,056 bytes in length with each 'record' within the file being 16 bytes. If I want to display all of the information in the file in my richedit control, the total information, after processing to make it human readable, is 21,479,141,376 bytes (including CR & LF). How do I go about dispaying this info in my control?

The sort of things I'm interested in learning are...

in the EditStreamCallback proc, the only information passed to the proc from the EM_STREAMIN message is the dwCookie. Where does the proc retrieve the other parameters (pbBuff, cb, pcb)?

proc EditStreamCallback, dwCookie, pbBuff, cb, pcb
endp

thanks for any help\enlightenment Wink
Post 13 Jul 2006, 22:46
View user's profile Send private message Reply with quote
peter



Joined: 09 May 2006
Posts: 63
peter 14 Jul 2006, 12:06
Implement your own control. AFAIK, in Win32, Richedit has a limit of (INT_MAX - 2) characters; that's about 2 Gb.

If you use own control, you can read in memory only the first several kylobytes of file that will be displayed on the screen, so the program can be very fast.
Post 14 Jul 2006, 12:06
View user's profile Send private message Visit poster's website Reply with quote
moriman



Joined: 01 Apr 2006
Posts: 55
Location: Northern Ireland
moriman 14 Jul 2006, 15:12
thx Peter, I've thought of doing that, but this is an app only for personal use at the minute, so speed doesn't really bother me. Using the EM_STREAMIN would save a lot of coding for my own control Wink
Also, I'm using it as a learning experience regarding the EditStreamCallback procedure. I've nearly got it sorted, just 3 extraneous characters appearing after each callback. When I get it finished I'll post the code in case it's of use to anyone else Smile

mori
Post 14 Jul 2006, 15:12
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.