Author Topic: Testing RichEditBib (Highlight Syntax Richedit)  (Read 2764 times)

HSE

  • Member
  • *****
  • Posts: 1741
  • <AMD>< 7-32>
Testing RichEditBib (Highlight Syntax Richedit)
« on: April 07, 2021, 04:04:54 AM »
Hi all!

This a test of a Richedit subclass using a modification of Iczelion's Syntax Highlighting. Only symbols are colored here, exactly what Iczelion omitted.

For dual code freg macro system is used. In 32 bits registers are pushed/poped and in 64 bits registers are pseudo pushed/poped (that means storing them as local variables).  That make a lot more easy to adapt 32 bits code to 64 bits code.

Regards, HSE.

Now must work.
« Last Edit: May 30, 2021, 07:39:27 AM by HSE »

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 723
  • ObjAsm Developer
    • ObjAsm
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #1 on: April 07, 2021, 04:32:53 AM »
Hi HSE
The binary works fine and I was able to recompile the app right out of the box.
For some strange reason, Windows Defender detected the binary as a dangerous file...
Perhaps you've optimized the colors for high contrast. Yellow on a white background (SymbolColor1) is a little difficult to read on regular displays.

Biterider

HSE

  • Member
  • *****
  • Posts: 1741
  • <AMD>< 7-32>
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #2 on: April 07, 2021, 06:42:14 AM »
Hi Biterider!

For some strange reason, Windows Defender detected the binary as a dangerous file...

I erased previous  :biggrin:. Jotti don't found nothing now.

Perhaps you've optimized the colors for high contrast.
No optimization, just black background. Changed that  :thumbsup:

Thanks, HSE.

LiaoMi

  • Member
  • ****
  • Posts: 922
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #3 on: April 07, 2021, 07:08:17 AM »
Hi Biterider!

For some strange reason, Windows Defender detected the binary as a dangerous file...

I erased previous  :biggrin:. Jotti don't found nothing now.

Perhaps you've optimized the colors for high contrast.
No optimization, just black background. Changed that  :thumbsup:

Thanks, HSE.

Hi HSE,


HSE

  • Member
  • *****
  • Posts: 1741
  • <AMD>< 7-32>
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #4 on: April 07, 2021, 07:31:21 AM »
Hi LiaoMi!

That is an optimization to protect eyes!! :biggrin:

I think that was the file 1 (I forgot a line). Now file 2 have to work :thumbsup:
That don't work in this Richedit versiĆ³n, I have to see.

Thanks, HSE 

HSE

  • Member
  • *****
  • Posts: 1741
  • <AMD>< 7-32>
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #5 on: April 07, 2021, 08:02:01 AM »
Thanks LioaMi. Apparently if OS support CHARFORMAT2 perhaps getformat have a problema with CHARFORMAT :cool:

Added a new Project in first post.

jj2007

  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #6 on: April 07, 2021, 08:47:53 AM »
Thanks LioaMi. Apparently if OS support CHARFORMAT2 perhaps getformat have a problema with CHARFORMAT :cool:

mov   [xsi].reRichBib.charF.cbSize, sizeof CHARFORMAT2

HSE

  • Member
  • *****
  • Posts: 1741
  • <AMD>< 7-32>
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #7 on: April 07, 2021, 09:22:30 AM »
mov   [xsi].reRichBib.charF.cbSize, sizeof CHARFORMAT2
No in Win7-32. Yes in Win7-64. Like in file 3 is working well in both  :thumbsup:.

jj2007

  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #8 on: April 07, 2021, 09:35:33 AM »
See Murray's blog. That was 2012...

HSE

  • Member
  • *****
  • Posts: 1741
  • <AMD>< 7-32>
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #9 on: April 07, 2021, 09:49:41 AM »

jj2007

  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #10 on: April 07, 2021, 10:11:30 AM »
Office...

See Making RichEdit work properly on Windows 10. The System32\RichEd20.dll sucks, it's buggy and utterly slow. Use Office 11 or 12 versions, they sit in C:\Program Files (x86)\Common Files\Microsoft shared\Office1?\RICHED20.DLL; even if you don't have Office installed, you may find them there if you ever installed the free Word viewer.

See also https://docs.microsoft.com/en-us/archive/blogs/murrays/richedit-versions

Biterider

  • Moderator
  • Member
  • *****
  • Posts: 723
  • ObjAsm Developer
    • ObjAsm
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #11 on: April 07, 2021, 03:55:04 PM »
Hi HSE
TestRichBib3 works fine under Win10 Enterprise 20H2/64.  :thumbsup:

Biterider

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 8492
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #12 on: April 07, 2021, 04:01:00 PM »
It worked OK on my Win10 64. Yellow punctuation but the text in white and on a black background scheme.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

HSE

  • Member
  • *****
  • Posts: 1741
  • <AMD>< 7-32>
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #13 on: April 07, 2021, 11:18:55 PM »
Thanks Hutch and Biterider  :thumbsup:

System32\RichEd20.dll
Good point JJ! Could be a problem here. Thanks.

jj2007

  • Member
  • *****
  • Posts: 11550
  • Assembler is fun ;-)
    • MasmBasic
Re: Testing RichEditBib (Highlight Syntax Richedit)
« Reply #14 on: April 08, 2021, 12:22:47 AM »
The "official" RichEdit DLL is \System32\msftedit.dll (but it's not popular - I don't know why, I never tried it); there is also a C:\Windows\System32\riched20.dll, but it's over 10 years old, and I doubt it has all the features of the office versions, at one third of their size...

From Murray's blog:
Code: [Select]
4.0 Office XP riched20.dll
4.1 Windows XP SP1, Tablet, Vista msftedit.dll
5.0 Office 2003 riched20.dll
5.1 Windows CE, Pocket Word riched20.dll
6.0 Office 2007, Encarta Math Calculator riched20.dll