Hope this is the right place to post this.
Scintilla recognizes #Compile as a keyword,
but not %WM_InitDialog. i. e. the character # is
OK but not %.
I have included the lines
Local Chars As String
Chars = "#$_%@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
SciMsg pSci, %SCI_SETWORDCHARS, 0, StrPtr(Chars)
% is an operator, and operators are treated separately. If you want to change the beahavior, you will need to write your own lexer.