locked
RichEditCtrl locking up or freezing on StreamIn RRS feed

  • Question

  •  

    I have a richeditctrl that is reading in larger files then the default, if the file is small it reads in quickly and works fine, if they are larger then the file doesn't read in and the code hangs on the StreamIn function

    I'm using the standard stuff for StreamIn



    MyCallbackFunction ()
    {
    CFile cFile = (CFile*) dwCookie;
    *pcb = pFile->Read(pbBuff, cb);
    return 0;
    }


    EDITSTREAM es;
    es.dwCookie = (DWORD) &cFile;
    es.pfnCallback= MyCallbackFunction;
    m_RichEditCtrl.StreamIn(SF_TEXT, es);

    It looks to me that I need to adjust the temporary buffer or something like that.. the file size looks like to be clipped or over running the buffer.. MY GUESS>??

    I was also thinking about using the CFileStatus m_FileStatus;

    cFile->GetStatus(&m_FileStatus); ( this should give us the size of the file )

    Friday, October 5, 2007 7:19 PM

Answers

  • I got it to read in, it was a propertie with the dialog, but when I tried to edit the file, like say go to the end of a line and hit return, it would not allow the file to do a return if it was semi large, if it was small it worked fine...

    Sunday, October 14, 2007 9:28 PM

All replies

  • I don't understand.

     

    Are these notes for yourself?

    Sunday, October 7, 2007 3:30 AM
  • The stuff with regard to CFileStatus are just a possible idea to get the size of the file since you are going to read it into the richeditctrl.. But the rest of the statements are actually my question..

    basically I have a dlg that has a richeditctrl in it and it will not read in a file if it's say larger then 100K.... so I'm asking how I can solve that issue

     

    Sunday, October 7, 2007 4:56 AM
  • Have you solved this?

    Saturday, October 13, 2007 10:52 AM
  • I got it to read in, it was a propertie with the dialog, but when I tried to edit the file, like say go to the end of a line and hit return, it would not allow the file to do a return if it was semi large, if it was small it worked fine...

    Sunday, October 14, 2007 9:28 PM
  • I must remember I can't help everyone.

    Monday, October 15, 2007 9:00 AM
  • Why is that.......

    Monday, October 15, 2007 3:43 PM
  • Various reasons.

     

    Sometimes people don't try to provide the information needed to help them. Sometimes people don't know how to provide the information needed to help them and don't try to understand how to; instead they consider efforts to help them to be criticism.

     

    Sometimes people can get better help elswhere and I try to explain they can but they think I am criticizing them for using this forum and insist upon using this forum.
    Monday, October 15, 2007 3:58 PM
  • So what is the reason for in this case...

    Monday, October 15, 2007 4:44 PM
  • There is not enough information provided to help, plus the question is actually off-topic for this forum. If there was sufficient information then there is a chance someone would help in this forum eventhough the question should be in the UI newsgroup. Unfortuntely you are unlikley to get help anywhere without clarification and I tried to ask for clarification.

     

    I have seen hundreds and probably thousands of questions from people that are not clear and many of them don't provide clarification so if I am not as helpful as I could be then I apologize.

    Monday, October 15, 2007 5:00 PM
  • Well, the information provided for stream in of text to richeditctrl is exactly what I used, if anyone looked at what I provided and looked at anything about streamin, you would see the standard process to stream in is exactly what I used... nothing fancy just as is..

     

    This is not a User interface issue I'm not doing anything with the interface, it is C++ itself and it is general streaming in of text to a Richeditctrl and is specifically with the documentation which is exactly where this should be since the streamin of text is in the help documentation.

     

    "I tried to ask for clarification" ... saying you don't understand and then saying the comment on the notes, hardly constitutes as asking for clarification, and then in my next post i state the origin issue again, "basically I have a dlg that has a richeditctrl in it and it will not read in a file if it's say larger then 100K.... so I'm asking how I can solve that issue " There is no other information that can be extrapolated and IF you had any other questions you didn't ask because your next post is "Did you solve this..". so it is obvious you out of this, and to finish it off you make the bewilder comment, "I must remember I can't help everyone." ..... where did you legitimately try?

     

    Again, what else does someone need other then the obvious, there is not fancy code, nothing special, if you go to the streamin for richeditctrl and cut and paste in the code, you have exactly what I have...

     

    But hay, at least you added another post to your post count, keep up the good work you will be at 5 stars soon for excellence of comments such as these..

    I must remember strait forward talk eludes the masses....

     

    I apoligize for not clarifiying more....

    Monday, October 15, 2007 5:44 PM