Author Topic: A guide to the RichMasm editor  (Read 17516 times)

LordAdef

  • Member
  • ****
  • Posts: 606
Re: A guide to the RichMasm editor
« Reply #60 on: January 25, 2018, 08:39:07 AM »
here is the idea, let me know what you think about it:

Create a TreeView with a couple of parents:

Structures
Procedures
Macros
...search the code and populate the childs with.


Possible?

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
Re: A guide to the RichMasm editor
« Reply #61 on: January 25, 2018, 08:57:42 AM »
Yes, that's possible. EM_FINDTEXT is your friend...

I just checked if you can create controls, too - yes, it works, see attachment.

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
GDI+ bubble help
« Reply #62 on: April 26, 2018, 10:04:10 PM »
The flat GdiPlus API has been added to RichMasm's bubble help feature - example below. See the RichMasm beta with bubble help for WinAPI post for details.

HSE

  • Member
  • ****
  • Posts: 856
  • <AMD>< 7-32>
Re: A guide to the RichMasm editor
« Reply #63 on: July 05, 2018, 01:07:27 AM »
Work this RichMasm.ini part ?:
Code: [Select]
ColFg=0AAAAAAh ; default text colour
Fg8=0B0B0B0h ; light gray
Fg16=0A0h ; dark red
Fg24=0A00000h ; dark blue
Fg32=0aaaah ; dark yellow
Fg40=0ffffffh ; white
Fg48=0FFFFFh ; green

Thanks

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
Re: A guide to the RichMasm editor
« Reply #64 on: July 05, 2018, 03:55:54 AM »
Yes it works, but you need to restart RichMasm to see an effect.

Test: ColFg=FFFFh         ; default text colour

Save, restart RichMasm, select a line of text and hit Ctrl E twice.

The Bg1 ... and Fg8 ... values have effect when you set, using Ctrl G, the user-defined colours: udc=9 would combine Bg1 and Fg8, i.e. almost white background and light gray foreground.

HSE

  • Member
  • ****
  • Posts: 856
  • <AMD>< 7-32>
Re: A guide to the RichMasm editor
« Reply #65 on: July 05, 2018, 05:11:41 AM »
Working!

The comment say "default text colour" but it's not.

Tanks JJ.

Note: if by accident I change color to red, Ctrl-E don't work anymore.

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
Re: A guide to the RichMasm editor
« Reply #66 on: July 05, 2018, 06:44:09 AM »
The comment say "default text colour" but it's not.

It's the colour you get when pressing Ctrl E twice; works fine for me (same for 2 x Ctrl Shift B). Did you restart RichMasm?

Quote
Note: if by accident I change color to red, Ctrl-E don't work anymore.

It works but you can't see the difference...

Try Ctrl G, udc=46 - that selects Bg6 and Fg40, dark background, white default font. Btw the MessageBox template is like that.

HSE

  • Member
  • ****
  • Posts: 856
  • <AMD>< 7-32>
Re: A guide to the RichMasm editor
« Reply #67 on: July 05, 2018, 08:14:50 AM »
It's the colour you get when pressing Ctrl E twice
Exactly. It's not a default.

It works but you can't see the difference...
:biggrin: :biggrin: :biggrin:

Try Ctrl G, udc=46 - that selects Bg6 and Fg40, dark background, white default font. Btw the MessageBox template is like that.
The result is black letters and almost black background.
Res/RichMasm.ini:
Code: [Select]
Bg6=202020h ; grey; 1=almost black, 0 picks default colour ColBg
Fg40=0ffffffh ; white

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
Re: A guide to the RichMasm editor
« Reply #68 on: July 05, 2018, 08:47:49 AM »
The result is black letters and almost black background.
Res/RichMasm.ini:
Code: [Select]
Bg6=202020h ; grey; 1=almost black, 0 picks default colour ColBg
Fg40=0ffffffh ; white

Right. Now press Ctrl A to select all, then twice Ctrl E, and you'll see white on black. The udc=xxx feature is not meant for frequent changes; I use a different background sometimes to warn myself that this is an old version of a document, or a different type of doc. For example, my FreeBasic sources have a different colour setting than my MASM sources.

HSE

  • Member
  • ****
  • Posts: 856
  • <AMD>< 7-32>
Re: A guide to the RichMasm editor
« Reply #69 on: July 05, 2018, 09:02:16 AM »
Background work correctly with udc, even default.
Foreground have a problem I think.

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
Re: A guide to the RichMasm editor
« Reply #70 on: July 05, 2018, 10:04:57 AM »
The background colour, as set here, affects the whole document, therefore you can see the udc=... effect immediately. In contrast, the foreground colour is set on a per selection basis, i.e. the user may have set a mix of colours. You can change that for the whole document by selecting everything (Ctrl A), then choosing a foreground colour such as red (Ctrl E). If you choose twice the same text colour, i.e. 2 x Ctrl E, the default foreground colour will be applied - and that one is determined by the ColFg, Fg8, Fg16 etc ini settings. For example, with udc=32 you get yellow as foreground colour. Test it...

HSE

  • Member
  • ****
  • Posts: 856
  • <AMD>< 7-32>
Re: A guide to the RichMasm editor
« Reply #71 on: July 05, 2018, 10:18:43 AM »
 :t

Why not set ColFg as default instead of black?

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
Re: A guide to the RichMasm editor
« Reply #72 on: July 05, 2018, 10:21:57 AM »
For udc=0 (the default setting), the default text colour is indeed black:
Code: [Select]
ColFg=0 ; default text colourSave the ini with ColFg=00FF00h, restart RichMasm, select text and press Ctrl E twice. The selected text will be green.

HSE

  • Member
  • ****
  • Posts: 856
  • <AMD>< 7-32>
Re: A guide to the RichMasm editor
« Reply #73 on: July 05, 2018, 10:26:25 AM »
When you open a file foreground color is black. Why not ColFg?

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8891
  • Assembler is fun ;-)
    • MasmBasic
Re: A guide to the RichMasm editor
« Reply #74 on: July 05, 2018, 10:49:40 AM »
Because it's a per character setting: The ColFg= determines which colour will be applied when you actively change the text colour, e.g. by pressing Ctrl E twice. But when you load the file, it has already text colours set, and these are independent of ColFg.

In contrast, the background colour can be changed for the whole document with udc=0, udc=1 etc.

There is also a background by character setting, but it uses another mechanism: Select text and press Ctrl H (H like highlight). The text will have a yellow background. Hit Ctrl H again to get white, and again to revert to the standard background (which is ColBg, turquoise for udc=0).