#Include once "window9.bi"
LoadLibrary "RICHED20.DLL"
Function EditorGadget Alias "EditorGadget" (ByVal gadget As Integer, ByVal x As Integer,ByVal y As Integer,ByVal Width_ As Integer,ByVal height_ As Integer,ByVal stri As String="",ByVal par As Integer=0) As HWND Export
  Var hhh= CreateWindowEx( &h00000200, "RICHEDIT20A", stri,&h503110C4 Or par, x, y, Width_, Height_, Cast(HWND,GETGURRENTAL()), Cast(HMENU,gadget), 0, 0)
  SendMessage( hhh, EM_LIMITTEXT,-1,0)
  ADDIN9999 (gadget,hhh)
  ColorAdd(hhh,GetSysColor(COLOR_WINDOW),GetSysColor(COLOR_WINDOWTEXT))
  If GGF()<>0 Then
    SendMessage(hhh,WM_SETFONT,GGF(),0)
  EndIf
  Return hhh
End Function
