Author Topic: RichEdit line scroll issue...  (Read 14196 times)

TouEnMasm

  • Member
  • *****
  • Posts: 1764
    • EditMasm
Re: RichEdit line scroll issue...
« Reply #15 on: September 27, 2012, 10:32:31 PM »

It is said here:http://msdn.microsoft.com/en-us/library/windows/desktop/bb787873(v=vs.85).aspx
Quote
The following table shows which DLL corresponds with which version of Rich ...
However, Riched20.dll is compatible with Windows 95 and may be installed by
I don't see your need for the riched32.dll,perhaps i am blind.Finding a computer with less than win95 seems to me impossible.
Fa is a musical note to play with CL

PsYcHoCoDe

  • Guest
Re: RichEdit line scroll issue...
« Reply #16 on: September 27, 2012, 11:03:15 PM »
10x, mate, note taken... gonna check it out soon and report some results  :t

PS: ahem, so how should i define these 'new' richedits inside the .rc?!  :icon_eek:

i mean the line with the definition... what should i put instead of "RICHEDIT"? richedit20 or what? :)

jj2007

  • Member
  • *****
  • Posts: 13957
  • Assembly is fun ;-)
    • MasmBasic
Re: RichEdit line scroll issue...
« Reply #17 on: September 27, 2012, 11:21:39 PM »
Try RichEdit20A and RichEdit20W.

PsYcHoCoDe

  • Guest
Re: RichEdit line scroll issue...
« Reply #18 on: September 27, 2012, 11:43:25 PM »
yep RICHEDIT20A works fine... the app's still exposing the same strange behaviour though...  :dazzled:

TouEnMasm

  • Member
  • *****
  • Posts: 1764
    • EditMasm
Re: RichEdit line scroll issue...
« Reply #19 on: September 28, 2012, 12:38:08 AM »
The richedit20 is perfectly stable.There is only one trap in which you can fall.
One or two functions don't put a zero at the end of what they write.
Personnally, i have solved the problem,I don't used them.
After verify and corrected this if necessary,If your problem still exist,it is elsewhere than in the richedit.
Use a debugger to find it.
Fa is a musical note to play with CL

TouEnMasm

  • Member
  • *****
  • Posts: 1764
    • EditMasm
Re: RichEdit line scroll issue...
« Reply #20 on: September 28, 2012, 12:49:42 AM »
Here a dangerous one:
Quote
   INVOKE     SendMessage,Hredit,EM_GETLINE ,lignedebut, addr phrase
remark from the help file:
Quote
Remarks
Edit controls: The copied line does not contain a terminating null character.
used the returned number of char copied to put the zero yourself.


Fa is a musical note to play with CL

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 10583
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: RichEdit line scroll issue...
« Reply #21 on: September 28, 2012, 04:04:33 AM »
Psycho,

If and when you want to test the actual rich edit content, you actually select the entire content, write it to a memory buffer THEN write it to disk. If you use the STREAMOUT based method, it changes the line terminator to a CR-LF pair.

Particularly if you are using a richedit 2 or later you need to see what is in the control to be able to select pieces of text and write it to disk. If you directly save a buffer, it DOES NOT alter the line terminator.

As I mentioned from at least Win2000 upwards, richedit 1 is emulated by the later DLL and is not entirely consistent with the earlier Win9x versions, mainly because the later versions also handle UNICODE. Unless you are writing code for Win95OEM, there is little reason to use the earlier version as the emulation is buggy. The later richedit 2/3 performs better, is faster and can do more, just for example multilevel undo/redo but also be warned that if you select this style, its internally different to other styles and makes a mess of the last line's line terminator. This in turn messes up line reporting on the last line which is where an editor is often used while composing text.

If I did not need drag and drop and multilevel undo/redo I would use a normal edit control as they are easier to use and far more consistent.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

PsYcHoCoDe

  • Guest
Re: RichEdit line scroll issue...
« Reply #22 on: November 01, 2012, 11:59:45 PM »
thank you, guys, i'll keep these considerations in mind, when i return to this project  8)

P.S.: @hutch: i don't really need that fancy stuff inside that project...