Author Topic: Why I use RichMasm  (Read 1348 times)

LordAdef

  • Member
  • ***
  • Posts: 255
Re: Why I use RichMasm
« Reply #15 on: May 05, 2017, 07:12:26 AM »
Just for fun, since you enjoy these things:

I installed masm32 + MB in may laptop.
I forgot *.inc is set to open in VS. Double clicked a 11kb inc file and had to wait for THREE minutes.... Man, I´m long enough in the asm world and forgot about the slow stuff...

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7546
  • Assembler is fun ;-)
    • MasmBasic
Re: Why I use RichMasm
« Reply #16 on: May 05, 2017, 07:32:38 AM »
I know the feeling :icon_mrgreen:

Most of my plain text endings are set to RichMasm, of course. But VerySlow has that bad habit to reclaim them without asking for permission :eusa_naughty:

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7546
  • Assembler is fun ;-)
    • MasmBasic
Re: Why I use RichMasm
« Reply #17 on: September 17, 2017, 08:38:41 AM »
RichMasm beta for testing - use at your own risk!

This concerns mainly the menus under Win10. The attached version requires a MasmBasic installation:
RichMasm.exe must be extracted to the \Masm32\MasmBasic\ folder.
RichMasm.ini goes to \Masm32\MasmBasic\Res\

There may still be little glitches when moving the editor, but at least the menus should display OK once it is in a stable position. The file \Masm32\MasmBasic\Res\RichMasm.ini can be personalised as follows:
Code: [Select]
ColMenu=0 ; BGR: 0=default, 1=black
MenuFont=15 ; size 10...20
MenuStyle=5 ; 1/2/3/4... boldness
MenuBgL=0AA7700h ; menu background left
MenuBgR=0FF8800h ; right

Different L and R give a sliding background to the menu. Put zero to accept default values based on invoke GetSysColor, COLOR_ACTIVECAPTION/COLOR_GRADIENTACTIVECAPTION. Unfortunately, on Windows 10 they have little to do with the real caption colour, therefore the option to personalise them :(

Feedback welcome, of course :bgrin:

P.S.: To give you an idea how messy this is, here an attempt from the PowerBasic forum to investigate the caption colour:
Quote
    RTL_GetOSVersionNum(vmaj, vmin, vpak)
    IF vmaj>5 THEN
        keyerr=RegOpenKeyEx(%HKEY_CURRENT_USER, "Software\Microsoft\Windows\DWM", 0, %KEY_QUERY_VALUE, hKey)
        RegQueryValueEx(hKey, "ColorizationOpaqueBlend", 0, %REG_DWORD, blur, SIZEOF(blur))
        IF (keyerr<>%ERROR_SUCCESS) OR (blur) THEN
            FUNCTION=GetSysColor(%COLOR_ACTIVECAPTION)
        ELSE
            RegQueryValueEx(hKey, "ColorizationColor",  0, %REG_DWORD, CLR, SIZEOF(clr))
            RegQueryValueEx(hKey, "ColorizationBlurBalance",  0, %REG_DWORD, blur, SIZEOF(blur))
            CLR=BGR(clr) 'Its a BGR color, also BGR function wipes out Alpha BYTE
            r=GetRvalue(Clr) : g=GetGvalue(Clr) : b=GetBvalue(Clr)
            maxv=MAX(r,g,b) : bfact=blur/90!
            r=r+(maxv-r)*bfact : b=b+(maxv-b)*bfact : g=g+(maxv-g)*bfact
            clr=RGB(r,g,b)
            FUNCTION=clr
        END IF
    ELSE
        FUNCTION=GetSysColor(%COLOR_ACTIVECAPTION)
    END IF