News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Why I use RichMasm

Started by LordAdef, March 08, 2017, 11:00:45 AM

Previous topic - Next topic

LordAdef

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

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

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:
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:
QuoteRTL_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

#18
Since April 2018 has a nice feature, provided that you download this archive and extract the only file as \Masm32\MasmBasic\Res\ApiAll.jno.

Open a source in 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".


LordAdef

Hi Johen,

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

LordAdef

#20
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.