Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to detect that a drive is a DVD ? Pin
olivier10-Feb-03 23:07
olivier10-Feb-03 23:07 
AnswerThis is the solution Pin
olivier10-Feb-03 23:06
olivier10-Feb-03 23:06 
GeneralMath question.. strings and int's.. Pin
RobJones10-Feb-03 4:24
RobJones10-Feb-03 4:24 
GeneralRe: Math question.. strings and int's.. Pin
Chris Losinger10-Feb-03 4:27
professionalChris Losinger10-Feb-03 4:27 
GeneralRe: Math question.. strings and int's.. Pin
RobJones10-Feb-03 4:55
RobJones10-Feb-03 4:55 
GeneralView large text files. Pin
Mathias S.10-Feb-03 4:13
Mathias S.10-Feb-03 4:13 
GeneralRe: View large text files. Pin
Navin10-Feb-03 4:38
Navin10-Feb-03 4:38 
GeneralRe: View large text files. Pin
Ted Ferenc10-Feb-03 6:33
Ted Ferenc10-Feb-03 6:33 
A viewer is easy, editing the file is more awkward.

Simply create a SDI prog with a CScrollView style and the create what was called a virtual view onto the file. The easy way if to create a DWORD array in which you store the position of the start of each line, e.g. read the file and for each line store the start position of each line, makes finding each line easier, when scrolling backwards. Or the old fashioned way write this data to a temporary binary file, which is then used as an index. Remember to display the 1st screen full very quickly

Then when reading the file store "100" lines, i.e. a bit more than a screen full into a CStringArray. You now have the data to display.

This is a bit of a kludge but it solves the problem of stepping backwards through an ASCII file.

There is a cavaet beware of the bug that the max value in a scroll control is 32767, so if you file is > 32767 you need to find the M$ workaround.

I have ued this method for a specialised file viewer and it works very well.



If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
GeneralRe: View large text files. Pin
David Chamberlain10-Feb-03 6:47
David Chamberlain10-Feb-03 6:47 
GeneralRe: View large text files. Yes MMF. Pin
Neville Franks10-Feb-03 9:07
Neville Franks10-Feb-03 9:07 
GeneralSetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 3:54
jeremysay10-Feb-03 3:54 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 4:00
HENDRIK R10-Feb-03 4:00 
GeneralRe: SetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 4:26
jeremysay10-Feb-03 4:26 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 5:19
HENDRIK R10-Feb-03 5:19 
GeneralRe: SetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 20:56
jeremysay10-Feb-03 20:56 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 21:12
HENDRIK R10-Feb-03 21:12 
GeneralRe: SetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 21:25
jeremysay10-Feb-03 21:25 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 21:56
HENDRIK R10-Feb-03 21:56 
GeneralRe: SetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 21:37
jeremysay10-Feb-03 21:37 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 21:52
HENDRIK R10-Feb-03 21:52 
GeneralRe: SetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 22:23
jeremysay10-Feb-03 22:23 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 22:30
HENDRIK R10-Feb-03 22:30 
GeneralRe: SetWindowPos and GetWindowRec Pin
HENDRIK R10-Feb-03 22:36
HENDRIK R10-Feb-03 22:36 
GeneralRe: SetWindowPos and GetWindowRec Pin
jeremysay10-Feb-03 22:48
jeremysay10-Feb-03 22:48 
QuestionCListCtrl and SEtItemIndex()? Pin
ns10-Feb-03 3:38
ns10-Feb-03 3:38 

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.