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

LordAdef

  • Member
  • ****
  • Posts: 588
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: 8435
  • 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: 8435
  • 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

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8435
  • Assembler is fun ;-)
    • MasmBasic
RichMasm beta with bubble help for WinAPI
« Reply #18 on: January 17, 2018, 09:48:50 PM »
This beta has a brand new feature, provided that you download this archive and extract the only file as \Masm32\MasmBasic\Res\ApiAll.jno.

From the attached archive, unzip:
- \Masm32\MasmBasic\RichMasm.exe
- \Masm32\MasmBasic\Res\menusRM.ini

Then drag one of your sources over RichMasm.exe and check what you see when hovering over, for example, over CreateWindowEx. If it doesn't look as in the screenshot below, please let me know 8)

The ApiAll.jno database has over 10,000 entries. There is a certain risk that it contains strings that have another meaning in your code. Let me know if you see a mismatch. The search is done as follows:

  mov esi, ApiAll$              ; esi is the database, edi the API to be found
  .if !Instr_(esi, edi, 4)
        .if ecx>6                       ; find createwindow but not pop or addr
                .if !Instr_(esi, edi, 5)        ; if case-sensitive not found, try case-insensitive full word
                    void Instr_(esi, edi, 1)    ; if even that failed, try a simple case-insensitive search
                .endif
        .endif
  .endif
  .if eax
       ; deb 4, "Api match", $eax:20


Note that by right-clicking on a selected word, e.g. LoadCursor, there is an entry in the popup menu called "Insert tooltip text".



EDIT: Version 21 January attached, fixes a minor bug (Ctrl G, col=? and Ctrl G, bgc=? returned wrong colours). Thanks, Alex :icon14:
« Last Edit: April 26, 2018, 09:59:55 PM by jj2007 »

LordAdef

  • Member
  • ****
  • Posts: 588
Re: Why I use RichMasm
« Reply #19 on: January 20, 2018, 08:07:33 AM »
Hi Johen,

I´m going to download it tonight and let you know how it goes. Looks nice!

LordAdef

  • Member
  • ****
  • Posts: 588
Re: Why I use RichMasm
« Reply #20 on: January 20, 2018, 01:17:48 PM »
JJ, this is actually reaaaaally cool! Working like a charm here.

edit to add: and BTW, this new feature has already been proved very useful for me! I was looking for the createfont  struct at msdn when  it came to me I didn´t have to, RichMasm has it!!!!


Great feature Johen, cheers.
« Last Edit: January 20, 2018, 05:04:05 PM by LordAdef »