Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shifting Text in Visual C++ Text Editor Pin
K. Shaffer2-Feb-05 7:30
K. Shaffer2-Feb-05 7:30 
GeneralRe: Shifting Text in Visual C++ Text Editor Pin
alex.barylski2-Feb-05 11:27
alex.barylski2-Feb-05 11:27 
GeneralRe: Shifting Text in Visual C++ Text Editor Pin
Ryan Binns2-Feb-05 17:30
Ryan Binns2-Feb-05 17:30 
GeneralRe: Shifting Text in Visual C++ Text Editor Pin
alex.barylski6-Feb-05 11:10
alex.barylski6-Feb-05 11:10 
GeneralWanted: VS colorer add-in sources Pin
yuri_g2-Feb-05 4:41
yuri_g2-Feb-05 4:41 
GeneralRe: Wanted: VS colorer add-in sources Pin
S Douglas2-Feb-05 19:09
professionalS Douglas2-Feb-05 19:09 
GeneralBinary Files Pin
mcsherry2-Feb-05 3:54
mcsherry2-Feb-05 3:54 
GeneralRe: Binary Files Pin
David Crow2-Feb-05 5:37
David Crow2-Feb-05 5:37 
I had this same problem about five years ago where the original application would read in a character at a time from a file. If the file was 1MB in size, that's theoretically around 1 million disk reads. The items in the file were formatted as a number followed by a number followed by a \0 terminated string. The files were huge so a day to process them was not uncommon. I cut the processing down to a matter of minutes by using CMemFile and more intelligently processing the buffer. I read the two numbers using two read statements, and then knowing that the \0 terminated string could be no longer than, say, 200 bytes, I read the next 201 bytes into a buffer. I then searched that buffer using CString::Find() for the terminating \0 character. The next read statement started from the next character following.

Knowing how slow that application could be, the first few times I tried my version, I was not convinced it worked. When I passed it around to a few others, they were amazed at how fast it was.


"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


GeneralRe: Binary Files Pin
mcsherry3-Feb-05 5:01
mcsherry3-Feb-05 5:01 
QuestionFind location of program. Check registry? Pin
ChemmieBro2-Feb-05 3:03
ChemmieBro2-Feb-05 3:03 
AnswerRe: Find location of program. Check registry? Pin
David Crow2-Feb-05 3:18
David Crow2-Feb-05 3:18 
GeneralRe: Find location of program. Check registry? Pin
ChemmieBro2-Feb-05 3:25
ChemmieBro2-Feb-05 3:25 
GeneralRe: Find location of program. Check registry? Pin
David Crow2-Feb-05 3:35
David Crow2-Feb-05 3:35 
GeneralWant to capture Event from MS Web browser (shdocvw.dll) Pin
Jetli Jerry2-Feb-05 2:54
Jetli Jerry2-Feb-05 2:54 
General"Open Directory" window Pin
TheCult2-Feb-05 2:31
TheCult2-Feb-05 2:31 
GeneralRe: "Open Directory" window Pin
David Crow2-Feb-05 2:37
David Crow2-Feb-05 2:37 
GeneralRe: "Open Directory" window Pin
TheCult2-Feb-05 2:44
TheCult2-Feb-05 2:44 
GeneralToolbar Peformance Problem Pin
Jnewg52-Feb-05 2:04
Jnewg52-Feb-05 2:04 
GeneralToolbar... help needed Pin
Feroz R2-Feb-05 1:19
Feroz R2-Feb-05 1:19 
GeneralUnicode Support Pin
Feroz R2-Feb-05 1:17
Feroz R2-Feb-05 1:17 
GeneralRe: Unicode Support Pin
David Crow2-Feb-05 2:29
David Crow2-Feb-05 2:29 
GeneralRe: Unicode Support Pin
PJ Arends2-Feb-05 4:52
professionalPJ Arends2-Feb-05 4:52 
Generalbitmap Pin
stew9ln1-Feb-05 23:34
stew9ln1-Feb-05 23:34 
GeneralADO IN VC++ Pin
ivax1-Feb-05 23:33
ivax1-Feb-05 23:33 
GeneralHelp! About the scrollbar of WebBrowser Pin
shoulderlll1-Feb-05 21:40
shoulderlll1-Feb-05 21:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.