Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using MSDN.... Pin
Paul M Watt22-Apr-02 18:55
mentorPaul M Watt22-Apr-02 18:55 
GeneralRe: Using MSDN.... Pin
Mike Nordell22-Apr-02 19:22
Mike Nordell22-Apr-02 19:22 
GeneralMSDN Pin
SilverShalkin23-Apr-02 3:01
SilverShalkin23-Apr-02 3:01 
GeneralRe: MSDN Pin
Mike Nordell23-Apr-02 10:19
Mike Nordell23-Apr-02 10:19 
QuestionHow to pass handle to stl container? Pin
Todd Smith22-Apr-02 15:37
Todd Smith22-Apr-02 15:37 
AnswerRe: How to pass handle to stl container? Pin
Paul M Watt22-Apr-02 15:52
mentorPaul M Watt22-Apr-02 15:52 
GeneralRe: How to pass handle to stl container? Pin
Christian Graus22-Apr-02 16:06
protectorChristian Graus22-Apr-02 16:06 
GeneralSpeeding Up Display Time in CEditView :: MFC Pin
valikac22-Apr-02 15:27
valikac22-Apr-02 15:27 
Hi.

I am working on a program that displays displays text similar to a text editor. The program works as expected, however, it takes a very long time to display a text file that is 60k or larger.

I am using CEditView as view. Here is the algorithm that displays the texts.

-----
int MAXSIZE = 256;
char text[MAXSIZE];
CEdit &edit = GetEditCtrl();
edit.SetWindowText("first line");
edit.GetLine(0, text, MAXSIZE); // get first line "first line"
CString newText, temp;
temp.Format("%s", text);
newText.Formate("%s%s%s", temp, "\r\n", newText);
...
-----

The concept of the algorithm is this:

1) display first line
2) get first line
3) add first line & new line in a string
4) display string
5) continue until all *new lines* are added

As you can see, this algorithm is extremely impractically. I compared it to Microsoft's Notepade. Notepage *does not* slow done until you open a file that is 1mb or larger.

Is there a better and *faster* way to display multiple lines of text while using the CEditView? Is there a way at all?

Thanks,
Kuphryn
GeneralRe: Speeding Up Display Time in CEditView :: MFC Pin
Paul M Watt22-Apr-02 16:02
mentorPaul M Watt22-Apr-02 16:02 
GeneralRe: Speeding Up Display Time in CEditView :: MFC Pin
valikac22-Apr-02 16:36
valikac22-Apr-02 16:36 
GeneralRe: Speeding Up Display Time in CEditView :: MFC Pin
Paul M Watt22-Apr-02 18:47
mentorPaul M Watt22-Apr-02 18:47 
GeneralRe: Speeding Up Display Time in CEditView :: MFC Pin
valikac22-Apr-02 19:13
valikac22-Apr-02 19:13 
GeneralCFormView resizing Pin
22-Apr-02 13:58
suss22-Apr-02 13:58 
GeneralRe: CFormView resizing Pin
Roger Allen22-Apr-02 21:51
Roger Allen22-Apr-02 21:51 
GeneralRe: CFormView resizing Pin
ErrN023-Apr-02 1:12
ErrN023-Apr-02 1:12 
GeneralGet an HICON from a running process Pin
22-Apr-02 13:33
suss22-Apr-02 13:33 
GeneralRe: Get an HICON from a running process Pin
Paul M Watt22-Apr-02 13:48
mentorPaul M Watt22-Apr-02 13:48 
GeneralRe: Get an HICON from a running process Pin
22-Apr-02 16:35
suss22-Apr-02 16:35 
GeneralHigh-speed screen captures Pin
twomagiclovers22-Apr-02 12:37
twomagiclovers22-Apr-02 12:37 
GeneralRe: High-speed screen captures Pin
Christian Graus22-Apr-02 12:41
protectorChristian Graus22-Apr-02 12:41 
GeneralRe: High-speed screen captures Pin
Paul M Watt22-Apr-02 14:00
mentorPaul M Watt22-Apr-02 14:00 
QuestionClass Function? Pin
Loli1022-Apr-02 10:24
Loli1022-Apr-02 10:24 
AnswerRe: Class Function? Pin
Chris Losinger22-Apr-02 10:37
professionalChris Losinger22-Apr-02 10:37 
AnswerRe: Class Function? Pin
Ravi Bhavnani22-Apr-02 11:09
professionalRavi Bhavnani22-Apr-02 11:09 
GeneralRe: Class Function? Pin
24-Apr-02 11:04
suss24-Apr-02 11:04 

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.